Question

I heard that Java web start download the latest JRE automatically. But it is not doing that. Here is my issue.

#### Java Web Start Error:
#### java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/ibm/nzna/projects/qit/Qit, offset=6

I know I am getting this because I have compiled the code on JDK 7 and my machine have JDK 6. Please advice if I need to mentioned any specific line in my jnlp file

<?xml version="1.0" encoding="utf-8"?>

<!-- Do not edit! last regenerated 2012-11-11 05:50 PST by ReplicatorSender -->
<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Descriptor 6.0//EN" "http://java.sun.com/dtd/JNLP-6.0.dtd">
<!-- doctype points to Sun, not Oracle for compatibility. -->
<jnlp spec="6.0+" codebase="sample" href="qit_fester.jnlp" version="6.5.2">

  <information>
    <title>Quest Input Tool Fester 6.5.2</title>
    <vendor>Ashish Tyagi</vendor>
    <description>Quest Input Tool helps software and technology group to publish the information about product and document</description>
    <description kind="short">Quest Input Tool Fester</description>
    <description kind="one-line">Quest Input Tool Fester</description>
    <description kind="tooltip">QIT-FESTER</description>
    <!-- relative to codebase, need copy in same dir as jar, and jnlp file. -->
    <icon href="logo_fester.jpg" width="64" height="64" kind="default" />
    <icon href="qit_splash.gif" width="128" height="128" kind="splash" />
    <!-- online only -->
    <!-- create desktop shortcut to run the Replicator -->
    <offline-allowed/>
    <shortcut online="true">
      <desktop />
      <menu submenu="QIT" />
    </shortcut>
  </information>

  <security>
    <all-permissions />
  </security>

  <update check="background" policy="prompt-update" />

  <resources>
    <!-- any vendor -->
    <java version="1.6+"     java-vm-args="-ea" initial-heap-size="128m" max-heap-size="512m" />

    <!-- application code, download jar before we start. -->
    <jar href="qit_Ver3.1.jar" main="true" download="eager" />
    <jar href="lib/mail.jar" download="lazy" />
    <jar href="lib/activation.jar" download="lazy"/>
    <jar href="lib/bootstrap.jar" download="lazy"/>
    <jar href="lib/commons-discovery.jar" download="lazy"/> 
    <jar href="lib/commons-logging-api.jar" download="lazy"/>
    <jar href="lib/db2jcc.jar" download="lazy"/>
    <jar href="lib/db2jcc_license_cu.jar" download="lazy"/>
    <jar href="lib/HTMLWindow.jar" download="lazy"/>
    <jar href="lib/j2ee.jar" download="lazy"/>
    <jar href="lib/jaxp-api.jar" download="lazy"/>
    <jar href="lib/jtidy.jar" download="lazy"/>
    <jar href="lib/jxl.jar" download="lazy"/>
    <jar href="lib/kunststoff.jar" download="lazy"/>
    <jar href="lib/log4j-1.2.17.jar" download="lazy"/>
    <jar href="lib/LotusWordProcessor.jar" download="lazy"/>
    <jar href="lib/ras.jar" download="lazy"/>
    <jar href="lib/sax.jar" download="lazy"/>
    <jar href="lib/webservices.jar" download="lazy"/>
    <jar href="lib/wsexception.jar" download="lazy"/>
    <jar href="lib/xerces.jar" download="lazy"/>
    <jar href="lib/resource.jar" download="lazy"/>

    <!-- set -D system properties -->
    <property name="VIA" value="website" />
    <property name="AUTHENTICATION" value="none" />
    <property name="DEBUGGING" value="false" />
  </resources>

  <!-- application class with main method -->

</jnlp>
Was it helpful?

Solution

UnsupportedClassVersionError

The problem is (99% sure) that the code is being compiled using a 1.7 SDK without using the cross-compilation options.

Note that to do cross-compilation properly will require access to the rt.jar of a 1.6 version JRE or SDK.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top