|
-
Nov 10th, 2005, 02:40 AM
#1
Thread Starter
Hyperactive Member
Java Nwebie Problem
I'm trying to use the Java compiler command in Command Prompt ("javac") to compile my source code. The ("java") command works right but when I go to use the ("javac") command my Command Prompt tells me that it's not recognized as an internal or external command and I don't understand why because it was working earlier this evening. What's wrong here?
Last edited by GamerMax5; Nov 11th, 2005 at 12:06 AM.
-
Nov 10th, 2005, 03:15 AM
#2
Fanatic Member
Re: Java Nwebie Problem
You might be using one of the following java packages:
jre = Java Runtime Environment
jdk = Java Developer Kit
Jar, Java, Javac, etc... are located in the /bin directory of your java folder.
Firstly find your java directory, as an example mine is: C:\Program Files\Java\jdk1.5.0_05\bin
Now go into the command prompt and type the command PATH
Look at the path, if your java directory isn't in it, you need to add the directory to it, this can be done like this:
path=%path%C:\Program Files\Java\jdk1.5.0_05\bin
Replace 'C:\Program Files\Java\jdk1.5.0_05\bin' with your java directory.
You will have to do this everytime you visit the command prompt as it isn't saved, i don't know how to save it, but i'm sure there is a way. Maybe someone else on here knows.
-
Nov 10th, 2005, 06:34 AM
#3
Re: Java Nwebie Problem
In the path command there's a typo. Should be:
path=%path%;C:\Program Files\Java\jdk1.5.0_05\bin
Note the semicolon after the second %.
To save it, go to Control Panel->System->Advanced->Environment Variables.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 10th, 2005, 02:46 PM
#4
Thread Starter
Hyperactive Member
Re: Java Nwebie Problem
Okay to save the path to the SDK in the Environment Variables, I edit the one that's currently there?
EDIT: I changed the path variable value but I have another question. What exactly does that do?
Last edited by GamerMax5; Nov 10th, 2005 at 02:58 PM.
Reason: Figured it out
-
Nov 10th, 2005, 03:02 PM
#5
Re: Java Nwebie Problem
The path variable is where the OS looks for executables when you enter their name without a full path.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 10th, 2005, 03:06 PM
#6
Thread Starter
Hyperactive Member
Re: Java Nwebie Problem
Oh so it's sort of like an auto complete feature for executables without a full path?
-
Nov 10th, 2005, 03:10 PM
#7
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 10th, 2005, 05:39 PM
#8
Thread Starter
Hyperactive Member
-
Nov 11th, 2005, 09:58 AM
#9
Fanatic Member
Re: Java Nwebie Problem
 Originally Posted by CornedBee
In the path command there's a typo. Should be:
path=%path%;C:\Program Files\Java\jdk1.5.0_05\bin
Note the semicolon after the second %.
To save it, go to Control Panel->System->Advanced->Environment Variables.
The semi-colon is not necessary, i type the path the way i said on the computer at my university all the time, and it works every time.
-
Nov 11th, 2005, 01:50 PM
#10
Re: Java Nwebie Problem
Perhaps the original path at your university is ;-terminated to begin with?
Envvar substitution is stupid; I very much doubt Windows would realize you're concatenating two paths.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 11th, 2005, 07:16 PM
#11
Fanatic Member
Re: Java Nwebie Problem
 Originally Posted by CornedBee
Perhaps the original path at your university is ;-terminated to begin with?
Envvar substitution is stupid; I very much doubt Windows would realize you're concatenating two paths.
The original path at my university isn't ; terminated, nor is the path on my own computer, and i never use ; when setting the path. I assume that ; is optional.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|