-
Notifications
You must be signed in to change notification settings - Fork 42
/
run-with-modules
executable file
·31 lines (23 loc) · 1020 Bytes
/
run-with-modules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
#
# This shows how to compile & run the example
# modules using the new Java9 command line parameters
#
# make module directories
mkdir -p target/module/de.exxcellent.java9
mkdir -p target/module/anothermodule
# compiling
echo "=== Compiling playground"
javac $(find playground/src/main/java -name "*.java") \
-d target/module/de.exxcellent.java9
echo -e "\n=== Compiling playground-dependent"
javac $(find playground-dependent/src/main/java -name "*.java")\
-d target/module/anothermodule \
-modulepath target/module
$ java -modulepath target/module \
-m anothermodule/de.exxcellent.anothermodule.TestJigsawSPI
echo -e "\n=== Running anothermodule/de.exxcellent.anothermodule.RetrieveModuleInfo"
java -modulepath target/module -m anothermodule/de.exxcellent.anothermodule.RetrieveModuleInfo
echo -e "\n=== Running anothermodule/de.exxcellent.anothermodule.TestJigsawSPI"
java -modulepath target/module \
-m anothermodule/de.exxcellent.anothermodule.TestJigsawSPI