Anton: JAVA_HOME setzen

Dear forum,

Tomcat 5.0.28 is installed in:
C:\Programme\Apache Software Foundation\Tomcat 5.0

I set the CATALINA_HOME to C:\Programme\Apache Software Foundation\Tomcat 5.0

Now I saw different versions of how to set up the java_home variable. There are 2 java directories. Which one should i use.

There is:

  1. c:\j2sdk1.4.2_05

and

  1. c:\programs\java\j2re1.4.1_03

I have been playing around with the setup for the last 4 hours. I can not get it to work. Whenever I try to run a simple jsp file I get:

oot cause

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
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

  1. Hallo,

    hmm... du hättest dir schon die mühe geben können deine Crossposting ins Deutsche zu übersetzen.

    Now I saw different versions of how to set up the java_home variable. There are 2 java directories. Which one should i use.
    I have been playing around with the setup for the last 4 hours. I can not get it to work. Whenever I try to run a simple jsp file I get:

    oot cause

    Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.

    Du brauchst die tools.jar.
    Diese findest du in der "Java 2 SDK, Standard Edition" im verzeichniss "lib" oder im "Java(TM) 2 Platform, Enterprise Edition 1.4 SDK" im Verzeichnis jdk/lib".
    Wenn du keine tools.jar auf deinem Rechner hast, muss du eine der entsprechenden Java-software installieren und JAVA_HOME entsprechend setzen.
    (Dann kannst du als alternative tools.jar auch in deinem tomcat "shaderd/lib" kopieren)

    Grüße
    Thomas