• Register
1 vote
133 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.

Can anybody help me to solve out this problem.

10 7 2
6,060 points

Please log in or register to answer this question.

1 Answer

1 vote

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 or not. 

Happy coding

11 6 4
34,950 points

Related questions

0 votes
2 answers 698 views
698 views
Intellij IDEA on windows 10 is producing the error while trying to run my maven project. the following output show while running: C:\> mvn -version The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program NB: JAVA_HOME should point to a JDK not a JRE What would be the proper solution of this problem?
asked Mar 10, 2020 LizzyM 6.1k points
1 vote
2 answers 738 views
738 views
Problem: I just completed all the set up for a Java development environment. Downloaded JDK and now trying to set up maven for my project and I am getting this error : nb: java_home should point to a jdk not a jre I couldn’t figure out the solution anywhere online. I am running a windows 10 based OS. Any solution from you is much appriciated. Thanks.
asked Mar 26, 2020 Gavin 15.3k points
0 votes
1 answer 23 views
23 views
Problem: I will request someone to answer my question Please, I have searched on the web but I got no useful information for this, now I am in difficulty continuing my learning
asked Mar 21 shamimkhan 15.1k points
1 vote
1 answer 2.6K views
2.6K views
Problem: I am a windows seven user and recently I’ve installed JDK to learn java but I am getting an error. The message is something like: Missing server JVM at `C:\Program Files\Java\jre7\bin\server\jvm­­.dll' please install or use the JRE or JDK that contains these missing components. Your kind solution is much appreciated.
asked Mar 22, 2020 Gavin 15.3k points
0 votes
1 answer 16 views
16 views
Problem: I am stuck now .. need some suggestions .. please help me .. java_home does not point to the jdk
asked Apr 18 Ifra 37.2k points
0 votes
1 answer 8 views
8 views
Problem: I cannot run my Ant build.xml since I updated to java 1.7.0_52 (or there about). but with this latest jave jdk update somethings different (?). Perhaps JAVA_HOME does not point to the JDK. Any suggestions?
asked Apr 2 ummesalma 29.2k points
0 votes
1 answer 40 views
40 views
Any suggestions?
asked Dec 28, 2020 TeamScript 13.5k points
0 votes
1 answer 6 views
6 views
Problem: What is it? Please answer >Intellij the selected directory is not a valid home for jdk.
asked 5 days ago Ashok Dileep 5.3k points
1 vote
1 answer 5 views
5 views
Problem: How can I deal with this problem : perhaps you are running on a jre rather than a jdk
asked Apr 4 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 8 views
8 views
Problem: I need a help , How I can fix this : perhaps you are running on a jre rather than a jdk maven
asked Apr 4 MUHAMMAD MUNEEB 83k points