• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to run

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is the *.java file stored??
From which dir you are exectuing the command.
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
where is the javac.exe file saved, and is that directory in your PATH?
 
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic