wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Compiling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Compiling" Watch "Compiling" New topic
Author

Compiling

Alexis Skeates
Greenhorn

Joined: Oct 27, 2004
Posts: 2
I am totaly new to java and no pretty much nothing. I was doing a tutorial the Hello World one as probably every one has. I have a little probelm in I am clueless on how to compile the java file so that I can run it.

I think the problem lies in that every bit of info I find has to do with pc and I am doing this on a mac Panther 10.3

If any one could point me in the rite direction it would help and well I can move from first base.

Thanks Yall
Petr Blahos
Ranch Hand

Joined: Apr 28, 2004
Posts: 131
Hi Alexis,

Open command line interpreter and try to type javac and press
enter. If you get something like commend not found, that means
that you maybe don't have java development kit installed. Otherwise
go to the directory with your sources and type
javac yourfilename.java
resolve erros and then
java yourfilename

I believe we also have a forum dedicated to mac here.

BTW when you get to command line, unix instructions should apply.

Best regards,
Petr


Get a better web browser:<br /><a href="http://www.mozilla.org/products/firefox/switch.html" target="_blank" rel="nofollow">http://www.mozilla.org/products/firefox/switch.html</a>
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
The first cup of java tutorial for the mac tells you all you need to know about how to compile and run your programs.
Alexis Skeates
Greenhorn

Joined: Oct 27, 2004
Posts: 2
Thanks Boys and Girls I will try this as soon as I get home.

Also thanks for the link I had already check that out and was very help full althoug I got lost along the line some were and it is also for OS 9.

Apreciate all the help.

Have a good day!
Hentay Duke
Ranch Hand

Joined: Oct 27, 2004
Posts: 198
Panther comes with everything you need, including the Developement Kit. To compile you just need to use the terminal and navigate to the folder you saved your java file in and run

javac MyFile.java

then

java MyFile

to execute the class.

very easy to do, the mac already has everything and knows where it is.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compiling
 
Similar Threads
looking for job
hi, i have problem in reading data
Java - the right tool for the job?
How to get the size of the Session !
automatically include header