Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java is not recognized as an internal or external command

 
Christopher Wong
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic