Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/347.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java IzPack捷径噩梦_Java_Izpack_Desktop Shortcut - Fatal编程技术网

Java IzPack捷径噩梦

Java IzPack捷径噩梦,java,izpack,desktop-shortcut,Java,Izpack,Desktop Shortcut,我对此束手无策 我有一个非常简单的izpack安装描述符,用于Windows上的两包Java应用程序。除创建快捷方式外,所有操作均按预期进行。首先,快捷方式面板似乎不正确。将显示标签“ShortcutPanel.regular.startup”,而不是“启动时运行”或“启动执行”复选框中的任何类似内容 运行安装程序后,不会创建快捷方式。下面是my install.xml的外观,非常简单: <izpack:installation version="5.0" xmlns:izpack="h

我对此束手无策

我有一个非常简单的izpack安装描述符,用于Windows上的两包Java应用程序。除创建快捷方式外,所有操作均按预期进行。首先,快捷方式面板似乎不正确。将显示标签“ShortcutPanel.regular.startup”,而不是“启动时运行”或“启动执行”复选框中的任何类似内容

运行安装程序后,不会创建快捷方式。下面是my install.xml的外观,非常简单:

<izpack:installation version="5.0"
xmlns:izpack="http://izpack.org/schema/installation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://izpack.org/schema/installation http://izpack.org/schema/5.0/izpack-installation-5.0.xsd">

<info>
    <appname>application_name</appname>
    <appversion>2.0.0</appversion>
    <appsubpath>myapp</appsubpath>
    <javaversion>1.8</javaversion>
</info>

<locale>
    <langpack iso3="bra" />
</locale>

<resources>
    <res src="shortcutSpec.xml" id="shortcutSpec.xml"/>
</resources>

<variables>
    <variable name="TargetPanel.dir.windows" value="C:/Sistemas"/>
</variables>

<guiprefs width="800" height="600" resizable="no">
    <laf name="substance">
        <os family="windows" />
        <os family="unix" />
        <param name="variant" value="mist-silver" />
    </laf>
    <modifier key="useHeadingPanel" value="yes" />
</guiprefs>

<panels>
    <panel classname="HelloPanel" />
    <panel classname="DefaultTargetPanel" />
    <panel classname="ShortcutPanel" />
    <panel classname="InstallPanel" />
    <panel classname="FinishPanel" />
</panels>

<natives>
    <native type="izpack" name="ShellLink.dll">
        <os family="windows"/>
    </native>
    <native type="izpack" name="ShellLink_x64.dll">
        <os family="windows"/>
    </native>
</natives>

<packs>
    <pack name="Pack1" required="yes">
        <description>one of the packs it's a jar</description>
        <file src="lib/pack1.jar" targetdir="$INSTALL_PATH/pack1subdir"
            override="true">
        </file>
        <file src="imagens/logo.ico" targetdir="$INSTALL_PATH/pack1subdir/imagens/"
            override="true" />
        <executable targetfile="lib/pack1.jar" type="jar"
            stage="never"></executable>
    </pack>
    <pack name="Pack2" required="yes">
        <description>the other pack</description>
        <file src="lib/pack2.jar" targetdir="$INSTALL_PATH/pack2subdir"
            override="true">
        </file>
        <file src="imagens/update.ico" targetdir="$INSTALL_PATH/pack2subdir/imagens/"
            override="true" />
        <executable targetfile="lib/pack2.jar" type="jar"
            stage="never"></executable>
    </pack>
</packs>

应用程序名称
2.0.0
myapp
1.8
其中一包是一个罐子
另一包

然后是shortcutSpec.xml。我的pom将其移动到我的暂存目录:

<izpack:shortcuts version="5.0"
xmlns:izpack="http://izpack.org/schema/shortcuts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://izpack.org/schema/shortcuts http://izpack.org/schema/5.0/izpack-shortcuts-5.0.xsd">

<lateShortcutInstall />

<shortcut name="pack1" programGroup="false"
    desktop="true" applications="false" startMenu="no" startup="true"
    target="java -jar $INSTALL_PATH/pack1subdir/pack1.jar"
    workingDirectory="$INSTALL_PATH/pack1subdir/">
    <createForPack name="pack1" />
</shortcut>

<shortcut name="pack2" programGroup="false"
    desktop="true" applications="false" startMenu="no" startup="true"
    target="java -jar $INSTALL_PATH/pack2subdir/pack1.jar"
    workingDirectory="$INSTALL_PATH/pack2subdir/">
    <createForPack name="pack2" />
</shortcut>

安装程序不会在任何地方创建任何快捷方式。它结束时没有错误消息,没有日志,没有堆栈跟踪,什么都没有


帮助。

我通过进入izPack/lib/izPack-core-5.0.9.jar并打开其中的/com/izforge/izPack/bin/langpacks/installer/文件夹修复了这个问题。然后编辑bra.xml文件并添加以下行:

<str id="ShortcutPanel.regular.startup" txt="Iniciar com o Windows"/>

然后保存并更新jar中的文件,并重建安装