• Post Reply Bookmark Topic Watch Topic
  • New Topic

javac is not recognized etc.  RSS feed

 
Greenhorn
Posts: 2
Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am attempting to create a HelloWorld, (yes, I am that new to this) and I am typing the command jvac HelloWorld.java in my command window and I am getting the error 'javac' is not recognized as an internal or external command, operable program, or batch file. I checked my java folder in my program files and it says i have jre. Do I need jrk as well?
 
Saloon Keeper
Posts: 18800
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Stark!

Yes, you need the JDK, not the JRE. The JRE can only run Java, not compile it (there's a JRE embedded in the JDK, incidentally).

And, of course, you probably want to put the "java home"/bin directory on your PATH so that javac can be found when you type it in at the command prompt.
 
Stark Monteskew
Greenhorn
Posts: 2
Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your help, and for the welcome.
 
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome again

There are several ways to set the PATH; have a look at our first program FAQ.
 
Ranch Hand
Posts: 368
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello.. the reason of your problem is that you have not set the path for bin tools.for avoiding such problems set the path to bin tools...and keep enjoying coding

 
Campbell Ritchie
Marshal
Posts: 56600
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch Sachin Tripathi
 
Sachin Tripathi
Ranch Hand
Posts: 368
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pleasure is all mine Campbell..
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!