Results 1 to 4 of 4
- 03-20-2009, 03:12 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 1
- Rep Power
- 0
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.
- 03-20-2009, 05:44 AM #2
Member
- Join Date
- Feb 2009
- Posts
- 22
- Rep Power
- 0
try after giving path to tools.jar n dt.jar
in CLASSPATH
- 03-20-2009, 08:03 AM #3
Member
- Join Date
- Mar 2008
- Posts
- 43
- Rep Power
- 0
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
- 03-20-2009, 08:10 AM #4
Member
- Join Date
- Mar 2008
- Posts
- 43
- Rep Power
- 0
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
-
setting system clocks time
By pks in forum New To JavaReplies: 4Last Post: 05-14-2009, 03:36 AM -
Applying Vista Buttons for Java JButton
By viswanadh7 in forum AWT / SwingReplies: 4Last Post: 03-13-2009, 11:28 AM -
Setting classpath in Vista
By dawiz001 in forum New To JavaReplies: 2Last Post: 02-25-2009, 05:00 PM -
java doesnt allow vista to work
By 10rosas in forum New To JavaReplies: 5Last Post: 12-22-2008, 04:23 PM -
run java signed applet in vista
By nanaji in forum Java AppletsReplies: 7Last Post: 05-14-2008, 11:59 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks