converting a batch file from windows to work on a mac

Joined
Mar 13, 2012
Messages
5
Reaction score
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?
 
Joined
Nov 26, 2010
Messages
3,558
Reaction score
52
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?
 
Joined
Mar 13, 2012
Messages
5
Reaction score
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?
 
Joined
Nov 26, 2010
Messages
3,558
Reaction score
52
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.
 
Joined
Mar 13, 2012
Messages
5
Reaction score
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?
 
Joined
Nov 26, 2010
Messages
3,558
Reaction score
52
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?
 
Joined
Mar 13, 2012
Messages
5
Reaction score
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
 
Joined
Nov 26, 2010
Messages
3,558
Reaction score
52
javac.exe is a standard file that comes with the latest of java
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.
 

Ask a Question

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. After that, you can post your question and our members will help you out.

Ask a Question

Top