GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rakeshopensource/modularjava9example: JAVA 9 modules and custom JRE creation

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
com.hello.client
com.hello.client
 
 
com.hello
com.hello
 
 
.gitattributes
.gitattributes
 
 
README.md
README.md
 
 
build.sh
build.sh
 
 
helloworld9.iml
helloworld9.iml
 
 

Repository files navigation

modularjava9example

This demonstrates modules and custom jre creation in JAVA 9.

create directory to hold modules

$ mkdir -p output/mlib

compile hello module and make hello.jar

$ javac -p output/mlib -d output/classes `find com.hello -name *.java`
$ jar -c -f output/mlib/hello.jar  -C output/classes .
$ /bin/rm -rf output/classes

compile helloclient module using hello module and make helloclient.jar

$ javac -p output/mlib -d output/classes `find com.hello.client -name *.java`
$ jar -c -f output/mlib/helloclient.jar --main-class com.hello.client.HelloClient -C output/classes .
$ /bin/rm -rf output/classes

program execution

$ java -p output/mlib -m com.hello.client/com.hello.client.HelloClient

Create custom JRE

$ /bin/rm -rf helloclientimage/
jlink --module-path /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/jmods:output/mlib --add-modules com.hello --add-modules com.hello.client --output helloclientimage --launcher=helloclient=com.hello.client

list custom jre modules

$ ./helloclientimage/bin/java --list-modules

custom jre exection

$ ./helloclientimage/bin/java -m com.hello.client

About

JAVA 9 modules and custom JRE creation

Topics

iotjava-9java-9-module

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.