View Full Version : java installation error - javac
I have downloaded the following:
jre1.6.0_07 to my Laptop.
I am running Windows XP.
When I am testing the version in Dos: java -version, it does display the correct version.
When I try to compile ex: javac Welcome.Java, it gives me an error saying:
I have tried to add the following to the Environment Settings but with no luck:
Please can somebody assist, I reaaly want to start learing how to program in Java as soon as possible. I come from a DB2 Cobol Background.
08-26-2008, 10:53 AM
try c:\jdk1.6.0_07\bin\javac welcome.java in the command prompt.
Thanks it worked, but it's a long typing road. Aren'y you suppose to just type in JAVAC from anywhere instead of be in the path where it's stored.
Example: c:\jdk1.6.0_07\bin\Welcome\javac Welcome.java ?
Versus: c:\ jdk1.6.0_07\bin\javac Welcome.java or even only c:\javac Welcome.java ????????
it is easier to put java in a c:\java directory without the dots and include it in your path. I think it is because dos doesn't like filenames/pathnames with dots.
08-28-2008, 11:21 PM
do u have a screenshot of ur Environment Settings specifically the path settings?
coz i tried what u do did.....
I have tried to add the following to the Environment Settings but with no luck: c:\jdk1.6.0_07\bin;
... and mine works just fine. Im also using Windows XP.
have u also tried removing the trailing semicolon while putting it in ur Environment Settings? coz i tried mine without it
09-24-2008, 11:30 PM
I am also a newbie, which is to say that I just finished reading the third chapter on my Java - A Beginners Guide (Control Statements). I was having the same problem when trying to install and run Java in my laptop. I found the answer in the back of the book. The reason why I was having problems is because the Java "jdk1.6.0_07\bin " was not part of my "path". The following is how I fixed it:
1. Right click on the "My Computer" icon.
2. Click on "Properties".
3. Click on "Advanced System Settings".
4. Click on the "Advanced" tab.
5. At the bottom of that window, click on "Environment Variables".
6. On the next window, scroll on the bottom window and look for "Path" on the left side.
7. Click on "Edit" and go to the end of that line and enter ";" and the path to your "bin" folder.
In my computer the location was: C:\Program Files\Java\jdk1.6.0_07\bin
I hope this helps. If I am wrong on this, please reply and share the answer so I'll know for the future. Cheers!
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.