I use .bat file to launch Java programs on Windows, what about on a Mac?
I have different simple Java programs on my PC that I kick off with a .bat file, the only line in the file is:
start javaw -classpath . main/Main
and it starts my Java application.
Mac users, what do I do to make this work on a Mac? I want a simple clickable icon like a .bat file that I can launch on the Mac. Isn't there some kind of .command file for Macs, is that the key? I couldn't figure it out. I have zero knowledge of Macs, but my wife just bought one because she wanted to have one for various reasons, but I need to get these Java apps to run.
Could some kind soul help me out and it explain it like you were talking to an idiot? :) Thanks.
[687 byte] By [
rocketguya] at [2007-11-27 2:24:20]

On a related note, there is something else I need to change in my code to become mac compatible. I have a program that alters some text and at the end I pop up my output in notepad on the PC. Well, I don't have that on a mac anymore. Is there a way to pop up Mac's textedit program similar to this way that I was doing the notepad on the PC:
Process p=Runtime.getRuntime().exec("notepad.exe "+outputfile);
Thanks!
> If you use java 1.6+ check the Desktop class,
> specifically the edit(File file) method in it.
> /* Launches the associated editor application
> and opens a file for editing.*/
Thanks, but unfortunately I'm using 1.5. But fortunately, I found this which works! :)
Runtime rt = Runtime.getRuntime();
rt.exec("open "+outputfile);
Thanks :)