Skip to content

Java Modules support #259

Open
Open
@fvarrui

Description

@fvarrui

I'm submitting a…

  • bug report
  • feature request
  • other

Short description of the issue/suggestion:

Add support for JPMS (Java Platform Modules System).

What is the expected behavior?

If Java version 9+ and root JAR is modular, then run java with --module and --module-path params.

What is the current behavior?

Currently all generated apps run in legacy mode (all JARs are passed to the JVM in the classpath - loaded in the unnamed module).

Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?

Running the app in legacy mode (non-modular main JAR):

java --class-path libs\*;${name}-${version}-runnable-jar ${mainclass} ${args}

Replace ; with : and \ with / in classpath on Mac OS and GNU/Linux.

Running the app in modular mode (modular main JAR):

java --module-path=libs;${name}-${version}-runnable-jar --module=${modulename}/${mainclass} ${args}

${modulename} can be extracted from the JAR.
Replace ; with : in classpath on Mac OS and GNU/Linux.

Please tell us about your environment:

  • JavaPackager version: 1.7.0
  • OS version: All platforms.
  • JDK version: 9+
  • Build tool:
    • Maven
    • Gradle

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions