aspose file tools*
The moose likes Beginning Java and the fly likes Trouble in compiling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Trouble in compiling" Watch "Trouble in compiling" New topic
Author

Trouble in compiling

minnie ravi
Greenhorn

Joined: Jul 19, 2006
Posts: 8
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

Joined: Feb 07, 2005
Posts: 2367
What did you change the PATH to?
Arun Maalik
Ranch Hand

Joined: Oct 25, 2005
Posts: 216
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

Joined: Jul 08, 2003
Posts: 24183
    
  34

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.


[Jess in Action][AskingGoodQuestions]
minnie ravi
Greenhorn

Joined: Jul 19, 2006
Posts: 8
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

Joined: Feb 07, 2005
Posts: 2367
If you type this directly, what happens?

c:\progra~1\java\jdk1.5.0_07\bin\javac
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14104
    
  16

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.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
minnie ravi
Greenhorn

Joined: Jul 19, 2006
Posts: 8
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

Joined: Jul 03, 2006
Posts: 11
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

Joined: Jul 19, 2006
Posts: 8
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..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trouble in compiling