File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed
src/main/java/org/mangorage/bootstrap Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change 1515
1616public final class Bootstrap {
1717
18- private static ModuleLayer parent ;
19- private static boolean set = false ;
20-
21- public static void setParent (ModuleLayer moduleLayer ) {
22- if (set ) return ;
23- set = true ;
24- Bootstrap .parent = moduleLayer ;
25- }
26-
27-
28- // --launchProfile mangobot
2918 public static void main (String [] args ) throws IOException {
19+ ModuleLayer parent = null ;
3020
31- if (parent == null ) {
32- parent = ModuleLayer .boot ();
33- set = true ;
21+ if (Bootstrap .class .getModule () != null ) {
22+ parent = Bootstrap .class .getModule ().getLayer ();
23+ } else {
24+ parent = ModuleLayer .boot (); // We dont have a module for Bootstrap..., so assume we are using the boot layer...
3425 }
3526
3627 final var librariesPath = Path .of ("libraries" );
You can’t perform that action at this time.
0 commit comments