2016-12-07 55 views
0

我正在更新我們的應用程序以使用Java 1.7,所以在OSX上我已更新到InfiniteKind AppBundlerTask。 (appbundler-1.0ea.jar)AppBundlerTask不在Info.plist中創建類路徑

當我運行任務時,它生成的info.plist根本沒有classpath。 (並且該應用程序無法運行。)另外,我一直無法找到更新的appbundlertask的Ant任務文檔。因此,在運行過程中它輸出唯一的味精是:

[bundleapp] Creating app bundle: Metrix 

的Ant任務看起來是這樣的:

<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${build-helpers-lib.dir}/appbundler-1.0ea.jar" /> 
<bundleapp outputdirectory="${build-finalJars.dir}" 
         jvmrequired="1.7" 
         name="Metrix" 
         displayName="Metrix" 
         identifier="Metrix" 
         shortversion="2017.1" 
         mainclassname="a.x" 
         copyright="(c)2017 EFI, Inc." > 
<classpath dir="${build-finalJars.dir}" > 
<include name="tomcat-websocket.jar" /> 
<include name="batik-parser-1.8.jar" /> 
<include name="flexlmmgmt.jar" /> 
... and a bunch more .jar files ... 
</classpath> 
<option value="-Xms512m"/> 
<option value="-Xmx4096m"/> 
<option value="-Dapple.laf.useScreenMenuBar=true"/> 
</bundleapp> 

所得的info.plist看起來是這樣的:

<?xml version="1.0" ?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
<plist version="1.0"> 
<dict> 
<key>CFBundleDevelopmentRegion</key> 
<string>English</string> 
<key>CFBundleExecutable</key> 
<string>JavaAppLauncher</string> 
<key>CFBundleIconFile</key> 
<string>GenericApp.icns</string> 
<key>CFBundleIdentifier</key> 
<string>Metrix</string> 
<key>CFBundleDisplayName</key> 
<string>Metrix</string> 
<key>CFBundleInfoDictionaryVersion</key> 
<string>6.0</string> 
<key>CFBundleName</key> 
<string>Metrix</string> 
<key>CFBundlePackageType</key> 
<string>APPL</string> 
<key>CFBundleShortVersionString</key> 
<string>2017.1</string> 
<key>CFBundleVersion</key> 
<string>1.0</string> 
<key>CFBundleSignature</key> 
<string>????</string> 
<key>NSHumanReadableCopyright</key> 
<string>(c)2017 EFI, Inc.</string> 
<key>NSHighResolutionCapable</key> 
<true/> 
<key>NSSupportsAutomaticGraphicsSwitching</key> 
<true/> 
<key>JVMVersion</key> 
<string>1.7</string> 
<key>JVMMainClassName</key> 
<string>a.x</string> 
<key>CFBundleDocumentTypes</key> 
<array> 
</array> 
<key>LSArchitecturePriority</key> 
<array> 
</array> 
<key>LSEnvironment</key> 
<dict> 
<key>LC_CTYPE</key> 
<string>UTF-8</string> 
</dict> 
<key>JVMOptions</key> 
<array> 
<string>-Xms512m</string> 
<string>-Xmx4096m</string> 
<string>-Dapple.laf.useScreenMenuBar=true</string> 
</array> 
<key>JVMDefaultOptions</key> 
<dict> 
</dict> 
<key>JVMArguments</key> 
<array> 
</array> 
</dict> 
</plist> 

回答

0

做很多更多挖掘和測試我已經發現:

  1. 使用新的Jar啓動器,您(顯然)不需要Plist中的類路徑。
  2. 新啓動程序將user.dir屬性設置爲與user.home相同。這會導致我們的應用在啓動時失敗。
  3. 顯然沒有新的jarbuildertask文件