我有jar可执行文件的IzPack安装。 声明了ShortcutPanel,quickSpec.xml被很好地拾取并且install.xml包含
<natives>
<native type="izpack" name="ShellLink.dll"/>
<native type="izpack" name="ShellLink_x64.dll"/>
</natives>
在生成的安装程序jar中,我在以下路径下看到上述两个DLL: COM \ izforge \的IzPack \ BIN \天然\的IzPack \
安装完成&#34;创建快捷方式&#34;面板但没有在程序或桌面中创建的快捷方式,虽然&#34;快捷方式&#34;标签有:
programGroup="true"
desktop="true"
applications="true"
startMenu="false"
startup="false"
当安装DEBUG时,我看到以下内容:
Failed to load library: ShellLink: no ShellLink in java.library.path java.lang.UnsatisfiedLinkError: no ShellLink in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.izforge.izpack.util.Librarian.loadSystemLibrary(Librarian.java:35 8)
at com.izforge.izpack.util.Librarian.loadArchSpecificLibrary(Librarian.j ava:236)
at com.izforge.izpack.util.Librarian.loadLibrary(Librarian.java:122)
at com.izforge.izpack.util.os.ShellLink.initialize(ShellLink.java:529)
at com.izforge.izpack.util.os.ShellLink.<init>(ShellLink.java:397)
at com.izforge.izpack.util.os.Win_Shortcut.initialize(Win_Shortcut.java: 85)
at com.izforge.izpack.panels.shortcut.ShortcutPanelLogic.<init>(Shortcut PanelLogic.java:187)
at com.izforge.izpack.panels.shortcut.ShortcutPanel.<init>(ShortcutPanel .java:194)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInje ctor.java:145)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInje ctor.java:342)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDepende ncyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance( ConstructorInjector.java:364)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(Abs tractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:9 1)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContain er.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContai ner.java:647)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContai ner.java:678)
at com.izforge.izpack.core.container.AbstractContainer.getComponent(Abst ractContainer.java:131)
at com.izforge.izpack.core.factory.DefaultObjectFactory.create(DefaultOb jectFactory.java:74)
at com.izforge.izpack.core.factory.DefaultObjectFactory.create(DefaultOb jectFactory.java:102)
at com.izforge.izpack.installer.panel.AbstractPanelView.createView(Abstr actPanelView.java:372)
at com.izforge.izpack.installer.panel.AbstractPanelView.getView(Abstract PanelView.java:185)
at com.izforge.izpack.installer.gui.IzPanels.initialise(IzPanels.java:80 )
at com.izforge.izpack.installer.gui.InstallerFrame.buildGUI(InstallerFra me.java:374)
at com.izforge.izpack.installer.gui.InstallerController$1.run(InstallerC ontroller.java:35)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionP rivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Failed to load library: C:\Users\krok\AppData\Local\Temp\ShellLink88513690863102
40915.dll: C:\Users\krok\AppData\Local\Temp\ShellLink8851369086310240915.dll: Ca n't load IA 32-bit .dll on a AMD 64-bit platform java.lang.UnsatisfiedLinkError: C:\Users\krok\AppData\Local\Temp\ShellLink885136
9086310240915.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.izforge.izpack.util.Librarian.load(Librarian.java:381)
at com.izforge.izpack.util.Librarian.loadJarLibrary(Librarian.java:333)
at com.izforge.izpack.util.Librarian.loadFromClassPath(Librarian.java:29 3)
at com.izforge.izpack.util.Librarian.loadArchSpecificLibrary(Librarian.j ava:236)
at com.izforge.izpack.util.Librarian.loadLibrary(Librarian.java:122)
at com.izforge.izpack.util.os.ShellLink.initialize(ShellLink.java:529)
at com.izforge.izpack.util.os.ShellLink.<init>(ShellLink.java:397)
at com.izforge.izpack.util.os.Win_Shortcut.initialize(Win_Shortcut.java: 85)
at com.izforge.izpack.panels.shortcut.ShortcutPanelLogic.<init>(Shortcut PanelLogic.java:187)
at com.izforge.izpack.panels.shortcut.ShortcutPanel.<init>(ShortcutPanel .java:194)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInje ctor.java:145)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInje ctor.java:342)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDepende ncyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance( ConstructorInjector.java:364)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(Abs tractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:9 1)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContain er.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContai ner.java:647)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContai ner.java:678)
at com.izforge.izpack.core.container.AbstractContainer.getComponent(Abst ractContainer.java:131)
at com.izforge.izpack.core.factory.DefaultObjectFactory.create(DefaultOb jectFactory.java:74)
at com.izforge.izpack.core.factory.DefaultObjectFactory.create(DefaultOb jectFactory.java:102)
at com.izforge.izpack.installer.panel.AbstractPanelView.createView(Abstr actPanelView.java:372)
at com.izforge.izpack.installer.panel.AbstractPanelView.getView(Abstract PanelView.java:185)
at com.izforge.izpack.installer.gui.IzPanels.initialise(IzPanels.java:80 )
at com.izforge.izpack.installer.gui.InstallerFrame.buildGUI(InstallerFra me.java:374)
at com.izforge.izpack.installer.gui.InstallerController$1.run(InstallerC ontroller.java:35)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionP rivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
我不确定32位DLL错误是否至关重要,因为安装必须使用64位,这也是提供的。但是根本没有在日志中使用ShellLink_x64.dll的痕迹。 该脚本还包含
<run-privileged/>
所以它在管理员权限下工作。 有任何想法吗 ?
答案 0 :(得分:0)
我已经从IzPack 5.1.2降级到5.0.6并使用相同的脚本工作。 注意到生成的JAR中的com \ izforge \ izpack \ bin \ native \现在包含更多文件夹和DLL,而不仅仅是ShellLink.dll和ShellLink_x64.dll。