Results 1 to 4 of 4
  1. #1
    vertesi is offline Member
    Join Date
    Mar 2009
    Posts
    1
    Rep Power
    0

    Default JAVA -Setting system variables for Vista

    Hi all,

    I am a newbee.

    I am trying to follow the tutorial material, Hello World Tutorial, given by my professor, and I cannot seem to even get half way past the tutorial.


    The issue I am having probably deals with my class path. I've read loads of commentary behind it, have tried to do it myself, and am unsuccessful.

    I am posting becuase I need step by step instruction that are custom to my needs.

    My system variables currently look like the following:

    CLASSPATH: .;
    PATH: C:\Program Files\Java\jdk1.6.0_03\bin
    JAVA_HOME: C:\Program Files\Java\jdk1.6.0_01;

    When I type "java -classpath . Hello" into the prompt, I recieve:
    'java' is not recognized as an internal or external command , operable command or batch file.


    Pls pls help. It would be much appreciated.

  2. #2
    faisalcmpm is offline Member
    Join Date
    Feb 2009
    Posts
    22
    Rep Power
    0

    Default

    try after giving path to tools.jar n dt.jar
    in CLASSPATH

  3. #3
    fogus is offline Member
    Join Date
    Mar 2008
    Posts
    43
    Rep Power
    0

    Default

    You might want to check out:
    [SOLVED] Classpath (again)

    I posed my solution there, you can give it a try (it's for XP though).

    faisalcmpm is a member of the secret Cult of the CLASSPATH which is why he wont give any of the secrets away.

    "try after giving path to tools.jar n dt.jar in CLASSPATH"
    Thanks for helping us beginners.

    I have a feeling that only "PATH" in the user variable is nessisary and that CLASSPATH is actually red herring (kind of like "Area 51" being a diversion for the real alien laboratory down at "Area 52.5").
    ~fogus

  4. #4
    fogus is offline Member
    Join Date
    Mar 2008
    Posts
    43
    Rep Power
    0

    Default

    Just noticed you wrote:
    "When I type "java -classpath . Hello" into the prompt, I recieve:
    'java' is not recognized as an internal or external command , operable command or batch file."

    give this a try in a command prompt:
    ----
    >javac hello.java
    ----

    You have to compile before you can run it. Note that "javac" is not "java"; don't miss the "c". Also note, you just use "hello.java" and not "hello" with the "javac" command. Do not forget the ".java" extension. A file called "hello.class" should appear in the same directory as "hello.java".

    then try:
    ----
    >java hello
    ----
    to actually run it

    Let us know how that works for you.


    Someone should make a video of: completely installing java JDK on a linux, a winXP and a win vista machine; typing out helloworld.java; running it through the command line; and upload those videos to youtube. Please.
    ~fogus

Similar Threads

  1. setting system clocks time
    By pks in forum New To Java
    Replies: 4
    Last Post: 05-14-2009, 03:36 AM
  2. Applying Vista Buttons for Java JButton
    By viswanadh7 in forum AWT / Swing
    Replies: 4
    Last Post: 03-13-2009, 11:28 AM
  3. Setting classpath in Vista
    By dawiz001 in forum New To Java
    Replies: 2
    Last Post: 02-25-2009, 05:00 PM
  4. java doesnt allow vista to work
    By 10rosas in forum New To Java
    Replies: 5
    Last Post: 12-22-2008, 04:23 PM
  5. run java signed applet in vista
    By nanaji in forum Java Applets
    Replies: 7
    Last Post: 05-14-2008, 11:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •