java - Bundle the JAR File into an App Package with Preloader JavaFx -


i'm trying create app package preloader class using ant. following build.xml file app created. after double click on viewer.app preloader screen doesn't appear. when start application directly java -jar viewer.jar preloader screen can ssen on windows os , mac os.

<taskdef name="bundleapp"          classname="com.oracle.appbundler.appbundlertask"             classpath="classlib/appbundler-1.0.jar" />  <target name="bundle-myproject">     <bundleapp outputdirectory="dist"         name="viewer"         displayname="myproject viewer"         identifier="myproject.start"         mainclassname="myproject.start"         icon="classlib/myproject.icns">      <runtime dir="${env.java_home}" />     <classpath file="dist/viewer.jar" />      <classpath dir="dist/lib" includes="*.jar" />      </bundleapp> </target> 

an additional setting preloaderclass="myproject.preloader" doesn't work. how display preloader screen in app package? don't need other packages .exe .dmg or .msi files. appreciated.

i have foud solution

<?xml version="1.0" encoding="utf-8"?> 

<description>create .app test project.</description>  <target name="bundle-test">      <taskdef    resource="com/sun/javafx/tools/ant/antlib.xml"                 uri="javafx:com.sun.javafx.tools.ant"                 classpath=".:${java.home}\..\lib\ant-javafx.jar"/>      <fx:deploy  nativebundles="all" width="600" height="600" outdir="outputdir">         <info   title="viewer"                  vendor="my company"                 description="viewer application"                 copyright="my company ..."/>          <fx:application                  name="viewer"                 mainclass="myapp.start"                 preloaderclass="helpers.firstpreloader">             <fx:argument>ide=false</fx:argument>             <fx:argument>app=true</fx:argument>         </fx:application>          <fx:platform basedir="${java.home}">             <fx:jvmarg value="-xms512m"/>             <fx:jvmarg value="-xmx1024m"/>         </fx:platform>          <fx:resources>             <fx:fileset dir="dist">                 <include name="viewer.jar"/>                 <include name="lib/*.jar"/>             </fx:fileset>         </fx:resources>      </fx:deploy>      <delete file="outputdir/null.html"/>     <delete file="outputdir/null.jnlp"/>     <delete file="outputdir/viewer.jar"/>     <delete file="outputdir/bundles/viewer-1.0.dmg"/>     <delete file="outputdir/bundles/viewer-1.0.pkg"/>     <delete dir="outputdir/lib"/>  </target> 


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -