Win a copy of Spring Boot in Practice this week in the Spring forum!
  • 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

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: 13063
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: 76111
362
  • 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: 76111
362
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic