I use ant task
<fx:application id="mobibook"
name="MobiBook QwertoGenerator"
mainClass="com.qwertovsky.mobibook.generator.Main"
/>
<fx:jar destfile="${jarDir}/mobibook_generator-${git_ver}.jar">
<fx:application refid="mobibook"/>
<manifest>
<attribute name="Class-Path" value="${manifest.classpath}" />
<attribute name="Built-Date" value="${application.build.date}"/>
<attribute name="Implementation-Version" value="${git_ver} ${git_date}" />
</manifest>
<fileset dir="${classesDir}/main" />
</fx:jar>
But Class-Path attribute is not added to manifest.
I try javapackager with -classpath option. It add my path to JavaFX-Class-Path attribute. But it not work.
Exception in Application start method
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:751)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:548)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:48)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:134)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NoClassDefFoundError: org/ini4j/InvalidFileFormatException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2437)
...............
I need run
java -cp "lib/ini4j-0.5.2.jar:mobibook_generator-0.jar" com.javafx.main.Main
or add Class-Path to manifest.
What is wrong?
Edited by: Valery Qwertovsky on 11.02.2013 21:07