Forums Register Login

checking java installation

+Pie Number of slices to send: Send
I'm reading "Agile Java" by Jeff Langr. In the 'Setting Up' chapter I was to set JAVA_HOME env. var. to point to my Java dir. which I think I succeeded at doing properly. Then he instructs me to "try executing (under Windows): "%JAVA_HOME%"\bin\java -version". I don't know how to do what he says to do.
+Pie Number of slices to send: Send
For Windows XP...
- Click on the Start button (in the lower left of your screen by default).
- Click on All Programs
- Click on Accessories
- Click on Command Prompt
- In the window that come up, type the following (with the quotes):


"%JAVA_HOME%/bin/java" -version



In other versions of Windows, the Command Prompt mught be named "DOS Prompt" or something similar.

Ryan
[ May 10, 2005: Message edited by: Ryan McGuire ]
+Pie Number of slices to send: Send
I'm still confused. Earlier in the book, I was asked to verify Java config by typing "java -version" at the command prompt. This worked as expected, and I understood what I was requested to do. What I'm having trouble with, is the books request to try the same installation verification "(under Windows)". You instructed me to use the command prompt; isn't that different than (under Windows)?
+Pie Number of slices to send: Send
Doing something in a Command Prompt window still counts as "under Windows". It means do this if you have Windows installed as opposed to Linux or Solaris or Mac OS. Under the "under Windows" heading there are "Console" programs and there are "GUI" programs. And with Console programs, you can either double-click on them in "MyComputer" or wherever and have the associated window disappear immediately on termination, or you can run them from a Command Prompt window so that you see the output after the program exits.

As for having you verify the java installation twice, I can see a few possiblities:
  • The first time (where it's just "java -version") makes sure that java is on your PATH, while the second one makes sure that JAVA_HOME is set correctly.
  • There are different paths you can take through the book (e.g. "If you're not interested in applets, skip chapters 2-4.") and you might have skipped the first one.
  • He forgot the first one was there.


  • Ryan
    [ May 10, 2005: Message edited by: Ryan McGuire ]
    +Pie Number of slices to send: Send
    I tried what you suggested and the response was: the system cannot find the path specified. Now what?
    +Pie Number of slices to send: Send
    Now try typing:

    SET JAVA_HOME

    and see if the value of JAVA_HOME is what you expect it to be (It should be a directory like "C:\j2sdk1.4.2_06" or "C:\Program Files\Java\jdk1.5.0_02" or some such. If not, go back and re-read the section to see that you've set it correctly.
    +Pie Number of slices to send: Send
    the response from set JAVA_HOME was as expected.

    Thanks for your help, I can move on to next subject now.
    Shiny 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 757 times.
    Similar Threads
    Trouble installing JDK 7
    problem while installing netbeans6
    Problem with ANT using a different JDK version
    Help needed
    Caught java.lang.UnsatisfiedLinkError
    More...

    All times above are in ranch (not your local) time.
    The current ranch time is
    Mar 29, 2024 00:41:39.