How do you program java on mac?
Hello, my friend is in java class and has an ibook, they are required to do some java programming (no duh ). Anyways, we have no clue how to do so, someone said something about using the Terminal to do programming but so far we do not know how to do it... Anyone here know how to do so?
Comments
Now I guess they should have banned me rather than just shut off posting priviledges, because kickaha and Amorph definitely aren't going to like being called to task when they thought they had it all ignored *cough* *cough* I mean under control. Just a couple o' tools.
Don't worry, as soon as my work resetting my posts is done I'll disappear forever.
First, I use SubEthaEdit to create the plain text .java source files.
Now, if you've never used the terminal before, it'd be a good time to get acquainted. The Terminal is kinda like the finder... you use it to move around the file system and run other programs from within it. Some simple commands include:
ls - lists the contents of the current folder (should be your home folder at the beggining of a session)
cd - this is what you do to change directory. Typing "cd /" will go to the root level, and "cd ~" goes to your home.
cat - this will display the contents of a (text) file in the terminal.
and, perhaps the most essential program is "man". This is how you learn how things work. Type "man ls" or "man man" to get an idea of how these things work. They're kinda obtuse but if you start reading them you get the gist.
Now, for the java part. Just "cd" to the directory where all your project files are, and then type "javac filename.java". It will take a sec, and then it puts the compiled .class files in the same directory. Or, if you're working with more than one class, just type "javac *.java" to compile all files in the directory whose name is java.
If you want more information type "man javac" or simply "man java" to see everything java related on the machine.
http://www.apple.com/macosx/features/xcode/
You can also download it for free from the apple developer site, but the installer for it is probably already on the iBook. I think it's in /Developer, but I can't remember exactly.
Edit: The installer should be in /Applications/Installers/Developer Tools/ if the iBook has OS X 10.3 (Panther) on it.
Miyamoto Musashi - The Book of Five Rings (1643)
You should not have too much fondness for a particular weapon, or anything else for that matter.
Now I guess they should have banned me rather than just shut off posting priviledges, because kickaha and Amorph definitely aren't going to like being called to task when they thought they had it all ignored *cough* *cough* I mean under control. Just a couple o' tools.
Don't worry, as soon as my work resetting my posts is done I'll disappear forever.