eclipse-platform / eclipse-platform/eclipse.platform

Unable to use relative path in `.ini` in MacOS launcher in custom RCP application

Open
#1,736 0 comments 0 reactions 0 assignees View on GitHub
bug macOS
Dominant language
Java
Stars
165
Forks
174
Avg merge
2d 8h
Merged PRs (30d)
22

Description

Ok, so, I have my own custom RCP application (LiClipse), where the `.ini` is changed so that it searches for the java vm at:

`../../../LiClipseJre19.app/Contents/MacOS/libjli.dylib` (the idea being that there's a `LiClipse.app` and a `LiClipseJre19.app` side by side, both signed and as separate apps).

Now, this works fine with with `Eclipse 2024-03`, but upon upgrading to `Eclipse 2024-12` this no longer works.

Details:

Structure:

![Image](https://github.com/user-attachments/assets/4fd379f7-b0a3-4647-a094-d0f0277ee703)

Some notes:

Trying to double click the `LiClipse.app` fails with:

`No Java virtual machine was found after searching the following locations: ../../../LiClipseJre19.app/Contents/MacOS/libjli.dylib`

Trying to `open LiClipse.app` fails with the same error.

Now, it doesn't always fail on all situations:

If I `Show Package Contents` and double click in `/Contents/MacOS/LiClipse`, it runs.

The same structure works if I download Eclipse and put the `Eclipse.app` next to `LiClipse.app` (so, not sure what could be special when it's not `Eclipse.app` with `eclipse` executable along with `eclipse.ini` and rather a custom RCP application).

If I put the full path to the java vm in `LiClipse.ini` instead of the relative one, it works.

Note: I also tried with different relative paths (such as `./LiClipseJre19.app/Contents/MacOS/libjli.dylib` and other variations with `./`, `../`, `../../` and it always fails in the regular open).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.