javafx - Include java.exe in the runtime built -


to create installer javafx application, have followed tutorial . , expected makes installer.

the directory structure makes this:

myapp

  +app    +runtime    +myapp.exe    +myapp.ico 

the runtime contains java runtime. issue is, application creates java process , needs path of java.exe. on browsing through above folder runtime, not contain java.exe.

i.e.

runtime

+jre      +bin           +java.dll            missing java.exe 

how path of java.exe can use start other java process. or how start java process java.dll?

ps: this link discusses same question not answer it.

the native packaging cookbook on fine tuning application bundle oracle java deployment team contains instructions on how customize pieces of jre included in self-contained application.

i'll copy , paste relevant section here in case original link goes dead:

if using packaging tools produce installable package there need tweak application image before wrapped installer. why? example may want sign application, not appear untrusted os (for example please mac os x gatekeeper).

also default self-contained application not contain full copy of java runtime. include set of mandatory components. part of reason why approach taken want reduce package size. however, there situations application may depend on these optional components , in case need way add them private runtime. example https connections not work if jre/lib/ext/sunjce_provider.jar missing.

currently can achieved providing custom config script executed after application image populated. in example above icon, need enable verbose output find name of script file , drop location packaging tools find it. note scripting language platform specific too. support shell mac/linux , windows script on windows.

how find out application image located? custom scripts run in directory config files stored application image can accessed using relative platform specific path. can derive path verbose output or setting environment variable javafx_ant_debug true keep intermediate build artifacts.

here sample script (contributed john petersen) can use add jre/lib/ext/sunjce_provider.jar application package of myapp on windows platform. script using javascript use vbscript windows scripting.

<?xml version="1.0" ?>   <package>      <job id="postimage">       <script language="jscript">        <![cdata[           var ofso = new activexobject("scripting.filesystemobject");           var ofolder = ofso.getfolder(".");           var = ofolder.path + "\\myapp\\app\\sunjce_provider.jar";           var = ofolder.path + "\\myapp\\runtime\\jre\\lib\\ext";           if (!ofso.folderexists(to)) {             ofso.createfolder(to);           }           += "\\";           ofso.copyfile(from, to);        ]]>       </script>      </job>   </package>  

the above discusses copying sunjce_provider.jar file jre installation application bundle, procedure copying other file, including java.exe should similar.

further details of how create bundle customized in javafx deployment guide.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -