Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to run

 
Mrs.Noorulain faisal
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have installed java in c: program files and trying to run it from java directory
with javac Helloworld.java but it is not working
i get the message that javac file cannot be recognized

Kindly help me urgentlyyyyyyyyyy
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is the *.java file stored??
From which dir you are exectuing the command.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12086
29
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where is the javac.exe file saved, and is that directory in your PATH?
 
Campbell Ritchie
Sheriff
Posts: 48404
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So many people have that sort of problem that there is a section about it in the Java Tutorials. See whether that helps. Note there is a "common problems" page.
 
Kumaresh Vidhyasagar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Set the path and classpath of the java directory as shown below.

1. Right Click My Computer and select properties.
2. click on Advanced tab and then click on Environmental variables button
3. click on New button of the system variables section and type the variable path as 'path' and variable value as 'java installed directory' + bin
(For eg: C:\Program Files\Java\jdk1.6.0_05\bin)
2009-01-06_212306.png
[Thumbnail for 2009-01-06_212306.png]
 
Campbell Ritchie
Sheriff
Posts: 48404
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kumaresh Vidhyasagar wrote:Set the path and classpath of the java directory as shown below.
A useful piece of information there, complete with screenshot, but only set the PATH. Don't do anything with CLASSPATH at this stage.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic