Win a copy of Functional Reactive Programming this week in the Other Languages forum!
    Bookmark Topic Watch Topic
  • New Topic

can't compile or run program

 
monica mitra
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Report post to moderator
hey I have a problem.I installed JDK 5.0 in my machine.But i can't compile & run my jave programs from command prompt.I can do this by using jbuilder. but i can't do it from commant prompt.plz help me. :roll:
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Report post to moderator
Did you put the bin directory in your PATH?
 
fred rosenberger
lowercase baba
Bartender
Posts: 12196
35
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Report post to moderator
what is the exact error message?
 
bhanushali bhavesh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is the exact method to run a java code
1] in the command prompt go to the directory where u have saved the program
2] now do a "setpath = "path of the bin folder ( usually it is C:\program Files \Java\jdk1.4\bin) "

3] now do a "javac programName.java" , this would compile the program
4] now do a "java programName" , this would run the program
 
Campbell Ritchie
Sheriff
Pie
Posts: 50240
79
  • Mark post as helpful
  • send pies
  • Report post to moderator
Monica Mitra, welcome to the Ranch. Navigate to this site, where you will find installation instructions. Follow them to the letter. The problem you are getting usually means the PATH variable isn't set properly.

Then come back and tell us whether it worked.

CR
 
monica mitra
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Report post to moderator
I set the path variable but still the error "'javac'is not recoginsed as an internal or external command,operable pragram or batch file" comes each time i try to compile the program.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post duplicate topics. Please continue this thread here.
 
    Bookmark Topic Watch Topic
  • New Topic