Results 1 to 3 of 3
  1. #1
    jackrush is offline Member
    Join Date
    Oct 2010
    Posts
    3
    Rep Power
    0

    Default Swing application compiled in jdk1.4 is not working in jdk1.6

    Hello Guys,

    Need your suggestion

    I have a swing application compiled in jdk1.4 is not working if any higher version of jdk. eg jdk1.6
    I’m using Java Web Start 1.6 to launch the swing application which is developed in jdk1.4 but its throws an error.

    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.javaws.Launcher.executeApplication(Unknown Source)
    at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
    at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
    at com.sun.javaws.Launcher.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.VerifyError: class com.mss.omsClient.ExternalPageFrame overrides final method isAlwaysOnTop.()Z
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(Unknown Source)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknow n 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 com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at com.mss.omsClient.MainFrame.<init>(MainFrame.java: 108)
    at com.mss.omsClient.MainFrame.main(MainFrame.java:48 9)
    ... 9 more

    Here is my JNLP file

    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- JNLP File for JAV Live Application -->
    <jnlp
    spec="1.0+"
    codebase="/tomcatworkspace/TomcatProject"
    href="elan-jav-int-http.jnlp">
    <information>
    <title>Client</title>
    <vendor>Capital</vendor>
    <description>Client</description>
    <description kind="short"> Client</description>
    <icon href="images/icon.gif"/>
    <offline-allowed/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.6+" initial-heap-size="32m" max-heap-size="32m"/>
    <jar href="int/omsClient.jar"/>
    <jar href="int/lib/jnp-client.jar"/>
    <jar href="int/lib/100xmldata.jar"/>
    <!--<jar href="int/lib/ArrowBean.jar"/>-->
    <jar href="int/lib/castor-0.9.5.2.jar"/>
    <jar href="int/lib/clientCommon.jar"/>
    <jar href="int/lib/concurrent.jar"/>
    <jar href="int/lib/FontSelectorBean.jar"/>
    <jar href="int/lib/jboss-client.jar"/>
    <jar href="int/lib/jboss-common.jar"/>
    <jar href="int/lib/jboss-j2ee.jar"/>
    <jar href="int/lib/jbossha-client.jar"/>
    <jar href="int/lib/jbosssx-client.jar"/>
    <jar href="int/lib/log4j.jar"/>
    <jar href="int/lib/lwmsClient.jar"/>
    <jar href="int/lib/wave.jar"/>
    <jar href="int/lib/xalan.jar"/>
    <jar href="int/lib/xerces.jar"/>
    <jar href="int/lib/jfreechart-0.9.8.jar"/>
    <jar href="int/lib/jcommon-0.8.0.jar"/>
    <jar href="int/lib/jasperreports-0.5.0.jar"/>
    <jar href="int/lib/commons-beanutils.jar"/>
    <jar href="int/lib/commons-collections.jar"/>
    <jar href="int/lib/commons-digester.jar"/>
    <jar href="int/lib/commons-logging.jar"/>
    <jar href="int/lib/commons-lang.jar"/>
    <jar href="int/lib/itext-1.00.jar"/>
    <jar href="int/lib/jakarta-poi-1.5.0-FINAL-20020506.jar"/>
    <jar href="int/lib/tools.jar"/>
    <property name="java.naming.factory.initial" value="org.jnp.interfaces.NamingContextFactory"/>
    <property name="java.naming.provider.url" value="cccc:2344"/>
    <property name="java.naming.factory.url.pkgs" value="org.jboss.naming:org.jnp.interfaces"/>
    <property name="mss.jmsurl" value="tcp://xxx:89000"/>
    <property name="mss.auction.topic" value="auctiontopic"/>
    <property name="mss.order.topic" value="ordertopic"/>
    <property name="mss.trade.topic" value="tradetopic"/>
    <property name="mss.marketview.topic" value="marketviewtopic"/>
    <property name="mss.command.topic" value="mss.command"/>
    <property name="mss.instrumentkey.topic" value="instrumentkey"/>
    </resources>
    <application-desc main-class="com.mss.omsClient.MainFrame">
    <argument>English</argument>
    <argument>United States</argument>
    <application-desc/>
    </jnlp>
    Last edited by jackrush; 10-21-2010 at 06:44 PM.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    19

    Default

    Caused by: java.lang.VerifyError: class com.mss.omsClient.ExternalPageFrame overrides final method isAlwaysOnTop.()Z

    What class is ExternalPageFrame extending?
    Because that's what has changed. Your IDE might be able to tell you as well, if you target a 1.6 JDK.

    ETA: Quick check on both 1.4 and 1.6 APIs and isAlwaysOnTop() has been added at some point in between to the Window class. I'm guessing (per the error) that it is final, so cannot be overridden by your isAlwaysOnTop() method. Assuming they both achieve the same thing you could get rid of your one and refactor the code to use the JRE version, or (maybe preferably, I don't know) simply rename your one.
    Last edited by Tolls; 10-22-2010 at 08:45 AM.

  3. #3
    jackrush is offline Member
    Join Date
    Oct 2010
    Posts
    3
    Rep Power
    0

Similar Threads

  1. Difference between jdk1.5 and jdk1.6
    By pradnya in forum New To Java
    Replies: 10
    Last Post: 12-08-2010, 11:52 AM
  2. EJB invokation failing in jdk1.5.0_23 but works in jdk1.6.0
    By randle169 in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 01-28-2010, 09:09 AM
  3. How to uninstall jdk1.4 or jdk1.5
    By ran_sushmi in forum Advanced Java
    Replies: 0
    Last Post: 07-20-2009, 12:45 PM
  4. Differnce Between JDK1.5 to JDK1.6
    By kallamrajareddy in forum New To Java
    Replies: 2
    Last Post: 03-12-2009, 07:43 AM
  5. JNLP - Swing application compiled in jdk1.5 not working in jdk1.6
    By mahendra.athneria in forum AWT / Swing
    Replies: 4
    Last Post: 01-20-2009, 08:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •