• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trouble in compiling

 
minnie ravi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i've jus installed jdk1.5.0_07. it shows an error after compiling which is:
[I][I]'javac' is not recognized as an internal or external command, operable program or batch file.[/I][/I]
i've changed the User variables to set the path. but again its not compiling. can anyone help me?
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What did you change the PATH to?
 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helo sir you need to set classpath variable so that it can recognised javac.
suppose if U have installed jdk1.5 on c drive then your classpath as
set classpath=c:\jdk1.5\bin
then it should work i think

Arun kumar maalik
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Arun Maalik:
Helo sir you need to set classpath variable


Not the CLASSPATH, which is used by Java to find *.class and *.jar files; but the PATH environment variable, which is used by the operating system to find programs like javac.
 
minnie ravi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,i work on microsoft windows XP. i added the path as follows:

Settings-->Control Panel-->System-->Advanced-->Environment variables--> UserVariables-->Temp& tmp.
for both of these vaiables the variable value is given as:
%USERPROFILE%\Local Settings\Temp

i jus added the path on the right end as:

%USERPROFILE%\Local Settings\Temp;C:\Program Files\Java\jdk1.5.0_07\bin

still its not working. please help me..
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you type this directly, what happens?

c:\progra~1\java\jdk1.5.0_07\bin\javac
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15278
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by minnie ravi:
hi,i work on microsoft windows XP. i added the path as follows:

Settings-->Control Panel-->System-->Advanced-->Environment variables--> UserVariables-->Temp& tmp.

You are setting the TEMP and TMP environment variables. That's not right. You should set the PATH environment variable.

Add ;C:\Program Files\Java\jdk1.5.0_07\bin to the PATH environment variable instead of to TEMP and TMP.
 
minnie ravi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jesper Young:

You are setting the TEMP and TMP environment variables. That's not right. You should set the PATH environment variable.

Add ;C:\Program Files\Java\jdk1.5.0_07\bin to the PATH environment variable instead of to TEMP and TMP.


hi sir, where can i find this PATH environment variable? shoul i create a new User Variable named PATH? thank you so much for taking the time to clear my doubts.
 
Jan-Jaap van Nieuwkerk
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Minnie,

instead of
Settings-->Control Panel-->System-->Advanced-->Environment variables--> UserVariables-->Temp& tmp.

You should use

Settings-->Control Panel-->System-->Advanced-->Environment variables--> UserVariables-->path

This variable should be in the same list as TEMP that is shown.
If it does not exist (which i doubt) add the variable PATH and enter
C:\Program Files\Java\jdk1.5.0_07\bin as the value
Hope this helps.
 
minnie ravi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jan-Jaap van Nieuwkerk:
Hi Minnie,

instead of
Settings-->Control Panel-->System-->Advanced-->Environment variables--> UserVariables-->Temp& tmp.

You should use

Settings-->Control Panel-->System-->Advanced-->Environment variables--> UserVariables-->path

This variable should be in the same list as TEMP that is shown.
If it does not exist (which i doubt) add the variable PATH and enter
C:\Program Files\Java\jdk1.5.0_07\bin as the value
Hope this helps.


hi sir, still its not working. but i could compile the program using TestPad. thank you all for taking the time to clear my doubt..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic