Skip to content

cjug/jigsaw-commons-lang3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jigsaw-commons-lang3

Some fun with Project Jigsaw

  1. Download the early release https://jdk8.java.net/jigsaw/ (you'll want the JDK modules image)
  2. Read the Quick Start http://openjdk.java.net/projects/jigsaw/doc/quickstart.html
  3. Ensure you either put the jigsaw bin directory on your path or use fully qualified file paths to the executables.

Example: Using Apache Commons Lang as a module

Easy Running the example code:

  1. Create a module library directory by running:
jmod -L moduleLib create
  1. Install the prebuilt modules by running:
jmod -L moduleLib install modules/com.bobpaulin.apache.jigsaw@0.1.jmod modules/org.apache.commons.lang3@3.3.1.jmod
  1. Run the Demo Code:
java -L moduleLib -m com.bobpaulin.apache.jigsaw

A little more fun. Compile the modules from scratch:

  1. Create a module library directory by running (if you did the example from before delete moduleLib directory):
jmod -L moduleLib create
  1. Compile Apache Commons Lib
javac -d modules/org.apache.commons.lang3 -sourcepath common-lang-jigsaw `find common-lang-jigsaw/src/main/java -name '*.java'`
  1. Install Apache Commons Lib
jmod -L moduleLib install modules org.apache.commons.lang3
  1. Compile Demo Code:
javac.exe -d modules/com.bobpaulin.apache.jigsaw -sourcepath com.bobpaulin.apache.jigsaw `find com.bobpaulin.apache.jigsaw/src -name '*.java'`
  1. Install Demo Code
jmod -L moduleLib install modules com.bobpaulin.apache.jigsaw
  1. Run Demo Code
java -L moduleLib -m com.bobpaulin.apache.jigsaw

Extra Credit:

  1. Packaging built modules by running:
jpkg -m modules/com.bobpaulin.apache.jigsaw jmod com.bobpaulin.apache.jigsaw
jpkg -m modules/org.apache.commons.lang3 jmod org.apache.commons.lang3

MORE EXTRA Credit:

  1. Create a new bundle of an Open Source Library by creating a module-info.java in the source root:
module org.apache.commons.lang3 @ 3.3.1 {
    exports org.apache.commons.lang3;
}

Releases

No releases published

Packages

No packages published

Languages