Thursday, 15 April 2010

java - launch4j exe can't find jre -



java - launch4j exe can't find jre -

issues launch4j

program consists on 1 uber jar via maven-shade plugin , data/ runs fine on jre7 machine, windows or linux

however i've been unable launch4j work.

launch4j config.xml:

<?xml version="1.0" encoding="utf-8"?> <launch4jconfig> <dontwrapjar>false</dontwrapjar> <headertype>gui</headertype> <jar>pllsolver-0.2alpha.jar</jar> <outfile>pllsolver-0.2alpha.exe</outfile> <errtitle>no jre found</errtitle> <cmdline></cmdline> <chdir></chdir> <priority>normal</priority> <downloadurl>http://java.com/download</downloadurl> <supporturl></supporturl> <stayalive>false</stayalive> <manifest></manifest> <icon>sicr.ico</icon> <jre> <path>jre7</path> <bundledjre64bit>false</bundledjre64bit> <minversion></minversion> <maxversion></maxversion> <jdkpreference>preferjre</jdkpreference> <runtimebits>64/32</runtimebits> </jre> <splash> <file>sicr.bmp</file> <waitforwindow>false</waitforwindow> <timeout>5</timeout> <timeouterr>true</timeouterr> </splash> <messages> </messages> </launch4jconfig>

then build, on windows, seek this:

ps k:\test> set path="k:\test\jre7\bin\" ps k:\test> ..\launch4j\launch4jc.exe .\config.xml launch4j: compiling resources launch4j: linking launch4j: wrapping launch4j: created k:\test\.\pllsolver-0.2alpha.exe ps k:\test> .\pllsolver-0.2alpha.exe ps k:\test>

it's @ point nice little window how failed find jre.

java in k:\test\jre7\bin\java.exe jar k:\test\pllsolver-0.2alpha.jar

additionally, don't know if issue yet, executable , data/ need in same directory. i'm planning improve pathing later don't have clear understanding of windows env variables.

a bit late maybe can still help ...

one thing works sure launch4j , jre bundle jre in folder of application.

to so:

create path 'jre' in folder '*.exe' copy jre in folder (this jre has fit 'min'/'max' conditions have set) set '<path>/jre</path>' within <jre> configuration of '.xml'

... should work

java linux windows launch4j

No comments:

Post a Comment