Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiling

 
Alexis Skeates
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic