Opened 2 weeks ago

Last modified 8 days ago

#2376 new defect

Launch4j build warning Java 11

Reported by: zzz Owned by:
Priority: minor Milestone: undecided
Component: installer Version: 0.9.37
Keywords: Cc:
Parent Tickets:

Description

buildexe:
     [echo] See the file "build.properties" if this step fails.
      [jar] Building MANIFEST-only jar: .../i2p.i2p/build/launchi2p.jar
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:.../i2p.i2p/installer/lib/launch4j/lib/xstream.jar) to field java.util.Properties.defaults
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
 [launch4j] Compiling resources

Subtickets (add)

Change History (1)

comment:1 Changed 8 days ago by zab

Some background - with the introduction of modules, reflection needs to be explicitly enabled for each module via the "opens" directive ( https://www.baeldung.com/java-9-modularity pt. 4.8 ) Problem is, java.util.Properties is part of the base module which comes with the JRE so we can't modify it's descriptor. So this is really not our bug but an issue with Launch4j.

This is a good place to plug this project - https://github.com/knaccc/embedded-i2p-java-router-with-sam which uses "jlink" to create an executable with embedded minimal JRE.

Note: See TracTickets for help on using tickets.