Forums Register Login

Installing Java

+Pie Number of slices to send: Send
Hello there everyone, I have recently purchased a book called Head First Java, and in order to learn the language I'm aware that Java needs to be installed on your computer.
I have downloaded and installed the jdk as mentioned in the book, however I am unsure as to how compiling Java works.
a %javac is mentioned but I don't know how it works >.<
It also said something about changing my file Path to point to the \bin directory, but I don't quite understand how it works.
I'm running Windows XP if that helps any.
If you could help me with this, that'd be great.
+Pie Number of slices to send: Send
You will need to do something like this either in your command prompt, write an env.cmd that you call ever time you open a command prompt to work on java or you can set these values in your environment variables in the Advanced Tab of the properties of My Computer (Right click on My computer, select properties).

set JAVA_HOME=<Full directory path of your jdk directory>
set PATH=%JAVA_HOME%\bin;%PATH%

You should be able to call javac or java or any of the other java command line tools that come with the JDK.

Joe



Originally posted by Teny Thomas:
Hello there everyone, I have recently purchased a book called Head First Java, and in order to learn the language I'm aware that Java needs to be installed on your computer.
I have downloaded and installed the jdk as mentioned in the book, however I am unsure as to how compiling Java works.
a %javac is mentioned but I don't know how it works >.<
It also said something about changing my file Path to point to the \bin directory, but I don't quite understand how it works.
I'm running Windows XP if that helps any.
If you could help me with this, that'd be great.

 
+Pie Number of slices to send: Send
Welcome to JavaRanch!

Updating the system PATH variable is covered in Step 4 of the Installation Instructions for Windows.

The javac and java commands are used at the command line. In Windows XP, this is under Start > Programs > Accessories > Command Prompt. (You will probably want to make a shortcut for this app.)

To see how to use these, try this Hello World Tutorial for Windows. This will also verify that your installation is correct.
+Pie Number of slices to send: Send
Hello, thanks for the information, I have added new variables called PATH (there was previously a "path"), and JAVA_HOME, but that does not resolve my problem.
My book requires J2SE version 1.5 or more, but the only things I can find on the website are 1.4_.... and something called an EE 5 SDK, should this be the one I download?
+Pie Number of slices to send: Send
Here is Sun's current Java SE Downloads page. You probably want to download and install JDK 6 Update 2. Be sure to follow the installation instructions.

(SE is "Standard Edition," which you will need. EE is "Enterprise Edition," which you probably do not need.)

What specific problems were you having with the 1.4 installation?
[ August 17, 2007: Message edited by: marc weber ]
CAUTION! Do not touch the blades on your neck propeller while they are active. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 868 times.
Similar Threads
Trouble Installing JDK on a Netbook Running Ubuntu
What are the meaning of content Inside these folder when we install Java?
Cannot run program from another directory other than c:\Sun\SDK\jdk\bin
How to create your first Java program
JRE and settings
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 06:56:55.