Fixing Common Java Error [Java C] - Setting the Classpath
Description: To Help You Fix Compiler's, and etc.
Difficulty: 2/10
Assumed Knowledge: Listening to instructions.
Most People are getting error's saying you need jdk 5.0 or 6.0 well, Its because your java is set to the wrong Think so im here to help. ;)
Step 1:
Go To Start, The Click Computer Most Of You should Get a screen Like This:
[Only registered and activated users can see links. Click Here To Register...]
As you can See I labled were you should click.
Step 2:
After You clicked There, You should See something like this:
[Only registered and activated users can see links. Click Here To Register...]
Ok, Now Click On The Advanced Tab, Good, Now Click On Enviromental Varriables, Should See a Screen like This:
[Only registered and activated users can see links. Click Here To Register...]
Now Click New (Click THe One At The Top).
Varriable Name: CLASSPATH (all cap's)
Varriable Value: CLASSPATH=C:\Program Files\Java\jdk1.6.0_03\bin;%CLASSPATH%;
(click Ok)
Now Do This again But add:
Varriable Name: PATH
Varriable Value: C:\Program Files\Java\jdk1.6.0_03\bin
There you go hope it helped. Also This set your varriables to java 6.3 so any new compiler should work
Heres The Compiler I use
Code:
@echo off
if exist "%programfiles%\Java" (call :compile "%programfiles%\Java\") else (goto error)
:compile
for /D %%x in ("%~1jdk*") do (set p="%%~x\bin\javac.exe")
if defined p (%p% -cp . *.java)
if defined p (goto end)
:error
echo You do not have Java installed. Please download it at the site that is about to load.
"%programfiles%\Internet Explorer\iexplore.exe" http://java.sun.com/javase/downloads/index.jsp
:end
echo Finished!
pause
exit
Post Good Feed Back Not Negative :)
For further information, please visit: [Only registered and activated users can see links. Click Here To Register...]