File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Command Prompt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Command Prompt" Watch "Command Prompt" New topic
Author

Command Prompt

Maxims Voitovs
Greenhorn

Joined: Dec 22, 2012
Posts: 4
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
Jayesh A Lalwani
Bartender

Joined: Jan 17, 2008
Posts: 2372
    
  28

Did you set the path environment variable?
Maxims Voitovs
Greenhorn

Joined: Dec 22, 2012
Posts: 4
Yes I did
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

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.


The quieter you are, the more you are able to hear.
Maxims Voitovs
Greenhorn

Joined: Dec 22, 2012
Posts: 4
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;
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4541
    
    5

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.


luck, db
There are no new questions, but there may be new answers.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18825
    
  40

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


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Maxims Voitovs
Greenhorn

Joined: Dec 22, 2012
Posts: 4
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Command Prompt