Author
com.sun.tools.javac.Main is not on the classpath With JBOSS
Santosh Raveendran
Ranch Hand
Joined: Jun 29, 2008
Posts: 83
Hi
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 set the below enviorment variables
JAVA_HOME C:\Program Files\Java\jdk1.5.0_04
PATH C:\Program Files\Java\jdk1.5.0_04\bin
and 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
Thanks
SCJP 1.4,SCWCD5, SCBCD5
Thanks, Santhosh
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8147
JAVA_HOME C:\Program Files\Java\jdk1.5.0_04
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.
[My Blog ] [JavaRanch Journal ]
Santosh Raveendran
Ranch Hand
Joined: Jun 29, 2008
Posts: 83
jai
but the same works with tomcat .
thanks
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8147
Please try it once and if it does not work then report back with the details.
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8147
And also try running JBoss from the command prompt first. If it starts up successfully, we then know that the issue is somewhere in Eclipse settings.
Santosh Raveendran
Ranch Hand
Joined: Jun 29, 2008
Posts: 83
jai
i am able to run jboss from command prompt using the JBoss.bat file, but when running from eclipse the issue is coming
thanks
Santosh Raveendran
Ranch Hand
Joined: Jun 29, 2008
Posts: 83
jai
The issue is fixed i had added tools.jar as external jar by editing the installed JRE and its working
thanks for your time
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 5543
posted Mar 22, 2009 23:25:00
0
You might also want to add an SDK to the Installed JREs within Eclipse and use that JDK ar the default JRE for Eclipse.
JBoss In Action
Santosh Raveendran
Ranch Hand
Joined: Jun 29, 2008
Posts: 83
peter
The strange thing is that with tomcat there is no error.
thanks
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 5543
posted Mar 23, 2009 16:09:55
0
That's probably because the warning message you are seeing comes from the JBoss run script.
subject: com.sun.tools.javac.Main is not on the classpath With JBOSS