File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Compiling" Watch "Compiling" New topic


Alexis Skeates

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
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,

Get a better web browser:<br /><a href="" target="_blank" rel="nofollow"></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

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



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:
subject: Compiling
It's not a secret anymore!