Skip to content

Path resolution causes bundled jre to not be found on linux when building from windows #419

Closed
@keastrid

Description

@keastrid

I'm submitting a…

  • bug report
  • feature request
  • other

Short description of the issue/suggestion:
When building a .deb for linux on windows, the jre ends up split into 2 pieces as the windows drive letter is prepended to the path, causing the launch script to fail to run.
image

I believe this is caused by the fix for #302, where the installation path is resolved as an absolute path first.

Steps to reproduce the issue/enhancement:

  1. Build a deb on windows with bundled jre
  2. install deb on linux
  3. attempt to run (it will say the app is not installed, if you inspect the install location and attempt to run manually from there it say it cannot find the bundled jre)

What is the expected behavior?
Have the app run and not to include window's paths.

What is the current behavior?
App cannot run, installation succeeds but attempting to run the app will result in No such file or directory error.

Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?
As a test, I changed the 2 appPath.getAbsolutePath() to appPath.toPath().normalize().toString() (not sure if normalizing is what you were aiming for with the absolute path call), and this build and install succeeded, though I am using the default installation location.

What is the motivation / use case for changing the behavior?
Ability to build for linux from windows

Please tell us about your environment:

  • JavaPackager version: 1.7.5
  • OS version: Windows 10
  • JDK version: 21
  • Build tool:
    • Maven
    • Gradle

Other information (e.g. related issues, suggestions how to fix, links for us to have context)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeedbackWaiting for feedbackfixedIssue fixed and release pending

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions