• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

'javac' is not recognized as an operable program or batch file

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not able to set the path to javac in Windows 7 64bit home premium

I've viewed several webpages on this issue and they are all either vague, outdated, or don't solve my problem.

I have the newest (or very new at least) version of Java installed here.
C:\Program Files\Java\jdk1.6.0_23\bin

I know javac is present and working because I can cd to its directory and return "Usage: javac..."
And, also because Eclipse is running normally.

I've entered a path for the Java bin in Environment Variables

User Variable "CLASSPATH" Value "%classpath%"

and System Variable "JAVA_HOME" Value "C:\Program Files\Java\jdk1.6.0_23\bin"

I would really like to run javac without having to cd, from .java files I type manually. I've got a lot to learn and so I guess it starts here at the beginning, just running the complier from cmd.

Thanks.
 
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeremy James Brown wrote:I'm not able to set the path to javac in Windows 7 64bit home premium

I've viewed several webpages on this issue and they are all either vague, outdated, or don't solve my problem.

I have the newest (or very new at least) version of Java installed here.
C:\Program Files\Java\jdk1.6.0_23\bin

I know javac is present and working because I can cd to its directory and return "Usage: javac..."
And, also because Eclipse is running normally.

I've entered a path for the Java bin in Environment Variables

User Variable "CLASSPATH" Value "%classpath%"

and System Variable "JAVA_HOME" Value "C:\Program Files\Java\jdk1.6.0_23\bin"

I would really like to run javac without having to cd, from .java files I type manually. I've got a lot to learn and so I guess it starts here at the beginning, just running the complier from cmd.

Thanks.



Are you sure it's not supposed to be:
"C:\Program Files (64)\Java\jdk1.6.0_23\bin"
instead of:
"C:\Program Files\Java\jdk1.6.0_23\bin"?

And:
C:\Program Files (64)\Java\jdk1.6.0_23\bin
instead of:
C:\Program Files\Java\jdk1.6.0_23\bin

And anyway, we are at update 24, not 23.
Hope I helped,
cc11rocks aka John Price
 
Jeremy James Brown
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

john price wrote:
Are you sure it's not supposed to be:
"C:\Program Files (64)\Java\jdk1.6.0_23\bin"
instead of:
"C:\Program Files\Java\jdk1.6.0_23\bin"?



I cut the path directly from windows explorer, and also get a return from javac if I cd to that directory in cmd, so I don't think so. Thanks for your quick reply.
 
Jeremy James Brown
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW java works from the c:\Users\User> prompt just not javac.
 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problem. Sorry I couldn't help. But, to help you I'll tell you what my relevant "environment variables" are. You may be missing one?

Hope this fixes it
cc11rocks aka John Price
 
Jeremy James Brown
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Added "C:\Program Files\Java\jdk1.6.0_23\bin" to the path variable

Rebooted, confirmed the edit with cmd> echo %path%

javac works.

Thanks
 
Marshal
Posts: 70211
280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is often a Java™ runtime in the Windows folder, so the "java" command will work even if the path to your installation is incorrect.
 
Can you hear that? That's my theme music. I don't know where it comes from. Check under this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic