简体   繁体   English

从NetBeans发布桌面Apache Piviot应用程序

[英]Distibuting desktop apache piviot application from netbeans

I've developed a desktop application using Apache Pivot for the UI. 我已经使用Apache Pivot开发UI的桌面应用程序。

Everything runs fine when launched from Netbeans, but when I try to execute the .jar file on it's own I get the following error; 从Netbeans启动时,一切运行正常,但是当我尝试自己执行.jar文件时,出现以下错误;

Exception in thread "main" java.lang.ExceptionInInitializerError
    at **********.Main.main(Main.java:14)
Caused by: java.lang.NumberFormatException: Value out of range. Value:"131" Radix:10
    at java.lang.Byte.parseByte(Unknown Source)
    at java.lang.Byte.parseByte(Unknown Source)
    at org.apache.pivot.util.Version.decode(Version.java:150)
    at org.apache.pivot.wtk.ApplicationContext.<clinit>(ApplicationContext.java:1697)
    ... 1 more

It seems like there are arguments Pivot isn't expecting, but this was run with the command; 似乎有一些Pivot不需要的参数,但这是通过命令运行的;
java -jar {filename}.jar

The folowing enviroment; 所处的环境;

  • Windows 10 Windows 10
  • Netbeans 8.2 Netbeans 8.2
  • Java version "1.8.0_131" Java版本“ 1.8.0_131”
  • JDK "1.8.0_60" JDK“ 1.8.0_60”
  • Apache Pivot 2.0.4 Apache Pivot 2.0.4

That is a known problem with the "Version" class in Pivot. 这是Pivot中“版本”类的一个已知问题。 This was fixed very recently with version 2.0.5 (you are using the previous 2.0.4 version). 此问题最近在2.0.5版中得到了修复(您使用的是先前的2.0.4版)。 If you update your environment outside of NetBeans you should be good. 如果您在NetBeans之外更新环境,那应该很好。 My suspicion is that NetBeans somehow gets the latest version but you don't have your class path pointing there outside of the IDE. 我怀疑NetBeans会以某种方式获取最新版本,但是您的类路径并没有指向IDE之外。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM