I've been teaching myself Java for about a month now, using books at online sources. This has been done entirely within NetBeans and I'd like to start using the terminal. For the life of me, I cannot figure out how to set the classpath variable. In fact, I am completely confused by this concept. I am using a MacBook with the latest version of OS X, along with Java build 1.5.
It seems like I am supposed to create a "classes" folder and then point my terminal to that folder, but I get errors when I try to do this and I'm not quite sure where the best place to put this folder is, if this is what I am even supposed to do. I am also not sure if the Mac OS comes with all the Javadocs, or if these can only be accessed by NetBeans.
Thanks for the link. Right after I posted this I figured out what I needed to do, thanks to a Google search and help from a friend.
I created a folder named "classes" in which I created a "HelloWorld" folder, in which I enclosed the "HelloWorld.java" file. Then I typed: cd classes/helloworld, which pointed me where I wanted to go. Afterward I used the Javac command to compile the .class file, followed by the java command to run the file and everything worked beautifully.