izpack处理bat文件抛出NullPointerException,如何解决?

发布于 2024-12-24 03:57:16 字数 1636 浏览 3 评论 0原文

我使用 PackJacket 应用程序创建了一个安装程序,并使用 IzPack 版本 4.3.5(最新稳定版)编译了 xml 规范。当我尝试运行安装时,进程停止并出现 java NullPointerException:

Current focus owner: null
Condition is fulfilled or not existent.
checking if os constraints [Os  family windows name null version null arch null
jre null ] match current OS
matched current OS.
Condition is fulfilled or not existent.
checking if os constraints [Os  family windows name null version null arch null
jre null ] match current OS
matched current OS.
Exception in thread "processing thread" java.lang.NullPointerException
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:441)
        at com.izforge.izpack.installer.ProcessPanelWorker$ExecutableFile.run(Un
known Source)
        at com.izforge.izpack.installer.ProcessPanelWorker$ProcessingJob.run(Unk
nown Source)
        at com.izforge.izpack.installer.ProcessPanelWorker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:619)

这是相关的 xml 部分:

Resource:

<res id="ProcessPanel.Spec.xml" src="Install_processPanelSpec.xml"/>

Install_processPanelSpec.xml:

<processing>
    <job name="Instalar DLL's">
        <os family="Windows"/>
        <executefile name="$INSTALL_PATH/dlls/install.bat">
            <arg/>
        </executefile>
    </job>
    <job name="Configurar Acesso ao Banco">
        <os family="Windows"/>
        <executefile name="$INSTALL_PATH/config.bat">
            <arg/>
        </executefile>
    </job>
</processing>

I created one installer with the PackJacket app and compiled the xml spec with the IzPack version 4.3.5 (latest stable). When I tried to run the install, the process stop's with the java NullPointerException:

Current focus owner: null
Condition is fulfilled or not existent.
checking if os constraints [Os  family windows name null version null arch null
jre null ] match current OS
matched current OS.
Condition is fulfilled or not existent.
checking if os constraints [Os  family windows name null version null arch null
jre null ] match current OS
matched current OS.
Exception in thread "processing thread" java.lang.NullPointerException
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:441)
        at com.izforge.izpack.installer.ProcessPanelWorker$ExecutableFile.run(Un
known Source)
        at com.izforge.izpack.installer.ProcessPanelWorker$ProcessingJob.run(Unk
nown Source)
        at com.izforge.izpack.installer.ProcessPanelWorker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:619)

This is the relevant xml part:

Resource:

<res id="ProcessPanel.Spec.xml" src="Install_processPanelSpec.xml"/>

Install_processPanelSpec.xml:

<processing>
    <job name="Instalar DLL's">
        <os family="Windows"/>
        <executefile name="$INSTALL_PATH/dlls/install.bat">
            <arg/>
        </executefile>
    </job>
    <job name="Configurar Acesso ao Banco">
        <os family="Windows"/>
        <executefile name="$INSTALL_PATH/config.bat">
            <arg/>
        </executefile>
    </job>
</processing>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

唱一曲作罢 2024-12-31 03:57:16

更改为在 中使用 ,而不是

<pack name="DLL Inner" preselected="yes" required="yes">
  <executable failure="abort" keep="false" stage="postinstall" targetfile="$INSTALL_PATH/install.bat"/>
</pack>

Changed to use <executable> in a <pack> instead of <processing>.

<pack name="DLL Inner" preselected="yes" required="yes">
  <executable failure="abort" keep="false" stage="postinstall" targetfile="$INSTALL_PATH/install.bat"/>
</pack>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文