Java IzPack错误2-“;文件版本与编译器版本不同;
根据IzPack,这被归类为CompilerException 我的install.xml文件是:Java IzPack错误2-“;文件版本与编译器版本不同;,java,izpack,Java,Izpack,根据IzPack,这被归类为CompilerException 我的install.xml文件是: <?xml version="1.0" encoding="iso-8859-1" standalone="yes"?> <installation version="2.0"> <info> <appname>Time Sheets Manager</appname> <appversion
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<installation version="2.0">
<info>
<appname>Time Sheets Manager</appname>
<appversion>2.0</appversion>
<authors>
<author email="erbrown@ymail.com" name="Elliot Brown"/>
<author email="" name="Denes Lengyel"/>
</authors>
<url>http://dbs.ca</url>
<uninstaller name="timesheet_uninstall.jar" write="yes"/>
<javaversion>1.7</javaversion>
<requiresjdk>no</requiresjdk>
<writeinstallationinformation>yes</writeinstallationinformation>
<pack200/>
<run-privileged condition="izpack.windowsinstall.vista|izpack.windowsinstall.7"/>
</info>
<guiprefs height="480" resizable="no" width="640">
<modifier key="useFlags" value="no"/>
<modifier key="langDisplayType" value="default"/>
</guiprefs>
<locale>
<langpack iso3="eng"/>
</locale>
<panels>
<panel classname="CheckedHelloPanel"/>
<panel classname="InstallSelection"/>
<panel classname="SimpleFinishPanel"/>
</panels>
</installation>
以下是异常的实际输出:
IZPACK_HOME is "C:\Program Files\IzPack\bin\.."
.:: IzPack - Version 5.0.0-beta11 ::.
< compiler specifications version: 5.0 >
- Copyright (c) 2001-2010 Julien Ponge and others. All Rights Reserved.
- Visit http://izpack.org/ for the latest releases
- Released under the terms of the Apache Software License version 2.0.
-> Processing : install.xml
-> Output : install.jar
-> Base path : .
-> Kind : standard
-> Compression : default
-> Compr. level: -1
-> IzPack home : C:\Program Files\IzPack\bin\..
May 16, 2013 5:55:04 PM com.izforge.izpack.core.container.PlatformProvider provi
de
INFO: Detected platform: windows,version=6.2,arch=x64,symbolicName=WINDOWS_8,jav
aVersion=1.7.0_15
-> Fatal error :
install.xml:2: the file version is different from the compiler version
com.izforge.izpack.api.exception.CompilerException: install.xml:2: the file vers
ion is different from the compiler version
at com.izforge.izpack.compiler.helper.AssertionHelper.parseError(Asserti
onHelper.java:61)
at com.izforge.izpack.compiler.resource.ResourceFinder.getXMLTree(Resour
ceFinder.java:188)
at com.izforge.izpack.compiler.CompilerConfig.executeCompiler(CompilerCo
nfig.java:295)
at com.izforge.izpack.compiler.bootstrap.CompilerLauncher.main(CompilerL
auncher.java:52)
(tip : use -? to get the commmand line parameters)
IZPACK_主页是“C:\Program Files\IZPACK\bin\…”
.::IzPack-版本5.0.0-beta11::。
<编译器规范版本:5.0>
-版权所有(c)2001-2010 Julien Ponge和其他人。版权所有。
-拜访http://izpack.org/ 最新版本
-根据Apache软件许可证2.0版的条款发布。
->处理:install.xml
->输出:install.jar
->基本路径:。
->种类:标准
->压缩:默认值
->压缩机。级别:-1
->IzPack主页:C:\Program Files\IzPack\bin\。。
2013年5月16日下午5:55:04 com.izforge.izpack.core.container.PlatformProvider provi
判定元件
信息:检测到的平台:windows,版本=6.2,arch=x64,SYMBOLCNAME=windows_8,jav
厌恶=1.7.0_15
->致命错误:
install.xml:2:文件版本与编译器版本不同
com.izforge.izpack.api.exception.compilereexception:install.xml:2:vers文件
ion与编译器版本不同
在com.izforge.izpack.compiler.helper.AssertionHelper.parseError(断言
onHelper.java:61)
在com.izforge.izpack.compiler.resource.ResourceFinder.getXMLTree(资源
ceFinder.java:188)
在com.izforge.izpack.compiler.CompilerConfig.executeCompiler(CompilerCo
nfig.java:295)
在com.izforge.izpack.compiler.bootstrap.CompilerLauncher.main(compiler
auncher.java:52)
(提示:使用-?获取命令行参数)
这是我第一次使用IzPack,让它工作起来至关重要。任何帮助都将不胜感激
我还应该提到,panel部分中的“InstallSelection”是我自己在Netbeans中设计的。即使没有在面板部分中定义它,我仍然会得到错误。由于缺乏正确有效的文档,解决错误需要一段时间 至少在这种情况下,需要检查两件事:
- 设计自定义面板时,请确保用于编译该面板的Java编译器与IzPack将用于创建installer.jar文件的编译器匹配。
- e、 Netbeans使用的是来自jdk7u15的编译器,而IzPack使用的是jdk7u15
- 确保自定义面板对应的“.jar”存在于IzPack的“IzPack_install_dir/bin/panels”中
<installation version="x.y">
将安装版本更改为5.0,就像从异常输出中看到的那样
<installation version="x.y">
/**
* The compiler version.
*/
public final static String VERSION = "5.0";