• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Command Prompt

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I've got a problem with win7 64 cmd
I set Path to java's bin folder and it works fine if I run from acesories->run
but in cmd it does not find path to java and javac
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you set the path environment variable?
 
Maxims Voitovs
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I did
 
Bartender
Posts: 825
5
Python Ruby Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What message(s) are you getting from command prompt? What is the path you installed JDK into and what did you put to be part of your environment variable? Please TellTheDetails, so we will be able to help you.
 
Maxims Voitovs
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Run cmd from C:\Users\Username:
mesage: javac is not recognized as an internal or external command...
Path= C:\Program Files\Java\jdk1.7.0_10\bin
Enviroment variable starts with C:\Program Files\Java\jdk1.7.0_10\bin; C:\windows\system32; etc;
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remove any spaces in the PATH envar and try again. Report the result here, and this time round, copy/paste from the command prompt and system variables box. Don't paraphrase.
 
author
Posts: 23834
140
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Darryl Burke wrote:Remove any spaces in the PATH envar and try again. Report the result here, and this time round, copy/paste from the command prompt and system variables box. Don't paraphrase.



Instead of moving the JDK to a directory path that doesn't contain any spaces, it is probably easier to just put quotes around the PATH variable (so that it can be in a path that has a space).

Henry
 
Maxims Voitovs
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, problem was that, I put space after semicolon in Path variable.
now java command works fine, but javac still not recognized.
CLASSPATH and JAVA_HOME is set to the same folder

*sorted it out by adding environment variable Path another value C:\Progra~2\Java\jdk1.7.0_10\bin; and it worked
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!