• Register
0 votes
109 views

Problem:

When i am trying run an application in JBOSS 4.0 via eclipse 3.3 i am getting the below exception:

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

I had to set the environment variables :

JAVA_HOME C:\Program Files\Java\jdk1.5.0_04

PATH C:\Program Files\Java\jdk1.5.0_04\bin

But when i check in the Ant>Runtime>GlobalEntries its pointing to C:\Program Files\Java\jdk1.5.0_04\lib\tools.jar please advice why this error is coming and how to fix. I am able to execute the same application with tomcat 5.0 any one can help me plz

6.1k points

Please log in or register to answer this question.

1 Answer

0 votes

Answer:

Its always recommended that you do not install Java or any Java applications including JBoss,
in a folder containing a space in its path name.
I would recommend that you move the JDK installation to some place else

(Ex: C:\Java\jdk1.5.0_04) 

and set the JAVA_HOME appropriately. See if that helps. Let me know if it is workig.

35k points