aspose file tools*
The moose likes Beginning Java and the fly likes Perhaps JAVA_HOME does not point to the JDK..error? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Perhaps JAVA_HOME does not point to the JDK..error?" Watch "Perhaps JAVA_HOME does not point to the JDK..error?" New topic
Author

Perhaps JAVA_HOME does not point to the JDK..error?

Vinod Vinu
Ranch Hand

Joined: Aug 30, 2009
Posts: 217
Im getting the following error while running the hbm2pojo.xml file on eclipse:-

BUILD FAILED
C:\Projects\scc\capability\build\hbm2pojo.xml:56: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK


Vinod Kumar Nair
"Any fool can write code that a computer can understan. Good programmers write code that humans can understand."
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14269
    
  21

JAVA_HOME is an environment variable. It's not required to set this for Java itself, but some tools use this to find the JDK. You're probably running some tool which expects this environment variable to be set.

Set the environment variable and restart Eclipse, and try to do it again. How you set the environment variable depends on which version of Windows you are using exactly. On Windows Vista, it is: right-click on My Computer, select Properties, Advanced System Settings, Advanced, button Environment Variables. Add it to the System variables (lower half of the window).

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19720
    
  20

What do you get when you open a command prompt and execute "echo %JAVA_HOME%" (without the quotes)?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Perhaps JAVA_HOME does not point to the JDK..error?