I need some help getting
Java set up initially on my Mac OS X computer. I'm new to mac and java but have played around with html before.
I have the book "Head First Java" and in the part about setting up Java, it says that I need to add an entry to my Path environment variable (whatever that is) that points to the /bin directory inside the main Java directory.
I've tried searching my mac for the bin directory, but haven't been able to find it. I haven't downloaded and installed any java, because the mac os x is supposed to come with Java. Java is up to date as well.
My question is, how to I even run a .java file on my mac (i'm guessing through terminal?) and how do I set up the path so that it points to wherever it needs to point so that I can run my app. And how do I compile a .java file? From what little I understand since I just started, the compiler changes the .java to a .class file so that your JVM can run it. I just don't know how to do this : /
I am using Text Edit on the mac to do this. I got it to work in Eclipse by making a MyFirstApp class under the src folder and then just clicking run. Then in that bottom window under the console tab, it showed my text " I rule the world". I guess clicking the run button at the top compiles and runs your work. I'd still like to know how I could do this the more manual way. That way I understand what Eclipse does when it does it automatically.
I also noticed in my Java Preferences application, that under the advanced tab under java console, it was defaulted to "do not start console" as opposed to "show console" or "hide console". Does that matter?
This is the source code i'm practicing with:
Other than being able to save it as a .java file, I am dead in the
water. Please help!