The “-1.x86-64” is something that javapackager automatically appends.

I just confirmed that $JAVA_HOME/bin/java -version indicates the 64-bit VM.

I’m invoking javapackager via an Exec task in my Gradle build script.  
(I’m not using the JavaFX plugin because it has even less documentation, it 
does strange things like explicitly adding jfxrt.jar to the classpath even on 
Java 8, and it’s basically unmaintained now :-( .)

Here is what my invocation looks like:

def bundleVersion = project.version.split('-')[0] // remove -snapshot

task javapackager(type: Exec, dependsOn: [checkRpmOrDebBased, 
prepareDistribution]) {
        executable "${System.getenv('JAVA_HOME')}/bin/javapackager"
        doFirst {
        args = [
                '-deploy',
                '-native', project.packageType, // use deb or rpm for linux
                '-daemon',
                '-title', 'My Server',
                '-vendor', 'My Company',
                '-srcdir', "${buildDir}/extracted-dist",
                '-outdir', "${buildDir}",
                '-outfile', 'MyServer',
                '-name', 'MyServer',
                '-appclass', 'com.something.server.MyServerMain',
                //"-BappResources=${buildDir}/extracted-dist", // conflicts 
with -srcdir ?
                '-BuserJvmOptions=-Xmx=512m',
                
'-BjvmProperties=java.util.logging.config.file=conf/logging.properties',
                "-BappVersion=${bundleVersion}",
                '-BmainJar=MyServer.jar',
                '-BlicenseFile=EULA.rtf',
                '-BsystemWide=true',
                //'-BserviceHint=true', // conflicts with -daemon ?
                '-BrunAtStartup=true',
                '-BstartOnInstall=true',
                '-BstopOnUninstall=true'
                ]
        }
}


${buildDir}/extracted-dist  contains a full layout of the application image.


Scott


> On Feb 2, 2016, at 7:03 PM, Chris Bensen <chris.ben...@oracle.com> wrote:
> 
> This list or the Deployment blog 
> (https://blogs.oracle.com/talkingjavadeployment/) are the best places to get 
> help with the javapackager.
> 
> Is your app built with the 64-bit or 32-bit packager? I noticed “x86_64” 
> appended to the name. If it’s 32-bit you could try running:
> 
> sudo apt-get install libx11-6:i386
> 
> Chris
> 
> 
>> On Feb 2, 2016, at 1:49 PM, Scott Palmer <swpal...@gmail.com> wrote:
>> 
>> What's the best place to go to get help with using the javapackager ?
>> 
>> I've read the docs, but things aren't working smoothly and it would be
>> helpful if there were some known working examples to base things on.  I'm
>> not finding any examples that use the -daemon or -BserviceHint=true
>> options, for example.
>> 
>> I attempted to make a .rpm that installs a service/daemon but when I try to
>> install it, it fails claiming the following dependencies cannot be met:
>> 
>>       libX11.so.6 is needed by myserver-1.0-1.x86_64
>>       libXext.so.6 is needed by myserver-1.0-1.x86_64
>>       libXi.so.6 is needed by myserver-1.0-1.x86_64
>>       libXrender.so.1 is needed by myserver-1.0-1.x86_64
>>       libXtst.so.6 is needed by myserver-1.0-1.x86_64
>>       libasound.so.2 is needed by myserver-1.0-1.x86_64
>> 
>> Considering the app already runs fine on this same system, I'm a bit
>> confused that it is complaining of missing dependencies.
>> 
>> Scott
> 

Reply via email to