izpack:从面板izpack执行java类时出错

时间:2017-03-23 11:36:01

标签: izpack

我使用izpack来创建安装程序。我需要从流程面板执行一个java类,所以我为我的java类ServiceChecker创建了jar文件,在ProcessPanel.Spec.xml中添加了job,并将它们包含在installer.xml文件中。

ServiceChecker

public void run(AbstractUIProcessHandler handler, String[] args){
        handler.logOutput("Checking Service.", false);      
}
......// ServiceChecking method. 

ProcessPanel.Spec.xml

<Processing>
    <logfiledir>$INSTALL_PATH</logfiledir>  
    <job name="setup">
        <os family="windows" />
        <executeclass name="ServiceChecker">
            <arg>${myvariable}</arg>
        </executeclass>
    </job>      
    <onFail previous="true" next="false" />
    <onSuccess previous="false" next="true" />
</Processing>

Installer.xml

<resources>
        <res id="LicencePanel.licence" src="Licence.txt" />
        <res id="InfoPanel.info" src="Readme.txt" />
        <res id="Heading.image" src="My_header.png" />
        <res id="Installer.image" src="My_logo.jpg" />
        <res id="userInputSpec.xml" src="UserInput.Spec.xml"  />
        <res id="shortcutSpec.xml" src="shortcutSpec.xml" />
        <res id="CustomLangpack.xml" src="CustomLangpack.xml" />
        <res id="ProcessPanel.Spec.xml" src="ProcessPanel.Spec.xml"/>
    </resources>

<jar src="lib/ServiceChecker.jar" stage="install"/>

<panels>
    <panel classname="HelloPanel" />
    <panel classname="LicencePanel" />
    <panel classname="ProcessPanel"/>
    <panel classname="UserInputPanel" id="install.type.panel" />
    <panel classname="UserInputPanel" id="reg.panel" condition="standardinstallation"/>
    <panel classname="TreePacksPanel" />
    <panel classname="InstallPanel" />
    <panel classname="ShortcutPanel" />
    <panel classname="FinishPanel" />
</panels>

jar中的所有方法都成功执行,但安装程序会抛出以下错误。

  运行处理类时出现

错误:ServiceChecker,com / izforge / izpack / api / handler / AbstractUIHandler

因此无法继续安装。 java类运行方法有什么问题?我按照文档Executing a Java Class with ProcessPanel

进行了操作

0 个答案:

没有答案