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

1 vote
2 answers 555 views
555 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
2 answers 531 views
531 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
0 votes
1 answer 25 views
25 views
Any suggestions?
asked Dec 28, 2020 TeamScript 13.5k points
0 votes
1 answer 12 views
0 votes
1 answer 14 views
14 views
Problem: I am trying to set up a maven for my project and I am getting this error
asked Feb 17 TeamScript 13.5k points
0 votes
1 answer 17 views
17 views
Problem the environment variable java_home does not point to a valid jvm installation
asked Feb 9 charles mathews 3.8k points
0 votes
1 answer 16 views
16 views
Problem: I've followed step by step the official Getting Started. I started from a clean linux install and installed everything required as per the "Building Projects with Native Code" tab. I have also read the troubleshooting section. I've already created the project using the terminal. This is the error when I run react-native run-android:
asked Feb 15 Ali 4.4k points
1 vote
1 answer 2.2K views
2.2K 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 12 views
12 views
Problem: I am trying to load the rJava using the command: library(rJava) But I get the following error: Error : .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry Error: package or ... both the Java and the R program with the latest versions but still get these errors.. May I know how I can resolve this?
asked Feb 17 Ali 4.4k points
0 votes
1 answer 13 views
13 views
Problem: I have set JAVA_HOME in my system C:\Program Files\Java\jdk1.8.0_ 131\bin; and I am trying to run cordova command( cordova build ) on command prompt, but I'm getting the error bellow. I have tried all the ways, but not able to resolve this issue: Please, set the JAVA_HOME variable in your environment to match the location of your Java installation.
asked Feb 14 Ali 4.4k points