72 cl /LD /Fe../lib/world.dll /I$TESTJAVA/include /I$TESTJAVA/include/win32 org_astro_World.c) 73 ;; 74 CYGWIN* ) 75 (cd z.test/native/src; 76 cl /LD /Fe../lib/world.dll /I$TESTJAVA/include /I$TESTJAVA/include/win32 org_astro_World.c) 77 ;; 78 * ) 79 echo "Unrecognized system!" 80 exit 1 81 esac 82 83 84 mkdir -p z.test/module-files 85 $BIN/jpkg -d z.test/module-files -m z.test/modules/com.greetings \ 86 jmod com.greetings 87 $BIN/jpkg -d z.test/module-files -m z.test/modules/org.astro \ 88 --natlib z.test/native/lib jmod org.astro 89 $BIN/jmod -L z.lib create 90 $BIN/jmod -L z.lib install z.test/module-files/* 91 $BIN/java -L z.lib -m com.greetings 92 93 exit 0 94 95 : hello pass compile 96 97 module com.greetings @ 0.1 { 98 requires org.astro @ 1.2; 99 class com.greetings.Hello; 100 } 101 102 package com.greetings; 103 import org.astro.World; 104 public class Hello { 105 public static void main(String[] args) { 106 System.out.println("Hello, " + World.name() + "!"); 107 } 108 } 109 110 module org.astro @ 1.2 { } 111 | 72 cl /LD /Fe../lib/world.dll /I$TESTJAVA/include /I$TESTJAVA/include/win32 org_astro_World.c) 73 ;; 74 CYGWIN* ) 75 (cd z.test/native/src; 76 cl /LD /Fe../lib/world.dll /I$TESTJAVA/include /I$TESTJAVA/include/win32 org_astro_World.c) 77 ;; 78 * ) 79 echo "Unrecognized system!" 80 exit 1 81 esac 82 83 84 mkdir -p z.test/module-files 85 $BIN/jpkg -d z.test/module-files -m z.test/modules/com.greetings \ 86 jmod com.greetings 87 $BIN/jpkg -d z.test/module-files -m z.test/modules/org.astro \ 88 --natlib z.test/native/lib jmod org.astro 89 $BIN/jmod -L z.lib create 90 $BIN/jmod -L z.lib install z.test/module-files/* 91 $BIN/java -L z.lib -m com.greetings 92 $BIN/jmod -L z.libImageLib create --natlib z.libSpecifyLib_libs 93 $BIN/jmod -L z.libImageLib install z.test/module-files/* 94 $BIN/java -L z.libImageLib -m com.greetings 95 96 exit 0 97 98 : hello pass compile 99 100 module com.greetings @ 0.1 { 101 requires org.astro @ 1.2; 102 class com.greetings.Hello; 103 } 104 105 package com.greetings; 106 import org.astro.World; 107 public class Hello { 108 public static void main(String[] args) { 109 System.out.println("Hello, " + World.name() + "!"); 110 } 111 } 112 113 module org.astro @ 1.2 { } 114 |