converting a batch file from windows to work on a mac

Discussion in 'AppleScript' started by d3non, Mar 13, 2012.

  1. d3non

    d3non New Member

    Joined:
    Mar 13, 2012
    Messages:
    5
    Likes Received:
    0
    i'm sorry if im in the wrong section but i am new to this forum and am un-aware of its sections, i was just wondering if anyone could give my some incite knowledge on how i would convert a windows batch file to work on a mac?
     
    d3non, Mar 13, 2012
    #1
    1. Advertisements

  2. d3non

    Kaveman VIP Member

    Joined:
    Nov 26, 2010
    Messages:
    3,559
    Likes Received:
    47
    Location:
    Westland, NZ
    Mac has Unix with a bash shell completely accessible via Terminal.
    If its standard Dos commands then I'm sure there are shell equivalents.

    What's the bat file do?
     
    Kaveman, Mar 13, 2012
    #2
    1. Advertisements

  3. d3non

    d3non New Member

    Joined:
    Mar 13, 2012
    Messages:
    5
    Likes Received:
    0
    it's a batch file that opens java from the c:drive but i understand that this would be ("user.home") or something along those lines.
    if you like i can send you an examine of the text within the batch file in question?
     
    d3non, Mar 13, 2012
    #3
  4. d3non

    Kaveman VIP Member

    Joined:
    Nov 26, 2010
    Messages:
    3,559
    Likes Received:
    47
    Location:
    Westland, NZ
    sure post it here or pm me, but you often don't need to do that sort of stuff on the Mac.
    No, if you want to reference a drive you use /Volumes/[nameofdrive] but as I said I'm not sure that's what you need to do.
     
    Kaveman, Mar 13, 2012
    #4
  5. d3non

    d3non New Member

    Joined:
    Mar 13, 2012
    Messages:
    5
    Likes Received:
    0
    well the batch file in question is to start a javac.exe file ill put in as bold text to help identify the piece of code.

    @Echo off
    color a
    echo You May now close this window, thanks.
    "C:\Program Files\Java\jre6\bin\Javaw.exe" -Xmx254m -classpath .;Theme.jar Gui 0 0 lowmem members 32
    @echo off
    exit


    i have never actually owned a mac it is mainly to help out a friend, and is it true to change it from batch to work with the mac i simply chance the .bat to .sh?
     
    d3non, Mar 13, 2012
    #5
  6. d3non

    d3non New Member

    Joined:
    Mar 13, 2012
    Messages:
    5
    Likes Received:
    0
    Any ideas?
     
    d3non, Mar 13, 2012
    #6
  7. d3non

    Kaveman VIP Member

    Joined:
    Nov 26, 2010
    Messages:
    3,559
    Likes Received:
    47
    Location:
    Westland, NZ
    NO! that is not true at all.

    There is NO standard way to run .exe files!!!

    Not even sure why you would do this on a Mac.
    There is no Javaw.exe, not sure what Theme.jar does but I don't think standard Java has a GUI.

    Again, what are you trying to do? What application are you trying to run? Why are you doing this?
     
    Kaveman, Mar 13, 2012
    #7
  8. d3non

    d3non New Member

    Joined:
    Mar 13, 2012
    Messages:
    5
    Likes Received:
    0
    it's a java programmed game that me and a few friends made, the javac.exe is a standard file that comes with the latest of java downloads as far as i know anyway, the game is used by starting the batch file which then links the class files together and run's the game client and from there you can play the game.

    and the file in question is a .bat file i don't know if i made that clear or not just because you are talking about the .exe file
     
    d3non, Mar 13, 2012
    #8
  9. d3non

    Kaveman VIP Member

    Joined:
    Nov 26, 2010
    Messages:
    3,559
    Likes Received:
    47
    Location:
    Westland, NZ
    not on the Mac.

    I'd start by just double clicking the jar file, that should open and run it.

    In the Application > Utilities > Java Preferences you can setup the stuff the bat file seems to be doing.
     
    Kaveman, Mar 14, 2012
    #9
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Scott Wells
    Replies:
    3
    Views:
    174
    Scott Wells
    May 17, 2004
  2. mjc
    Replies:
    10
    Views:
    280
  3. fromablueplanet
    Replies:
    1
    Views:
    222
  4. fromablueplanet
    Replies:
    0
    Views:
    227
    fromablueplanet
    Sep 1, 2006
  5. dglaser@pacific.net
    Replies:
    4
    Views:
    302
    dglaser@pacific.net
    Jan 21, 2005
  6. Carl Pattie

    Mac Newbie Converting Windows DLL to Dynamic Lib

    Carl Pattie, Feb 17, 2004, in forum: Programmer Help
    Replies:
    0
    Views:
    171
    Carl Pattie
    Feb 17, 2004
  7. michau
    Replies:
    4
    Views:
    265
    whisky-dave
    Sep 26, 2007
  8. Gezedka
    Replies:
    0
    Views:
    644
    Gezedka
    Dec 4, 2012
Loading...