Skip to content

Conversation

melix
Copy link
Collaborator

@melix melix commented Aug 18, 2021

This commit introduces a classpath jar, a jar which contains no
classes but only a Class-Path manifest entry, so that the classpath
to native-image is passed this way instead of on the CLI.

This would fix the issue of long classpath entries on Windows.

Fixes #85

@melix
Copy link
Collaborator Author

melix commented Aug 18, 2021

Unfortunately, I don't think this will fix the reported issue: we're apparently moving the problem one level down. While it fixes the problem of passing a long classpath to native-image, it seems that native-image itself invokes a java process and passes an expanded -imagecp argument which contains the entries found in the classpath jar. As a consequence, fixing this would also require a fix to native-image itself.

melix added 4 commits August 18, 2021 10:59
This commit introduces a classpath jar, a jar which contains no
classes but only a Class-Path manifest entry, so that the classpath
to `native-image` is passed this way instead of on the CLI.

This would fix the issue of long classpath entries on Windows.

Fixes graalvm#85
This commit reworks the fix to use a fat jar instead of a pathing jar
to fix the long classpath issue under Windows. The reason is that
the `native-image` tool will nevertheless expand the pathing jar
classpath on another CLI invocation.
@melix
Copy link
Collaborator Author

melix commented Aug 18, 2021

Following discussion with @lazar-mitrovic , the implementation was changed to use a fat jar under Windows. This mode can be explicitly disabled.

@melix melix requested a review from lazar-mitrovic August 18, 2021 14:20
@melix melix added this to the 0.9.4 milestone Aug 18, 2021
Unfortunately, due to different bugs(?) in Maven, we cannot use the
shading plugin for tests, and we have to move the test execution to
the integration test phase.

See https://issues.apache.org/jira/browse/MSHADE-402
@melix melix merged commit d51b4be into graalvm:master Aug 19, 2021
@melix melix deleted the cc/issue-85 branch August 19, 2021 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CreateProcess error=206, The filename or extension is too long

2 participants