- This topic has 5 replies, 2 voices, and was last updated 21 years, 4 months ago by Scott Anderson.
-
AuthorPosts
-
sitomaniaMemberHello,
My problem is when I try to visualize a JSP page I get the follow error:
SCHWERWIEGEND: Javac execption
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
at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:139)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:835)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:395)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:460)
at org.apache.jasper.compiler.Compiler.compile…...
.10.07.2003 12:53:11 org.apache.jasper.compiler.Compiler generateClass
SCHWERWIEGEND: Error compiling file: C:\jakarta-tomcat-5.0.3\work\Catalina\localhost\Cafev1\org\apache\jsp\index_jsp.java [javac] Compiling 1 source file10.07.2003 12:53:11 org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP….I have installed on my system:
-Jakarta Tomcat 5.0.3
-Coccoon 2.0.3 ( build with JDK 1.4 )
-sdk 1,4
-Eclipse 2.1I can not execute any JSP because I always get this error.
I also have two more problems:
Where can I place my java beans classes so I can access then from my web project. I tried to place them under \Web-root\web-inf but they are deleted from there.
Also I good like to know if i can use cocoon with myeclipse and how to configure it.
Thanks in advance
Jesus B.
Scott AndersonParticipantI can not execute any JSP because I always get this error.
Please see this thread: https://www.genuitec.com/forums/topic/unable-to-find-a-javac-compiler-with-tomact-launcher/
Where can I place my java beans classes so I can access then from my web project. I tried to place them under \Web-root\web-inf but they are deleted from there.
You should place them in your web project’s source directory. They’ll automatically be compiled to WEB-INF/classes, which is where you want them to be.
Also I good like to know if i can use cocoon with myeclipse and how to configure it.
We don’t do anything to prevent you from using Cocoon, but I have no first-hand experience on configuring it. Anyone else?
–Scott
MyEclipse Support
sitomaniaMember@scott wrote:
I can not execute any JSP because I always get this error.
Please see this thread: https://www.genuitec.com/forums/topic/unable-to-find-a-javac-compiler-with-tomact-launcher/
Where can I place my java beans classes so I can access then from my web project. I tried to place them under \Web-root\web-inf but they are deleted from there.
You should place them in your web project’s source directory. They’ll automatically be compiled to WEB-INF/classes, which is where you want them to be.
Also I good like to know if i can use cocoon with myeclipse and how to configure it.
We don’t do anything to prevent you from using Cocoon, but I have no first-hand experience on configuring it. Anyone else?
–Scott
MyEclipse SupportScott,
I follow the thread but I found no solution for my problem, my tomcat JRE points to the java home directory. I try to include tools.jar and I keep getting the same error. What can I do ?
Jesus B.
Scott AndersonParticipantWell, the problem is definately that for whatever reason tools.jar is not on your classpath.
Open the preference page MyEclipse->AppServers->Tomcat->JDK is the configured JDK truly a full JDK, or just a JRE? Does the home directory it points to have a subdirectory called ‘jre’? What version of JDK is it (java –version)?
Now look at the MyEclipse->AppServers->Tomcat->Paths preference page. Does the fully qualified path to tools.jar show up in the ‘Append to Classpath’ box?
If that all checks out, (I hate to ask this but I will since I’ve seen it before), are you launching Tomcat using the Tomcat->Start toolbar option? Believe it or not, some people still try to use their startup script and expect it to work.
Going through all that should lead you to what’s wrong. Again, it’s definately a classpath issue so this should clear it up.
–Scott
MyEclipse Support
sitomaniaMemberScott,
IT WORKS, JUUUUUUJUUUUU!!! 😀
I did not set up the Append to classpath box.
I am using the SDK 1.4, is it problematic ?
Thanks for oyour help,
Scott AndersonParticipantIT WORKS, JUUUUUUJUUUUU!!! 😀
Excellent! Enjoy source-level JSP debugging. 🙂
I am using the SDK 1.4, is it problematic ?
Nope, that’s what we recommend so that hotswap code replacements will work as you modify your executing java code.
–Scott
MyEclipse Support -
AuthorPosts