• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Installing Java

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Teny Thomas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Destroy anything that stands in your way. Except this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic