Javac compiler problems

whenever i try to execute the javac compiler the cmd window comes up and then disappears... im not sure what the problem is

You need to open a console window, and use javac from there.
Start here
http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html
for info on how to call javac. If anything goes wrong, you will get to see an error message, which you can post back here.
This may also be useful to read if you get stuck:
http://java.sun.com/developer/onlineTraining/new2java/index.html

Similar Messages

  • Javac compilation problem ??

    Hi,
    I have a SampleTest.java file in /WEB-INF/classes/com/data folder. Similarly i have another file called TestData.java file in the same /WEB-INF/classes/com/data folder.
    Where in TestData.java file i am creating the instance of the SampleTest.java like:-
    package com.data;
    public class TestData{
    SampleTest test=new SampleTest();
    Here when i try to compile this program i am getting an error
    " *Class com.data.SampleTest not found*." Eventhough both files are in the same package.Both of them are public classes also. Please do provide a solution for this ..Since this is really urgent ..
    Thanx,
    JavaCrazyLover

    Have you double and triple-checked your spelling? If so, then I'd suggest that you show us your code. We don't want to see all of it, but rather you should condense your code into the smallest bit that still compiles, has no extra code that's not relevant to your problem, but still demonstrates your problem, in other words, an SSCCE (Short, Self Contained, Correct (Compilable), Example). For more info on SSCCEs please look here:
    http://homepage1.nifty.com/algafield/sscce.html
    Remember, the code must be compilable and runnable for us to be able to understand it fully.
    Also, when posting your code, please use code tags so that your code will be well-formatted and readable. To do this, either use the "code" button at the top of the forum Message editor or place the tag [code] at the top of your block of code and the tag [/code] at the bottom, like so:
    [code]
      // your code block goes here.
    [/code]good luck, pete

  • Cannot find javac compiler

    I have recently installed apache tomcat and the J2SE SDk on my windows machine and have managed to get tomcat to run. However, when i try to test a jsp page I get an error saying ii cannot find the javac compiler. The error I amgetting is shown below.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
         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)
    root 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)
    I have checked my environment variables that I set up and I cannot finad anything wrong with them as they all seem to point to the right directory. Here are my environment variables.
    CLASSPATH = C:\jdk1.5.0_02\lib\tools.jar;C:\Servers\Tomcat 5.0\common\lib\servlet-api.jar;C:\Servers\Tomcat 5.0\common\lib\jsp-api.jar
    JAVA_HOME = C:\jdk1.5.0_02
    PATH = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\ATI-CPanel;C:\Program Files\Pragma\Clients;C:\Program Files\MySQL\MySQL Server 4.1\bin;C:\jdk1.5.0_02\bin
    Does anyone have any idea what the problem could be? Any solutions would be much appreciated.
    Thanks

    I have recently installed apache tomcat and the J2SE SDk on my windows machine and have managed to get tomcat to run.
    the error i have got is 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
         at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
         at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:282)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:536)
    Does anyone have any idea what the problem could be? Any solutions would be much appreciated.
    Thanks

  • Exception in thread "main" java.lang.Error: Unresolved compilation problem

    The following code:
         public boolean find(MusbachJ_Person person,BstNode node)
              //p.l(person);p.l(node.intData);
              if(node.intData.compareTo(person)==0)
                   return true;
              if( node.leftNode != null ) find(person,node.leftNode );
              if( node.rightNode != null ) find( person, node.rightNode);
              else
                   return false;
         }returns the following compilation error:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
         This method must return a result of type boolean
         at MusbachJ_TreeNode.find(MusbachJ_TreeNode.java:32)
         at MusbachJ_PeopleTree.main(MusbachJ_PeopleTree.java:91)
    But I don't understand, the else statement is right there, what more does it want? Thanks! :)

    John_Musbach wrote:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem: Unresolved compilation problem is an error that you'll only ever see if you're using an IDE. If you used the javac compiler, then you would have seen that the code doesn't even compile.
    The reason (as others have pointed out) is, that some paths through your method don't return a value.
    I'll re-write your code in the code-style that I usually use, because then it might be easier for you to see the problem:
    public boolean find(MusbachJ_Person person,BstNode node)
         if(node.intData.compareTo(person)==0) {
              return true;
         if( node.leftNode != null ) {
              find(person,node.leftNode );
         if( node.rightNode != null ) {
              find( person, node.rightNode);
         else {
              return false;
    }There are two prolbems. I'll spell out the first and let the other one for you to find:
    1.) you don't do anything with the return-values of the find-methods you are calling. What do you want to do with them?
    2.) What do you return if the current node is not the one that you want and you've got a right node?

  • Error- deploymnt fails - ORABPEL-00016 & 05215- Javac compiler config err

    Hi,
    We are getting the below error randomly when we try to deploy..
    ORABPEL-00016
    Javac compiler configuration error.
    Failed to execute javac compiler on file(s) "/opt/oracle/soa/bpel/domains/default/tmp/.bpel_XXXXXX_1.0_3c2c050b949f081557b49d81a3e5fe35.tmp/BPEL-INF/src/bpel/XXXXXl/BPEL_BIN.java". Exception reported is:
    Please verify that javac compiler is installed on this machine and is included in the classpath (check that "tools.jar" in particular is in the classpath).
    ORABPEL-05215
    Error while loading process.
    The process domain encountered the following errors while loading the process "XXXXX" (revision "1.0"): Javac compiler configuration error.
    Failed to execute javac compiler on file(s) "/opt/oracle/soa/bpel/domains/default/tmp/.bpel_XXXXXXl_1.0_3c2c050b949f081557b49d81a3e5fe35.tmp/BPEL-INF/src/bpel/XXXXXl/BPEL_BIN.java". Exception reported is:
    Please verify that javac compiler is installed on this machine and is included in the classpath (check that "tools.jar" in particular is in the classpath).
    and a huge stack trace...
    Everything in the server.xml seems to be in the path... its getting fixed after a recycle.... we are able to deploy the same BPEL once recycled...
    Does any one of you encounter same problem.. Whts the reason why this is occuring?
    Thanks,
    Jayaprakash

    Hi Jp,
    The error message : Please verify that javac compiler is installed on this machine and is included in the classpath (check that "tools.jar" in particular is in the classpath).
    This means that you javac compiler might not be installed or not in the classpath entry. You might want to compile the bpel project using the JDev and then deploy.
    Cheers
    A

  • Error- deployments fails-ORABPEL-00016 & 05215-Javac compiler config err

    Hi,
    We are getting the below error randomly when we try to deploy..
    ORABPEL-00016
    Javac compiler configuration error.
    Failed to execute javac compiler on file(s) "/opt/oracle/soa/bpel/domains/default/tmp/.bpel_XXXXXX_1.0_3c2c050b949f081557b49d81a3e5fe35.tmp/BPEL-INF/src/bpel/XXXXXl/BPEL_BIN.java". Exception reported is:
    Please verify that javac compiler is installed on this machine and is included in the classpath (check that "tools.jar" in particular is in the classpath).
    ORABPEL-05215
    Error while loading process.
    The process domain encountered the following errors while loading the process "XXXXXX" (revision "1.0"): Javac compiler configuration error.
    Failed to execute javac compiler on file(s) "/opt/oracle/soa/bpel/domains/default/tmp/.bpel_XXXXXXl_1.0_3c2c050b949f081557b49d81a3e5fe35.tmp/BPEL-INF/src/bpel/XXXXXl/BPEL_BIN.java". Exception reported is:
    Please verify that javac compiler is installed on this machine and is included in the classpath (check that "tools.jar" in particular is in the classpath).
    and a huge stack trace...
    Everything in the server.xml seems to be in the path... its getting fixed after a recycle.... we are able to deploy the same BPEL once recycled...
    Does any one of you encounter same problem.. Whts the reason why this is occuring?
    Thanks,
    Jayaprakash

    Hi Jp,
    The error message : Please verify that javac compiler is installed on this machine and is included in the classpath (check that "tools.jar" in particular is in the classpath).
    This means that you javac compiler might not be installed or not in the classpath entry. You might want to compile the bpel project using the JDev and then deploy.
    Cheers
    A

  • Compile error : "unable to find javac compiler"

    Hello,
    I've got this problem compiling my java project: the error that I get is :
    Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.5.0_05\lib\tools.jar
    init:
    compile:
    [javac] Compiling 9 source files to H:\project\class
    BUILD FAILED
    H:\project\build.sml:8: Unable to find a javac compiler;
    com.sun.tools.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to th JDK
    I'm using the following product:
    a)     MySQL Database: mysql-4.1.13a-win32.zip (http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-4.1.13a-win32.zip/from/pick)
    b)     MySQL JDBC driver: mysql-connector-java-3.1.10.zip (http://dev.mysql.com/downloads/connector/j/3.1.html )
    c)     JBuilder 2005: http://www.borland.com/downloads/download_jbuilder.html
    d)     Jakarta Ant: apache-ant-1.6.5-bin.zip (http://ant.apache.org/bindownload.cgi)
    In the C:\Program Files\JAVA map are the following maps:
    - jdk1.5.0_05
    - jre1.5.0_05
    the settings in windows:
    ANT_HOME C:\java\apache-ant-1.6.5
    JAVA_HOME C:\Program Files\Java\jdk1.5.0_05
    And I have added ;C:\java\apache-ant-1.6.5\bin; to the PATH
    Why doesn't it work ? And more important, How can I fix it ?
    Thanks
    Nick

    Hello,
    I've got this problem compiling my java project: the error that I get is :
    Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.5.0_05\lib\tools.jar
    init:
    compile:
    [javac] Compiling 9 source files to H:\project\class
    BUILD FAILED
    H:\project\build.sml:8: Unable to find a javac compiler;
    com.sun.tools.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to th JDK
    I'm using the following product:
    a)     MySQL Database: mysql-4.1.13a-win32.zip (http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-4.1.13a-win32.zip/from/pick)
    b)     MySQL JDBC driver: mysql-connector-java-3.1.10.zip (http://dev.mysql.com/downloads/connector/j/3.1.html )
    c)     JBuilder 2005: http://www.borland.com/downloads/download_jbuilder.html
    d)     Jakarta Ant: apache-ant-1.6.5-bin.zip (http://ant.apache.org/bindownload.cgi)
    In the C:\Program Files\JAVA map are the following maps:
    - jdk1.5.0_05
    - jre1.5.0_05
    the settings in windows:
    ANT_HOME C:\java\apache-ant-1.6.5
    JAVA_HOME C:\Program Files\Java\jdk1.5.0_05
    And I have added ;C:\java\apache-ant-1.6.5\bin; to the PATH
    Why doesn't it work ? And more important, How can I fix it ?
    Thanks
    Nick

  • Error  "unable to find javac compiler"

    Hello,
    I've got this problem compiling my java project: the error that I get is :
    Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.5.0_05\lib\tools.jar
    init:
    compile:
    [javac] Compiling 9 source files to H:\project\class
    BUILD FAILED
    H:\project\build.xml:8: Unable to find a javac compiler;
    com.sun.tools.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK
    I'm using the following products:
    a) MySQL Database: mysql-4.1.13a-win32.zip (http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-4.1.13a-win32.zip/from/pick)
    b) MySQL JDBC driver: mysql-connector-java-3.1.10.zip (http://dev.mysql.com/downloads/connector/j/3.1.html )
    c) JBuilder 2005: http://www.borland.com/downloads/download_jbuilder.html
    d) Jakarta Ant: apache-ant-1.6.5-bin.zip (http://ant.apache.org/bindownload.cgi)
    In the C:\Program Files\JAVA map are the following maps:
    - jdk1.5.0_05
    - jre1.5.0_05
    the settings in windows:
    ANT_HOME C:\java\apache-ant-1.6.5
    JAVA_HOME C:\Program Files\Java\jdk1.5.0_05
    And I have added ;C:\java\apache-ant-1.6.5\bin; to the PATH
    Why doesn't it work ? And more important, How can I fix it ?
    Thanks
    Nick

    Duplicate of http://forum.java.sun.com/thread.jspa?threadID=687035

  • Ant Build Error - Unable to find a javac compiler

    I downloaded and installed the Sun Java Toolkit 1.0 for CDC. I can build and run the examples with no problem.
    When I create my own project -- either by using the Create from Example option or the Create a New Project from Scratch option, I consistently receive this error message:
    C:\CDCTK10\apps\JillianGolfHandset\nbproject\build-impl.xml:295: The following error occurred while executing this line:
    C:\CDCTK10\apps\JillianGolfHandset\nbproject\build-impl.xml:148: 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
    BUILD FAILED (total time: 0 seconds)
    Unfortunately, I'm not an Ant jock.
    I'd like to go fiddling with the JAVA_HOME environmental variable on my system, but something tells me I shouldn't have to touch it; why would the examples work if JAVA_HOME weren't set properly?
    Any ideas?

    I had the JDK installed and the JAVA_HOME set correctly to point to the JDK but it still gave the same error.
    As I'm using Windows, I thought the problem may have been the spaces in the JAVA_HOME path, so I changed it to the old DOS style path e.g with the ~1. But that didn't work
    Someone else suggested adding the JDK bin to the PATH, so I did that, but it didn't fix the problem.
    Doing a search on the web, someone else using ANT had a similar problem, though not with the CDC, and added the tools.jar to the classpath
    So I tried adding tool.jar to the classpath, and it worked !!
    There is probably a better solution, but I couldn't find it, so I'll stick with this one until someone comes up with a better fix

  • Antinstaller - unable to find javac compiler

    Hi all,
    am using antinstaller to deploy an application. The application which I want to
    deploy has its own build file it has targets like clean, build, warfile etc. Its is working fine if an using ant from command prompt. but if I use ant installer
    and call this build.xml using the
    <ant dir="some dir" target="build" />
    then when ant installer runs as it comes to this line it give me error that
    Unable to find javac compiler com.sun.tools.javac.Main is not on the classpath
    perhaps JAVA_HOME does not point to the JDK.
    As I have already set JAVA_HOME to the jdk dir and PATH variable to
    %JAVA_HOME%\bin.
    Am not getting where the problem is - any suggestion is helpful.

    sorry, I forgot to add fork="true" to <javac> task

  • JSP Compilation Problems With JSTL tags

    My JSP worked well when I used JSP expressions, scriptlets, .... I tried to use JSTL instead and encountered some compilation problems. I am unable to see my mistakes and need help:
    Problme #1:
    int offset = 0;
    try
       <c:set var="offset" value="${requestScope.offset}" />
    catch ( Exception e )
        // do nothing
    }The above code has two compilation errors:
    Generated servlet error:
    [javac] Compiling 1 source file
    illegal start of expression
    <c:set var="offset" value="${requestScope.offset}" />
    ^
    Generated servlet error:
    ';' expected
    <c:set var="offset" value="${requestScope.offset}" />
    ^
    Problem #2:
    <c:set var="threadBean" value="${requestScope.ThreadBean}" />
    int threadID_int = ParamUtil.getParameterInt( request, "thread" );
    <c:if test="${threadBean.threadID} != threadID_int">
        throw new AssertionException( "The two threadID are not the same." );
    </c:if>Generated servlet error:
    illegal start of expression
    <c:if test="${threadBean.threadID != threadID_int}">
    ^

    I have deleted the Java code around the JSTL tags. Now, what is wrong with this <c:if test=" ... "> tag? It seems that I have problems to get JSTL tags right.
    It seems that I have problems to get JSTL tags right....
    <c:if test="${attachBean.attachMimeType.startsWith('image/')}">
         <html:img page="getattachment?attach=<c:out value='${attachBean.attachID}' />" alt="<c:out value='${attachBean.attachFilename}' />" title="<c:out value='${attachBean.attachFilename}' />" border="0" />
    </c:if>error message:
    74: tag = 'if' / attribute = 'test': An error occurred while parsing custom action attribute "test" with value "${attachBean.attachMimeType.startsWith('image/')}": Encountered "(", expected one of ["}", ".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&", "or", "||"]

  • How does javac compile .java files?

    I dont know exactly what classpath javac uses to compile java files. i have set classpath to only tools.jar . and it compiles fine. i thought all standard java class files are present in tools.jar. But... when i opened tools.jar i didnt find most of the class files i expected to see there. In fact there was no java.lang, java.io ... so on packages in it. then how is that compiler compiled ? Of course i found rt.jar under jre/lib, which contained all the mentioned packages...but then i didnt give it in the classpath.
    Any body pls clear my doubts.

    Check out the doc "how classes are found" in the tool
    docs, it will explain how classes are found in
    detail.
    tool docs:
    http://java.sun.com/j2se/1.3/docs/tooldocs/tools.html
    I read the docs and understood that javac.exe loads dt.jar before it could compile .java files. but then what is the use of giving tools.jar in classpath.. i ve seen javac giving problems without it.

  • How do I see javac compiler errors during JSP precompile?

              I played with all the options that "weblogic.jspc"
              supports. I couldn't get the javac compiler errors to
              show up when there is a problem with the generated
              Java file.
              Interestingly the same JSP when compiled automatically
              by the weblogic server, the javac errors show up in
              the output.
              Any tricks? or ideas?
              thanks
              

              In WL 5.1, earlier service packs would sometimes not show the errors. Get sp6 or later.
              mike
              "Mahesh Vellanki" <[email protected]> wrote:
              >
              >
              >I played with all the options that "weblogic.jspc"
              >supports. I couldn't get the javac compiler errors to
              >show up when there is a problem with the generated
              >Java file.
              >
              >Interestingly the same JSP when compiled automatically
              >by the weblogic server, the javac errors show up in
              >the output.
              >
              >Any tricks? or ideas?
              >
              >thanks
              >
              

  • Re: [iPlanet-JATO] sp3 jsp compiler problem

    Weiguo,
    First, Matt is correct, the regular expression tool is perfect for general text
    substitution situations, and as a completely independent tool its use is not
    restricted to migration situations (or file types for that matter).
    Second, I sympathize with the unfortunate trouble you are experiencing due to
    Jasper's (perhaps more strict) compilation, but in what way did the iMT
    automated translation contribute to these inconsistencies that you cited?
    1. Changed the case of the tag attribute to be the same as what's
    defined in tld.
    example: changed OnClick to onClick
    The iMT does not generate any OnClick or onClick clauses per se. In a
    translation situation, the only way "OnClick" would have been introduced was if
    it had been part of the pre-existing project's "extraHTML" (which was written
    by the original customer and just passed through unchanged by the iMT) or if it
    was added manually by the post-migration developer.
    2. Removed attributes which are not defined in tld.
    example: escape attribute only defined in three tags
    but in some pages, it's used although it's not defined as an
    attribute
    of certain tags. The jasper compiler doesn't like it.Can you give soem examples? Is there a definite pattern? Again, this might be
    similar to the OnClick situation described above?
    3. In an end tag, there can't be any space.
    example: </content > doesn't work. </content> works.
    Again, the content tag would never have been generated by the iMT. There was no
    equivalent in the NetDynamics world, so any content tags in your code must have
    been introduced by your developers manually. Its a shame that jasper is so
    particular, but the iMT could not help you out here even if we wanted to. The
    constants that are used by the iMT are defined in
    com.iplanet.moko.jsp.convert.JspConversionConstants. From what I can see, the
    only situation of a closing tag with any space in it is
    public static final String CLOSE_EMPTY_ELEMENT = " />";
    But that should not cause the type of problem you are referring to.
    Mike
    ----- Original Message -----
    From: Matthew Stevens
    Sent: Thursday, September 06, 2001 10:16 AM
    Subject: RE: [iPlanet-JATO] sp3 jsp compiler problem
    Weiguo,
    Others will chime in for sure...I would highly recommend the Regex Tool from
    the iMT 1.1.1 for tackling this type of problem. Mike, Todd and myself have
    posted to the group (even recently) on directions and advantages of creating
    your own RULES (rules file) in XML for arbitary batch processing of source.
    matt
    -----Original Message-----
    From: weiguo.wang@b...
    [mailto:<a href="/group/SunONE-JATO/post?protectID=125056020108194190033029175101192165174144234026000079108238073194105057099246073154180137239239223019162">weiguo.wang@b...</a>]
    Sent: Thursday, September 06, 2001 12:25 PM
    Subject: [iPlanet-JATO] sp3 jsp compiler problem
    Matt/Mike/Todd,
    We are trying to migrate to sp3 right now, but have had a lot of
    issues with the new jasper compiler.
    The following workaround has been employed to solve the issues:
    1. Changed the case of the tag attribute to be the same as what's
    defined in tld.
    example: changed OnClick to onClick
    2. Removed attributes which are not defined in tld.
    example: escape attribute only defined in three tags
    but in some pages, it's used although it's not defined as an
    attribute
    of certain tags. The jasper compiler doesn't like it.
    3. In an end tag, there can't be any space.
    example: </content > doesn't work. </content> works.
    As I see it, we have two options to go about solving this problem:
    1. Write a script which will iterate through all the jsp files and
    call jspc on them. Fix the errors manually when jspc fails. Jspc will
    flag the line number where an error occurs.
    2. Write a utility which scans the jsp files and fix the errors when
    they are encountered. We should define what's an error and how to
    correct it. It's best if we combine this with solution 1 since we
    might miss an error condition.
    Actually, there might be another option, which is seeking help from
    you guys since you have better understanding of JATO and iAS. Can you
    do anything to help us?
    We would be happy to hear your thoughts.
    At last, I would like to suggest modifying the moko tool so that
    these rules are enforced and the generated JSPs work with the new
    compiler. This is for the benefit of any new migration projects.
    Thanks a lot.
    Weiguo
    [email protected]
    Choose from 1000s of job listings!
    [email protected]
    [Non-text portions of this message have been removed]

    Thanks a lot Matt and Mike for your prompt replies.
    I agree completely that iMT doesn't introduce the inconsistencies.
    About the three cases I mentioned, the third one happens only in
    manually created JSPs. So it has nothing to do with iMT. The first
    two are mainly due to the existing HTML code, as you rightly pointed
    out.
    The reason I made the suggestion is since we know that case 1 and 2
    won't pass the japser compiler in sp3, we have to do something about
    it. The best place to do this, in my mind, is iMT. Of course, there
    might be some twists that make it impossible or difficult to do this
    kind of case manipulation or attribute discard.
    Weiguo
    --- In iPlanet-JATO@y..., "Mike Frisino" <Michael.Frisino@S...> wrote:
    Weiguo,
    First, Matt is correct, the regular expression tool is perfect for general text substitution situations, and as a completely independent
    tool its use is not restricted to migration situations (or file types
    for that matter).
    >
    Second, I sympathize with the unfortunate trouble you are experiencing due to Jasper's (perhaps more strict) compilation, but
    in what way did the iMT automated translation contribute to these
    inconsistencies that you cited?
    >
    1. Changed the case of the tag attribute to be the same as what's
    defined in tld.
    example: changed OnClick to onClick
    The iMT does not generate any OnClick or onClick clauses per se. In a translation situation, the only way "OnClick" would have been
    introduced was if it had been part of the pre-existing
    project's "extraHTML" (which was written by the original customer and
    just passed through unchanged by the iMT) or if it was added manually
    by the post-migration developer.
    >
    2. Removed attributes which are not defined in tld.
    example: escape attribute only defined in three tags
    but in some pages, it's used although it's not defined as an
    attribute
    of certain tags. The jasper compiler doesn't like it.Can you give soem examples? Is there a definite pattern? Again, this might be similar to the OnClick situation described above?
    >
    >
    3. In an end tag, there can't be any space.
    example: </content > doesn't work. </content> works.
    Again, the content tag would never have been generated by the iMT. There was no equivalent in the NetDynamics world, so any content tags
    in your code must have been introduced by your developers manually.
    Its a shame that jasper is so particular, but the iMT could not help
    you out here even if we wanted to. The constants that are used by the
    iMT are defined in
    com.iplanet.moko.jsp.convert.JspConversionConstants. From what I can
    see, the only situation of a closing tag with any space in it is
    public static final String CLOSE_EMPTY_ELEMENT = " />";
    But that should not cause the type of problem you are referring to.
    Mike
    ----- Original Message -----
    From: Matthew Stevens
    Sent: Thursday, September 06, 2001 10:16 AM
    Subject: RE: [iPlanet-JATO] sp3 jsp compiler problem
    Weiguo,
    Others will chime in for sure...I would highly recommend the Regex Tool from
    the iMT 1.1.1 for tackling this type of problem. Mike, Todd and myself have
    posted to the group (even recently) on directions and advantages of creating
    your own RULES (rules file) in XML for arbitary batch processing of source.
    >
    matt
    -----Original Message-----
    From: weiguo.wang@b...
    [mailto:<a href="/group/SunONE-JATO/post?protectID=125056020108194190033029175101192165174048139046">weiguo.wang@b...</a>]
    Sent: Thursday, September 06, 2001 12:25 PM
    Subject: [iPlanet-JATO] sp3 jsp compiler problem
    Matt/Mike/Todd,
    We are trying to migrate to sp3 right now, but have had a lot of
    issues with the new jasper compiler.
    The following workaround has been employed to solve the issues:
    1. Changed the case of the tag attribute to be the same as
    what's
    defined in tld.
    example: changed OnClick to onClick
    2. Removed attributes which are not defined in tld.
    example: escape attribute only defined in three tags
    but in some pages, it's used although it's not defined as an
    attribute
    of certain tags. The jasper compiler doesn't like it.
    3. In an end tag, there can't be any space.
    example: </content > doesn't work. </content> works.
    As I see it, we have two options to go about solving this problem:
    >>
    1. Write a script which will iterate through all the jsp files and
    call jspc on them. Fix the errors manually when jspc fails. Jspc will
    flag the line number where an error occurs.
    2. Write a utility which scans the jsp files and fix the errors when
    they are encountered. We should define what's an error and how to
    correct it. It's best if we combine this with solution 1 since we
    might miss an error condition.
    Actually, there might be another option, which is seeking help from
    you guys since you have better understanding of JATO and iAS. Can you
    do anything to help us?
    We would be happy to hear your thoughts.
    At last, I would like to suggest modifying the moko tool so that
    these rules are enforced and the generated JSPs work with the new
    compiler. This is for the benefit of any new migration projects.
    Thanks a lot.
    Weiguo
    [email protected]
    Choose from 1000s of job listings!
    [email protected]
    Service.
    >
    >
    >
    [Non-text portions of this message have been removed]

  • Servlet Compilation Problem !

    Hi,
    I am just starting to learn servlets and I got problem in compiling them. I got compilation error in
    import javax.servlet.*;statement. Seems that the compiler cannot find the servlet package. I got J2EE 1.4 beta installed on my machine but there is no servlet.jar package. I am using J2SDK 1.4.1_02, J2EE 1.4 beta and Tomcat 4.1.24.
    Can anyone help me with my servlet compilation problem?
    Thanks in advance!
    Josh

    servlet.jar is here :
    <tomcatdir>\common\lib
    add it to your compiler classpath

Maybe you are looking for

  • Different ipods on same computer

    How do I set up two different itunes accounts on the same computer, one for my classic ipod and one for my son's ipod touch?

  • How can I import video from HDR-CX500 to iMovie09?

    I have a HDR-CX500 camcorder which is HD(1080i) and memory recording. I connected HDR-CX500 using USB cable to my iMac. I found that USB Mass Storage is detected on my Finder. I can see the pictures(still cut, JPG). However, iMovie does not response

  • Handling Multi hierarchial Structure using  XSLT or Java Mapping in XI

    Hello Experts, I have an requirement wherein i have sender as IDOC and File as Receiver.My target File structure is multi hierarchial with parent level and many child sub level node. I tried to generate flat structure using graphical mapping by creat

  • PKCS#11 provider - ECDSA key pair generation on token

    Hello, I want to generate ECDSA key pair on HSM (nCipher's netHSM) using SunPKCS11 provider and Java 6. After generation for all supported curve names (e.g. secp256r1) I try to call getEncoding method from PublicKey object (keyPair.getPublic().getEnc

  • X-7 blacks out when making a call or receiving????...

    It's my 3rd time of this problem 1 time I took help of nokia care center but but they couldn't permanently solve it 2nd time I tried Google the problem and it says to restart if nothing happens restore it this helped that time but now the device does