File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes java is not recognized as an internal or external command Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "java is not recognized as an internal or external command" Watch "java is not recognized as an internal or external command" New topic
Author

java is not recognized as an internal or external command

Christopher Wong
Greenhorn

Joined: Nov 25, 2012
Posts: 1
Hi I'm hoping I can get some help on this issue.

I've done everything(installed current JRE, JDks, and SDK ADT bundle) and typed in "java -version" in cmd. I'm getting "java is not recognized as an internal or external command".

When i input "set path" i get

C:\Users\Christopher>java -version
'java' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Christopher>set path
Path=C:\Program Files\Java\jdk1.6.0_21\bin;C:\Program Files\Microsoft\Web Platfo
rm Installer\;C:\Program Files\Java\jdk1.6.0_21\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

Please help me figure out the next steps. I really need this for my course and I appreciate any help!

EDIT:
Reading the solutions that other users are having, it seems to recommend to point the vm to the right jre installation. When i open eclipse.ini, it doesn't seem to have a vm in there.

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-product
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-Declipse.buildId=v21.0.0-519525
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3611
    
  60

Welcome to the Ranch, Christopher!

It looks like there is a Java directory on your path (twice, actually). Try to have a look at the directory C:\Program Files\Java\jdk1.6.0_21\bin - is it there? Does it contain java.exe and other JDK tools?

I don't have any experience with Eclipse, but I'd say you can add the -vm option to eclipse.ini when it doesn't exist yet. Googling eclipse.ini vm brings up some pages which seem useful in this context.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java is not recognized as an internal or external command