Compilation erros when tld in jar

Running Jdev 11g 11.1.1.0.2 I am unable to compile a simple struts2 web application because of this jsp taglibrary issue:
No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.I have added the struts2 tag lib in the Project Properites-->JSP Tag Libraries section pointing to tld within the struts2 jar:
jar:file:/C:/development/lib/struts-2.1.6/lib/struts2-core-2.1.6.jar!/META-INF/struts-tags.tldThe jsp editor understands the struts tags and provides hints but the compilation fails. I can get this to work if I extract the tld file, place it locally, and explicitly map to it in my web.xml:
<jsp-config>
    <taglib>
      <taglib-uri>/struts-tags</taglib-uri>
      <taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
    </taglib>
  </jsp-config>But I shouldn't have to do this! Any help would be greatly appreciated. Thanks!

Thanks BalusC,
I tried version 2.4 already but I still got the same problem.
Any other possible reason?
My web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<taglib>
<taglib-uri>http://www.myTags.com/tags/util</taglib-uri>
<taglib-location>/WEB-INF/lib/util.jar</taglib-location>
</taglib>
I can make it work if I take the tld out and put it under WEB-INF, and changed the web.xml tablib-location to /WEB-INF/util.tld. I just don't know why it doesn't work if it is in a jar.
Thanks.

Similar Messages

  • Unable to read TLD "META-INF/jsf_core.tld" from JAR file "file:

    Hallo everybody :-)<br /><br />i've installed Workflow-Server + ARES + FormManager. When i call localhost:8080/adminui i can log in and the browser loads the next site --> it fails and says:<br /><br />org.apache.jasper.JasperException: Unable to read TLD "META-INF/jsf_core.tld" from JAR file "file:/C:/Adobe/LiveCycle/jboss/server/all/tmp/deploy/tmp56414LiveCycle.ear-contents/admi nui.war/WEB-INF/lib/jsf-impl.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: com.sun.faces.taglib.FacesTagExtraInfo<br />     org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:5 0)<br />     org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)<br />     org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:183)<br />     org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:181)< br />     org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)<br />     org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)<br />     org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)<br />     org.apache.jasper.compiler.Parser.parse(Parser.java:126)<br />     org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)<br />     org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)<br />     org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)<br />     org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)<br />     org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)<br />     org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)<br />     org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)<br />     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)<br />     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)<br />     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)<br />     javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />     com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)<b r />     com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)<br />     com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)<b r />     com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)<br />     com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)<br />     javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)<br />     com.adobe.framework.SecurityFilter.doFilter(SecurityFilter.java:177)<br />     com.adobe.idp.um.auth.filter.PortalSSOFilter.doFilter(PortalSSOFilter.java:106)<br />     com.adobe.framework.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter .java:161)<br /><br />Any idea what' wrong?<br /><br />Thanks,<br />Valerio

    Hi Howard,
    thank you for your post.
    I actually new about the problems with the jvm version. Still i wanted to ask, cause there are different reports on this `java problems` and even though the 1.4.2_08 seems to be the best version (by the way this version is not to be downloaded any longer *sig*), there are people getting all installed with other versions. I couldn't find any regularity in the misbehavior of the servers while installing.
    I finally achieved and got everything working ... but very slow. Loading the adminui or BAM features takes very long time (over one minute). Have you already had this delay. Any hint?
    Thanks again,
    Valerio

  • Compiled Tomcat Servlet Example & got JAR, not WAR?

    Is there a basic reference on how to create a simple servlet with NetBeans 4.1 and deploy it to Tomcat?
    When I created the project I chose Samples->Web->Tomcat Servlet Example, and yet it does not create a WAR file on compilation.
    And of course once I'm past that I have to figure out how to edit the XML file, I gather.
    I need a reference that will hold me by the hand and walk me through it once to kick start me.
    After that I think I can make it without having to ask such newbie questions.

    Hi,
    not sure to what extent you are clear in build.xml file (done thru ant).
    what i can tell you is, ant creates any archive file (be it .jar, .war, .ear) with the tasks named "jar" (<jar jarfile="yourfilename.jar"..>), "war" and "ear". But both war and ear are the extensions of the jar only.
    You can achieve creation of any archive file with the jar task itself.
    you need to take care of the following...
    (1) you can /should edit the extension of the files at every stage.. first .jar and then .war and then .ear (if necessary) => basic flow
    (2) at every step, you have to have a file inclusion inside the corresponding archive file..
    say for example, for a .jar file you should include all the compiled .class files, and ejb-jar.xml (incase you use ejbs) and other built-in jar files....
    In case of .war files (web archive) you should include the web.xml file, any static files (html, jsp etc), any tld files - it goes with your application's nature and requirement.....
    fyi, i m including a sample build.xml file which i use for a webapplication, so it deals with war...
    <?xml version="1.0" encoding="UTF-8"?>
    <project name="ServletsReqDispFwd" default="deploy">
         <property name="top" value="."/>
         <property name="webinf" value="${top}/WEB-INF"/>
         <property name="lib" value="${webinf}/lib"></property>
         <property name="classes" value="WEB-INF/classes"/>
         <property name="jboss.dir" value="D:\jboss-3.2.2RC3\server\default\deploy"></property>
         <property name="tomcat.dir" value="D:\jakarta-tomcat-4.1.27\webapps"></property>
         <property name="warfile" value="ServletsReqDispFwd.war"></property>
         <property name="src" value="${top}/src"/>
         <property name="web.xml" value="WEB-INF/web.xml"/>
         <target name="package">
              <javac srcdir="${src}" destdir="${classes}"
                     listfiles="true" debug="true"  verbose="true"
                          classpath="${lib}/*.jar"/>
              <war warfile="${warfile}" webxml="${web.xml}">
                   <webinf dir="${top}">
                        <include name="**/*web*.xml"/>
                        <include name="**/*application*.xml"/>
                        <exclude name="src/**/*.xml"/>
                   </webinf>
                   <lib dir="${lib}">
                        <include name="*.jar"/>
                   </lib>
                   <fileset dir="." includes="**/*.html"/>                    
                   <classes dir="${classes}" includes="**/*.class"></classes>                         
              </war>
         </target>
         <target name="deploy" depends="clean,package">
              <copy file="${warfile}" todir="${tomcat.dir}" overwrite="true"></copy>
         </target>
         <target name="clean">
                <delete dir="${classes}">
                     <filename name="*.class"/>
              </delete>
              <delete>
                   <fileset dir="${top}" includes="${warfile}"/>
              </delete>
              <delete>
                   <fileset dir="${tomcat.dir}" includes="${warfile}"/>
              </delete>
         </target>
    </project>hope this contribues to a certain extent to help you edit the buildfile (xml file as you go) to meet your requirement.....

  • CommandAction works through OnDeviceDebug, but not when installed from jar

    Hi everybody,
    I'm trying to run a HelloMIDlet example and if I run it on emulator it works fine, also when I run it on mobile through OnDeviceDebug from eclipse it works fine, but when I install a jar file and run the application it ends with Application Error message and it exits. I found out that the problem might be in the CommandAction method, because when I use this:
    public void commandAction(Command c, Displayable s) {
              notifyDestroyed();
    }then the application works also when installed from jar, but when I use this:
    public void commandAction(Command c, Displayable s) {
       String label = new String("Exit");   //just for test
       if (label.equals("Exit"))
         notifyDestroyed();
    }then it ends with Application Error right after I run the program (and it works when I use OnDeviceDebug). I'm using jdk1.5.0_06 and WTK from Sony Erricsson (my target device is W800i, which supports CLDC1.1 and MIDP2.0)
    My manifest file is
    Manifest-Version: 1.0
    MicroEdition-Configuration: CLDC-1.1
    MIDlet-Name: HelloMIDlet
    Created-By: Sun Microsystems Inc.
    MIDlet-Vendor: Sun Microsystems, Inc.
    MIDlet-1: HelloMIDlet, , HelloMIDlet
    MIDlet-Version: 1.0
    MicroEdition-Profile: MIDP-2.0
    MIDlet-Description: Hello Worldand I don't use the jad file when installing the application (seems to be unecessary when you have a manifest file inside the jar). And I'm unable to debug it because when debugging then it works normally. Also I tried to recompile the BluetoothDemo and the same error(and works through OnDeviceDebug). And when I installed the jar file, which is originally distributed with BluetoothDemo then it worked. When I compared original jar file and my jar file then the only difference was in the size the class files (class files compiled by me were bigger then the class files in original jar file (which work)).
    Any ideas guys and girls?

    I tried that approach but it doesn't work either. I think maybe my directory structure is wrong.
    C:\IRS\IRS.jar
    C:\IRS\irs.hs
    referenced: jar:file://C:/IRS/IRS.jar!/irs.hs
    Am I doing this right?

  • StackOverflowError when deploying sbConfig.jar in weblogic sbconsole

    StackOverflowError when deploying sbConfig.jar in weblogic sbconsole
    Hello,
    We would like to determine the possible causes of the error encountered when importing sbconfig jar in OSB 10gr3. See error message below.
    ####<Jan 12, 2011 11:31:48 AM GMT+08:00> <Error> <ConfigFwk> <crmhpdqvm04> <AdminServer> <[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <1294803108771> <BEA-000000> <notifyBeforePrepare() failed for listener CoreToSessionPropagator
    java.lang.StackOverflowError
    at weblogic.xml.query.types.XQueryTypeSeqNode.kind(XQueryTypeSeqNode.java:24)
    at weblogic.xml.query.compiler.StreamableTypeVisitor.visit(StreamableTypeVisitor.java:87)
    at weblogic.xml.query.types.XQueryTypeSeqNode.visit(XQueryTypeSeqNode.java:113)
    at weblogic.xml.query.types.XQueryTypeNode.visit(XQueryTypeNode.java:613)
    at weblogic.xml.query.compiler.StreamableTypeVisitor.visit(StreamableTypeVisitor.java:99)
    This error shows after clicking import, and this prevents us from reaching the activate or submit part.
    We have tried importing using the 3 ways below but the same error above is encountered:
    1. Workshop (publish via OSB - Run As Server, and OSB - Export Resources to Server).
    2. OSB console.
    3. WLST.
    We would like to know what causes this javastackoverflow. Kindly verify also the java mem args set in setDomainEnv (as the issue might be related to java memory):
    MEM_ARGS="-Xms1024m -Xmx1024m"
    export MEM_ARGS
    MEM_PERM_SIZE="-XX:PermSize=48m"
    export MEM_PERM_SIZE
    MEM_MAX_PERM_SIZE="-XX:MaxPermSize=512m"
    export MEM_MAX_PERM_SIZE
    We will appreciate any input you will provide. Thanks.

    I was able to activate the task with no out of memory issue after setting -Xmx to 2048m. The activation took around 25 mins. Not sure if this is just fine.
    I am curious on the error logs below seen during the activation. See below:
    <Jan 13, 2011 1:32:24 PM GMT+08:00> <Error> <WliSbTransports> <BEA-381502> <Exception in JmsInboundMDB.onMessage: com.bea.wli.sb.transports.TransportException: No transport information is registered for: ProxyService
    <Jan 13, 2011 1:32:24 PM GMT+08:00> <Warning> <EJB> <BEA-010065> <MessageDrivenBean threw an Exception in onMessage(). The exception was:
    java.lang.AssertionError.
    java.lang.AssertionError
         at com.bea.wli.sb.transports.jms.JmsInboundMDB.onMessage(JmsInboundMDB.java:138)
    These logs below were also noticed before the logs above appeared and also before out of memory issue.
    <Jan 13, 2011 12:03:16 PM GMT+08:00> <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it during the configured idle timeout of 0 secs>
    <Jan 13, 2011 12:11:20 PM GMT+08:00> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '14' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "608" seconds working on the request "weblogic.servlet.internal.ServletRequestImpl@1a2648e[
    POST /sbconsole/sbconsole.portal?_nfpb=true&_windowLabel=ImportConfiguration&ImportConfiguration_actionOverride=%2Fdeployment%2FUpdateImportRepository&_pageLabel=SysAdmin_Imports_ViewImports HTTP/1.1
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
    Referer: http://<IP>:7001/sbconsole/sbconsole.portal?_nfpb=true&_windowLabel=ImportConfiguration&ImportConfiguration_actionOverride=%2Fdeployment%2FLoadImportFile&_pageLabel=SysAdmin_Imports_ViewImports
    Accept-Language: en-us
    Content-Type: application/x-www-form-urlencoded
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CWADS32; InfoPath.2)
    Content-Length: 350
    Connection: Keep-Alive
    Cache-Control: no-cache
    Cookie: oracle.uix=0^^GMT+8:00; WINDOW_JSP_ID=Deployment_Import_ViewImportRepository; WINDOW_X_POS=0; WINDOW_Y_POS=0; ADMINCONSOLESESSION=HcRvNn4JLmwbwC2jLYPdNV3hpkZznMxrzQXGnqQTlwvBPbXv6KvJ!-1773346860
    ]", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
         java.util.HashMap$HashIterator.<init>(HashMap.java:792)
         java.util.HashMap$KeyIterator.<init>(HashMap.java:840)
         java.util.HashMap$KeyIterator.<init>(HashMap.java:840)
    Please advise.
    Edited by: 827591 on Jan 12, 2011 10:43 PM

  • SERVLET COMPILATION ERRO

    HI everyone,
    i get a very weird compilation error when trying to compile any servlet in a J2SDK v 1.4.2_03.
    It is a very weird error and i only get it when i try to compile servlets on a machine that uses WIN2000 Server OS. I have a different machine that uses WINXP and the same version JSDK and i have never encountered such an error at compilation time.
    The error i get is:
    ViewServlet.java:1 : package javax.servlet does not exist
    import javax.servlet.*;
    I do import this package though. What do you think might be the problem???

    Duffymo is right. If the error message is "ViewServlet.java:1 : package javax.servlet does not exist" then it is a classpath problem with the compiler.
    It may be that you have CLASSPATH set on your old machine, and not on this one, causing it to fail.
    You need to add a jar file with the javax.servlet.* classes into your classpath - preferably using the command line switch if compiling via javac.
    One version of this file is distributed with Tomcat and is found in TOMCAT_HOME/common/lib/servlet.jar
    Also, from Java1.4 onwards, Tomcat has trouble finding servlets that are in the "default" package (ie not in a package) As a matter of course, all your java classes should now be in a package.
    http://developer.java.sun.com/developer/bugParade/bugs/4361575.html
    Hope this helps,
    evnafets

  • Cutom tag tld in jar problem

    I am using Tomcat 5.5 and I have a jar file called util.jar:
    util.jar
    -com.util.tag.class
    -META-INF
    -tag.tld
    When I put this util.jar under WEB-INF/lib/ and try to use the custom tag, I always get Unable to read TLD "META-INF/taglib.tld" from JAR file "file:/c:/apache-tomcat-5.5.23...."
    How do I change it to read the tab.tld instead of taglib.tld?
    Any help will be appreciated.

    Thanks BalusC,
    I tried version 2.4 already but I still got the same problem.
    Any other possible reason?
    My web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    <taglib>
    <taglib-uri>http://www.myTags.com/tags/util</taglib-uri>
    <taglib-location>/WEB-INF/lib/util.jar</taglib-location>
    </taglib>
    I can make it work if I take the tld out and put it under WEB-INF, and changed the web.xml tablib-location to /WEB-INF/util.tld. I just don't know why it doesn't work if it is in a jar.
    Thanks.

  • How to run a compiled file that needs a jar

    Hi all
    I'm trying to run a file that I've compiled that requires a jar
    I have both the jar and java file in the same directory
    HelloWorld.java
    itext.jar
    i compile using
    javac -cp itext.jar HelloWorld.java
    which produces my HelloWorld.class
    but when i run
    java HelloWorld
    I get loads of errors
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorl
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Sourc
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    am i doing something wrong with trying to run the class with the jar file?

    Didnt work
    C:\Projects\pdf>java -cp .;itext.jar HelloWorld
    Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld (wrong name: com/lowagie/examples/general/HelloWorld)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)

  • Jdbc connection blocks when run from jar

    The following code establishes a connection EXCEPT when run from within a jar file:
    String jdbcDriverName = "oracle.jdbc.driver.OracleDriver";
    String dbConnectionURL = "jdbc:oracle:thin:@192.168.2.7:1521:PRISM";
    String userName = "mdo";
    String password = "mdpass";
    // Load the JDBC driver and create a connection to the database
    Class.forName( jdbcDriverName );
    OracleDataSource dataSource = new OracleDataSource();
    dataSource.setURL( dbConnectionURL );
    dataSource.setUser( userName );
    dataSource.setPassword( password );
    connection = dataSource.getConnection();
    When run from a jar file, the application does not execute beyond the line:
    connection = dataSource.getConnection();
    No exceptions are thrown, it just appears that getConnection never returns.
    Do I need to do anything different to execute this code from within a jar file?
    Thanks in advance,
    Phil
    <><

    When building the JAR file, I inadvertently included files from two Oracle JDBC driver versions (1.2 and 1.4). I was building a single jar file with all files in it.
    I am guessing same named files existed in both driver JARs and caused "confussion" when combined into the single JAR.
    Still, I would have expected an exception to be thrown or a null connection to be returned instead if the thread just blocking.
    Thanks for all replies,
    Phil
    <><

  • Getting Compilation error when used SET or MULTISET operator on nested tabl

    Dear All,
    I am getting Compilation error when used SET or MULTISET operator on nested tables inside a procedure.
    This is working fine in other DB installations of 10g but does not work in another 10g DB.
    it says "wrong number of parameter or datatype used in SET"
    Can any one suggest what went wrong here?
    Thanks in advance.

    Can any one suggest what went wrong here?Only if you would post the query and Oracle versions on both databases.
    Besides, this forum deals with issues in Oracle product installation. So post this query in SQL PL/SQL forum for better response.

  • Compilation error when used SET or MULTISET operator on nested tables

    Dear All,
    I am getting Compilation error when used SET or MULTISET operator on nested tables inside a procedure.
    This is working fine in other DB installations of 10g but does not work in another 10g DB.
    it says "wrong number of parameter or datatype used in SET"
    Can any one suggest what went wrong here?
    Thanks in advance.

    Hi,
    Thanks for ur reply...
    Since MULTISET and SET operators are the new additions in base 10g release for manipulation of nested tables data, I am surprised that same is working in similar 5 DBs installations with 10.2.0.1.0 version, but does not work in the sixth.
    SET and MULTISET operators are used inside the PL/SQL procedure which is getting compiled in the above mentioned 5 DBs but not in sixth DB.
    it gives
    On line: 3112
    PLS-00306: wrong number or types of arguments in call to 'SET'
    Hope this clarifies the issue...

  • Getting application path when launching a Jar

    Hi,
    very simple
    how do you get the application path when launching a jar file?
    NNiol

    Unless you mean the standard application folder. That application path is an OS specific concept. On Windows systems, for example, you can get the application path by using System.getenv("ProgramFiles"); but that won't work on other systems.
    If you're looking for a constant location to store data files, you'd do better to create an application-specific directory under System.getProperty("user.home");.
    And if you're just looking for the place where your jar file is, you can successfully follow the previously given advice.
    --DNP                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • When using java -jar does -cp have any significance?

    So we have a classpath that's set from the Manifest but I want to augment that with -cp
    From what I can tell -cp is ignored when you are using the classpath from a Manifest.

    >
    From what I can tell -cp is ignored when you are using the classpath from a Manifest.>No. The -cp option is ignored when using the -jar option.
    So if you do something like..
    REM: old way of launching
    REM: java -jar the.jar arg1 arg2
    java -cp the.jar;...;another.jar the.main.class arg1 arg2..it should work as expected.

  • [svn:fx-trunk] 13299: fix the _rb swc so that it updates properly when changes happen - update=" true" so that it will compile correctly when using locales

    Revision: 13299
    Revision: 13299
    Author:   [email protected]
    Date:     2010-01-05 19:07:45 -0800 (Tue, 05 Jan 2010)
    Log Message:
    fix the _rb swc so that it updates properly when changes happen - update="true" so that it will compile correctly when using locales
    QE notes: ensure it contains a catalog.xml file, a swf, and a locale directory with properties file
    Doc notes:
    Bugs: https://bugs.adobe.com/jira/browse/SDK-24802
    Reviewer: pete
    Tests run:
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24802
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/build.xml

    I've dropped my guard before with the security and I had so much trouble with my computer because of all the people trying to attack my computer I just can't take the chance again.  www.MySafetyGates.com

  • Class not being created when running from jar

    Hi all,
    Tech info first:
    IDE: Sun Java Studio Enterprise 8
    Plaform: windows xp
    I have created a Swing app, that connects to a com port(using the RXTXcomm). now, when I run the app in the IDE, everything is fine and dandy, but, when I run the jar file, the application loads, but the class in the app which deals with the com port is not created. here is the code:
        private static void createAndShowGUI() {
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated(true);
            Main receiver = new Main();
            receiver.getPropertiesFromFile();
            //Create and set up the window.
            frame = new JFrame("R�FILOG RFID Empf�nger");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setContentPane(receiver.mainPanel);
            frame.setJMenuBar(receiver.createMenuBar());
            frame.addWindowListener(receiver);
            frame.setLocationByPlatform(true);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
            portListener = new RFIDReaderComm(receiver, "COM3");
            portListener.getConfiguration();        
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();   
    portListener in the createAndShowGUI() function is an interface level parameter and is the class that is not being created. There is no error message.
    If I move the two lines that deal with the port listener before the frame.pack() line, then the GUI is not even loaded, and when I view the processes in the task manager, the process starts and then quits without anything becoming visible. So from this I guess there is a problem with creating the class when running from a jar, but without any error messages, I have not a clue where to start...can anyone help?
    thanks in advance.

    Well, some more info, so maybe someone can come up with some tips for me...this is really important, and any help is greatly appreciated.
    This is obviously a classpath problem. After running the my jar file with java -jar I finally got the error NoClassDefFoundError
    Kind of obvious I suppose. But, I cannot seem to get the two jar files I need into the classpath. I have tried the following:
    Updating my computers CLASSPATH with the relevant paths - not working
    Trying to get the Sun Java Studio Enterprise to build the required jar files into the final package - cannot get this to work
    Tried updating the manifest.mf in the following way:
    Created a text file Manifest.txt with the lines:
    Class-Path: RXTXcomm.jar
    Class-Path: BrowserLauncher2-10rc4.jar
    ran the command (in the same directory as Manifest.txt):
    jar cfm RUFILOGScanner.jar Manifest.txt classes/*.class
    but this does not work either. When I run: jar tf RUFILOGScanner.jar all I get is:
    META-INF/
    META-INF/MANIFEST.MF
    classes/
    classes/CRCCalculator.class
    classes/Main$1.class
    classes/Main.class
    classes/RFIDReaderComm.class
    classes/URLDialog$1.class
    classes/URLDialog$2.class
    classes/URLDialog.class
    the classes I want added are not there. Plus, (I think this is because I am running SE8) the manifest.mf is not in a folder called META-INF. In fact, I have no folder called META-INF. Is this significant?
    Please, can anyone help me?

Maybe you are looking for