#JavaPackager include JRE properly

8 messages · Page 1 of 1 (latest)

mighty spruce
#

I'm a bit confused on how to properly set up JavaPackager to include the JRE. I'm testing my application on Windows with a friend who doesn't have any JDKs or JREs installed, but attached is what's happening when they run the program. Here is the corresponding part of my pom.xml:

<configuration>
    <!-- mandatory -->
    <mainClass>lol.ocelot.dragonmanager.DragonManager</mainClass>
    <!-- optional -->
    <bundleJre>true</bundleJre>
    <jrePath>/Library/Java/JavaVirtualMachines/jdk-21.jdk/Contents/Home</jrePath>
    <generateInstaller>false</generateInstaller>
    <additionalResources>
        <additionalResource>characters/</additionalResource>
        <additionalResource>homebrew/</additionalResource>
    </additionalResources>
    <copyDependencies>true</copyDependencies>
    <administratorRequired>false</administratorRequired>
    <platform>windows</platform>
    <createZipball>true</createZipball>
</configuration>

If I use <jdkPath> instead of <jrePath> it says it's an invalid JDK for windows, but if that's what I'm supposed to be doing, then I'm not sure how to configure a jdk for windows or linux while I'm using MacOS. Any ideas?

left notchBOT
#

This post has been reserved for your question.

Hey @mighty spruce! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

silent wagon
#

I think that if you're bundling your project for Windows, you need to download a Windows JRE

#

just download it and specify the path, not necessarily install it

mighty spruce
#

so just downloading it as a compressed archive, unzipping it and selecting that folder ?

#

that seems to work, thanks !

left notchBOT
# mighty spruce that seems to work, thanks !

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.