Tomcat can't compile JSP

Hi,
I'm using Ecliple 2.1 with JBOSS 3.2.2 and Tomcat 4.1.24 on XP
I can separately run JBOSS+Tomcat from command prompt, but when i start them from Eclipse, Tomcat fails to compile very first JSP. (Internal error). From examining error stack trace i see that tomcat tries to create process "javac.exe" with too lengthy classpath. It seems that the classpath is getting truncated.
Has anybody had similar problem?
Thanks in advance,
Leonid.

i guess it is not the too lengthy classpath...
just chek that when u run the application from eclipse.. r u seting the classpath.. and that classpath should not have any spaces in it..
for ex: a directory like c:\program files \ should be as c:\progra~1\..
ot any jar file in the classpath has spaces...
this may be one of the reason that the classpath gets truncated...

Similar Messages

  • Embedded Tomcat Can't Compile JSP from JAR

    I've got a problem that I can't seem to figure out. I hope someone might shed some light on this.
    I have a desktop java application that has Tomcat embedded in it. I'm creating a jar file of just myapp's *.class files and I specify the main-class and classpath in the manifest file. If I execute the jar the following way, it works fine:
    set CLASS_PATH=.;.\myapp.jar;.........all of the required Tomcat classes....;.\lib\anotherLib.jar
    javaw -ea -classpath  %CLASS_PATH%  com.myapp.Application
    But if I try to execute it this way, it runs and starts Tomcat. However, when Tomcat tries to compile a JSP, it can't find packages such as javax.servlet, javax.servlet.jsp, org.apache.jasper.runtime, and so forth.
    I believe It has something to do with the classpath. Does anybody have any ideas?

    i guess it is not the too lengthy classpath...
    just chek that when u run the application from eclipse.. r u seting the classpath.. and that classpath should not have any spaces in it..
    for ex: a directory like c:\program files \ should be as c:\progra~1\..
    ot any jar file in the classpath has spaces...
    this may be one of the reason that the classpath gets truncated...

  • Tomcat won't compile jsps if they are in any directory other than root

    I'm running a new instance of Tomcat, and can't get a simple jsp file to compile, if it's in any directory other than the root.
    The jsp is:
    <%@ page import="test.Simple" %>
    <%@ page contentType="text/html" language="java" %>
    <html>
    <body><%=Simple.makeText()%>
    </body>
    </html>
    and the Simple class is:
    package test;
    import java.util.Random;
    public class Simple {
    public static String makeText() {
    return String.valueOf(new Random().nextInt());
    When I place the jsp in the root directory, it works fine.
    When I place the jsp in any subfolder (eg: /debug/1b.jsp), I get the following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Only a type can be imported. test.Simple resolves to a package
    An error occurred at line: 14 in the jsp file: /1b.jsp
    Generated servlet error:
    Simple cannot be resolved
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    Only a type can be imported. test.Simple resolves to a package
    An error occurred at line: 14 in the jsp file: /1b.jsp
    Generated servlet error:
    Simple cannot be resolved
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Here's the server info:
    Server version: Apache Tomcat/5.5.25
    Server built: Sep 24 2007 11:31:18
    Server number: 5.5.25.0
    OS Name: Linux
    OS Version: 2.6.20.20-071008a
    Architecture: amd64
    JVM Version: 1.5.0_10-b03
    JVM Vendor: Sun Microsystems Inc.
    Using fedora core 6.
    I looked into the Tomcat work directory, and it looked as if the jsp was successfully converted to a java file. I'm not sure where to look, as all the settings are defaults.
    Any help is greatly appreciated. Thanks

    :D :D :D...
    My friend it'd be great idea if you can find google tutorial on TOMCAT/web application basics
    anyways coming back to your problem
    whenever,an application is deployed on tomcat a new folder is being created at the following location %CATILINA_HOME%/webapp/ with respect to application name.
    Therefore try to maintain an architecture like the one below if you programmin any web application.
    %CATILINA_HOME%/webapp/<applicationName>/(place all your .jsp files)
    -----------------%CATILINA_HOME%/webapp/<applicationName>/META_INF/(Place your mainfest files & context specific configuration files)
    -----------------%CATILINA_HOME%/webapp/<applicationName>/WEB_INF/ (Genrally used to save secured files which cannot be access directly and always make sure you prepare a web.xml file associated to the application)
    -----------------%CATILINA_HOME%/webapp/<applicationName>/WEB_INF/lib (place where all your .jar file libraries are being placed)
    -----------------%CATILINA_HOME%/webapp/<applicationName>/WEB_INF/classes (place where all your .class,resource files are being placed as the pacakage structure you have choosed in)
    If this doesnot work even if you ensuring everything's right.Reading through tutorials & speding time on finding resources by yourself would be a great idea.
    I hope there are no hard issue on this. :)
    REGARDS,
    RaHuL

  • Can u Compile JSP into a Servlet?

    Hey,
    I've heard of 'compliling jsp into a servlet.' I'm not sure if this is just reffering to the fact that the jsp/servlet engine does this on the fly when serving a jsp request or if one can actully obtain a .java file out of the jsp without doing it by hand.
    If so, how do you do this??
    THANKS!
    THABARREN

    look in Tomcat's /bin directory for a script called jspc.bat (or jspc.sh) - this can be used from a command line to convert a JSP to a servlet and compile it.
    Alternatively, the web server will have a "working" directory where it puts the servlet files it creates from JSPs (in Tomcat's case it's the "/work" directory). - just look in there after the JSP has been requested by a client.

  • Standalone OC4J can't compile JSPs?

    I've been following this tutorial: http://www.eclipse.org/webtools/community/tutorials/OracleServerAdapter/OracleServerAdapter.html
    in order to get my Eclipse working with my 10.1.3 standalone OC4J server.
    However, every time I try to run the index.jsp page, I get the following error:
    J2EE JSP0008 Unable to dispatch JSP Page : Exception:oracle.jsp.provider.JspCompileException: <H3>Errors compiling:C:\ORACLE\oc4j\j2ee\home\application-deployments\DemoOC4J\DemoOC4J\persistence\_pages\\_index.java</H3><pre></pre>
    I imagine that there's some sort of java path error of some sort but I can't seem to figure out what it would be. I have my JAVA_HOME set to my JDK 1.5 . ( \jdk1.5.0_11 ). Any ideas or pointers as to what I need to do to get this thing going?
    Thanks

    After digging for days, I found this thread:
    OC4J Preview - JSP not problem
    Turns out that Eclipse set it's Java library defaults to the JRE directory and not the JDK. After changing it to the JDK, I've got JSP compilation success!

  • Can't compile JSPs with Forte 4

    I upgraded to forte 4 CE. Now I cannot compile my JSP's because they are not finding my class files.
    They all worked in Forte 3 ce.
    If I have class MyClass()
    and try to create an instance in my JSP
    MyClass mc = new MyClass()
    It gives the 'cannot resolve symbol' error on MyClass object.
    What happened? I haven't changed anything. I have about 10 jsps and a bunch of Classes that all worked and now don't.
    I checked the product support for Forte and couldn't find anything.
    If anybody else had this problem and figured it out please post your solution.
    Thanks.
    -chiranjp

    i am having the same problem using my "homemade" class with forte.
    I have all of the .java and .class files and even have a .jar file but it still cannot find them
    could you please give me more details on how you reached your solution?
    where did you place the files so that forte found them?
    any and all help is greatly appreciated.
    thanks
    -j

  • Can't compile jsp

    Hello all.
    I've searched this forum for four hours,
    I tried many suggestions but still there is no answer to my problem !
    I recently developed a website.
    In a form that I have in my jsp, stepOne.jsp,
    the user need to choose a username.
    His input goes to servlet, "StepOneServlet.class".
    If the user selected a new username (that not appear in the database)
    he will be redirected to stepTwo.jsp.
    If the specific username already exist, the user will be redirected to
    message.jsp.
    According to the address bar in my browser, the redirections work fine,
    and there is no database problem.
    My only problem is :
    In both cases I'm getting the same error page !!!!!!
    When I'm being redirect to message.jsp, I get the page :
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:818)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
         org.apache.jsp.message_jsp._jspService(message_jsp.java:73)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    When I'm being redirect to stepTwo.jsp, I get the page :
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:818)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
         org.apache.jsp.stepTwo_jsp._jspService(stepTwo_jsp.java:99)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    1) I deleted the folder ...\Tomcat 5.5\work many times.
    2) In line 99 (stepTwo_jsp.java) it says :
    if (_jspx_page_context != null) jspxpage_context.handlePageException(t);
    3) In line 73 (message_jsp) it says :
    if (_jspx_page_context != null) jspxpage_context.handlePageException(t);
    I'm now transforming my project from netbeans to tomcat only.
    With netbeans - there are no errors.
    Thank you for your time....
    waiting for your replays.

    I am getting same error
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    root cause
    java.lang.NullPointerException
         org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)
         org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:818)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
         org.apache.jsp.doLogin_jsp._jspService(doLogin_jsp.java:228)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
    Apache Tomcat/5.5 I am running server with mysql database on a linux machine and this error happens every morning but when I restart the tomcat process it just disappears until next morning, seems it is fine as long as it used constantly.
    Has anyone got an idea what is it?

  • Can't compile jsp under sun application server

    im trying to make my first web app using sun java system application server and the server says that cant find "tools.jar" and it give me some explanation of the issue, but i cant solve it. i was in the same trouble when using tomcat but i could solve the problem copying tools.jar under the common/lib tomcat's directory, but under sun java system application server where do i have to copy that archive??, is it necesary??
    thanks for your help!!...

    You have to put it in the classpath of the webserver if it's anything like IPlanet.
    You need admin permissions for that.

  • Compile JSP in JCreator

    Hi,
    First of all, Can I compile JSP in JCreator? If yes, what configuration do I need to make with Java compiler.
    At moment, I have JCreator V4.0Pro installed. It does not compile my JSP files at all.
    Thanks
    Song

    hai..
    first you have create web project
    there you have to create new jsp file ..
    view help in jcreater there you can find the demo how to create a web project and deploy it...
    here are some sites where you get some idea for web project structure
    http://csjava.occ.cccd.edu/java-setup/jcreator.html
    http://www.cutthebull.com/jsp.html
    bye priya

  • Can not compile the jsp in Tomcat 4

    Hello anyone
    Now I use jdk1.4 and Tomcat 4.0.4, and put in the directory d:\j2sdk and d:\tomcat. Even I set the classpath as follow, I still compile jsp.
    SET CLASSPATH=.;D:\j2sdk\lib\tools.jar;D:\tomcat\common\lib\servlet.jar
    but at before, i can run it at Tomcat 3.2.
    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
    D:\tomcat\work\Standalone\localhost\_\userCounter$jsp.java:4: Class or interface declaration expected.
    import javax.servlet.*;
    ^
    D:\tomcat\work\Standalone\localhost\_\userCounter$jsp.java:10: Superclass org.apache.jsp.HttpJspBase of class org.apache.jsp.userCounter$jsp not found.
    public class userCounter$jsp extends HttpJspBase {
    ^
    2 errors, 1 warning
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
         at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)
    pls help, thank you very much!

    This is a new problem with jdk1.4 when compiling with tomcat.
    The solution is to ensure that any classes in WEB-INF/classes are in a package structure and the relevant jsp calls the same using the package name.
    best
    kev

  • How to pre-compile jsp and deploy to tomcat

    Hi All,
    I wuld like to know how to pre-compile JSPs and deploy to tomcat. I am using ANT tool to build and deploy the war file.
    Thanks in Advance.
    Regards,
    --Nagesh.                                                                                                                                                                                                                                                                                                                                               

    for Tomcat 5.0 (You'll need to edit to fit your needs)
        <path id="jsp.classpath">       
            <!-- point classpath to directory containing jasper-compiler.jar and
                   jasper-runtime.jar -->
            <fileset dir="C:\tomcat\common\lib">
                <include name="**/*.jar"/>
            </fileset>
            <fileset dir="C:/tomcat/common/endorsed">
                <include name="**/*.jar"/>
            </fileset>       
        </path> 
        <target name="jsp" >
        <!--
             The Ant JSPC task doesn't work with Tomcat 5.0
             so in the meantime we need to define our own task.
          -->
        <taskdef name="jspc50" classname="org.apache.jasper.JspC">
            <classpath>
                    <path refid="jsp.classpath"/>    
            </classpath>
        </taskdef>
        <jspc50 outputDir="${build.classes}"
                package="jsp"
                uriroot="${project.dir}/web/webApp"
                webXmlFragment="c:/web.xml"
                verbose="9"
                validateXml="false">           
        </jspc50>
        <javac srcdir="${build.classes}/jsp"
               destdir="${build.classes}"
               debug="true"
               optimize="false"
               includes="**/*.java"
               source="1.4">
                <classpath>
                    <path refid="classpath"/>
                    <path refid="jsp.classpath"/>
                </classpath>          
        </javac>
    </target>    More information can be found here :
    http://www.onjava.com/pub/a/onjava/excerpt/AntTDG_chap8/index1.html?page=last

  • Where can I find compiled JSP?

    is this a FAQ?
              when I drop a jsp into the web app docroot, I invoke it and it works.
              Where can I find the compiled .class file for this JSP? Also, it is
              possible to specify to weblogic to preserve the Java source also?
              in v70, I recall the compiled JSPs being put into a temp directory. I
              haven't found that temp in my v81b install.
              Thanks,
              -Dino
              

    If you just drop jsp into the running webapp, the classfiles go into
              $SERVER/.wlnotdelete
              For example on my box:
              ./myserver/.wlnotdelete/extract/myserver_simpleEAR_web/jsp_servlet/__bar.cla
              ss
              Muthu is correct about the snippet to make the server "keep" the .java
              files, you can also turn this on in the console under webapp --> Descriptor.
              Cheers
              mbg
              "Muthu" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi dino,
              >
              > Normally the java source files generated will be deleted after
              compilation. If
              > u want to keep the java source code files u have to specify the following
              tag
              > in the weblogic.xml
              >
              > <jsp-descriptor>
              > <jsp-param>
              > <param-name>keepgenerated</param-name>
              > <param-value>true</param-value>
              > </jsp-param>
              > </jsp-descriptor>
              >
              > --Muthu
              >
              > "dc" <[email protected]> wrote:
              > >is this a FAQ?
              > >
              > >when I drop a jsp into the web app docroot, I invoke it and it works.
              > >Where can I find the compiled .class file for this JSP? Also, it is
              > >possible to specify to weblogic to preserve the Java source also?
              > >
              > >in v70, I recall the compiled JSPs being put into a temp directory.
              > >I
              > >haven't found that temp in my v81b install.
              > >
              > >Thanks,
              > >
              > >-Dino
              > >
              > >
              >
              

  • JSP Can't compile

    Using OC4J 9.03
    Launching OC4J as standalone server, noone JSP can be compiled because a NoClassDefFoundError for the class
    sun/tools/javac/Main.
    I copied in the j2ee\home directory the tools.jar file, that include this class, but the problem persists.
    All the environmente variables (JAVA_HOME, J2EE_HOME, CLASSPATH and so on) are properly (I hope) setted.
    Has someone any suggestion?
    Thanks

    Is the "JAVA_HOME" variable pointing to a JDK distribution, or a JRE?

  • Can't compile.

    Hi,
    I was a VB developer and started to develop using java recently.
    I had to do some modification in a existing java project uses tomcat as the web server. I'm using Jbuilder 9 toas my editor. what I'm doing is open files using jbuilder and do the modification. I did couple of changes in my jsp files and those changes are working fine. Recently I had to do a modification in one of .java file. So I opened the file using Jbuilder and did the modification. then when I tried to compile the file It gave a lot of errors. when i run the site without the change i did to .java file it's working perfectly.
    most of the error like.
    <file name>.package <path> doesnot exist at line <line number>, column<column number>
    but those files exist in relavant folders reffered and i think when i'm compiling the .java file it can't refer those files.
    How can I compile my .java file and make the .class file.
    Thanks in advance.

    hi arijit_datta,
    Here I list down couple of errors I got when trying to compile.
    "LeaveApplication.java": package com.HRM.eLeave.dbhandle does not exist at line 3, column 35
    "LeaveApplication.java": package com.HRM.eLeave.util does not exist at line 11, column 1
    "LeaveApplication.java": cannot resolve symbol: class Environment in class com.HRM.eLeave.leaveApplication.LeaveApplication at line 31, column 72
    "LeaveApplication.java": cannot resolve symbol: class Environment in class com.HRM.eLeave.leaveApplication.LeaveApplication at line 397, column 19

  • How to Compile Jsp File in Class File , Protect my JSP from outworld

    Hello Friends
    My name is chandra prakash, I'm new for u. I've develop a web based software completely in JSP, some files are also written in Java Script. This software have aprox. 40 files --> 30 in JSP + 2 in Java Script + 8 image files .
    Each JSP calls another. and run this on 58 clints machine simultaneusly. we used Oracle 9iAS as back end and Oracle9iAS web Server . Where we found less clients like 20-30 we use Tomcat 5.0 web server .Sir problem is this we don't wan't to leave our jsp source code on server.
    Is any method or third party tool by which we can convert our JSP source file in CLASS file as like real class files provide by javac.
    For this perpose we make a folder and put all files in it. Create a context on Tomcat for this folder.Create a data source for this in tomcat. Bcase this program uses Data source and connect many times to database & fetches many type of data from database. We use servlet files of tomcat for this context in WORK folder of Tomcat. and after that rename our Source file Folder. and again run our program through batch file i'm strange program runs 2-3 steps, after few times it start producing errors.
    Sir do u hava work on this field can u help me to protect this JSP source code.
    I've Use Jikes.com compiler but not get any succes, It may be i'm not using correctly .
    Pls sir give me any suggesition.
    Chandra prakash

    1. Highlight your web project or the individual file
    2. Right click
    3. Select Rebuild to build all jsp files or Make to rebuilt only changed files

Maybe you are looking for