gpt4 book ai didi

Java Web Start 不会自动下载相应的 JRE

转载 作者:行者123 更新时间:2023-12-01 14:42:22 26 4
gpt4 key购买 nike

我听说Java web start会自动下载最新的JRE。但它并没有这样做。这是我的问题。

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

我知道我得到这个是因为我在 JDK 7 上编译了代码,而我的机器有 JDK 6。如果我需要在 jnlp 文件中提及任何特定行,请提供建议

<?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>

最佳答案

UnsupportedClassVersionError

问题是(99% 确定)代码是使用 1.7 SDK 编译的而不使用 cross-compilation options

请注意,要正确进行交叉编译,需要访问 1.6 版本 JRE 或 SDK 的 rt.jar

关于Java Web Start 不会自动下载相应的 JRE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15824601/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com