Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e661e87

Browse files
committed
增加创建一个简单的模块例子
1 parent e7e60d3 commit e661e87

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
javac -d out --module-source-path src --module dockerx.firstModule
4+
5+
jar --create --file mods/dockerx.firstModule.jar --main-class com.example.Main --module-version 1.0 -C out/dockerx.firstModule .
6+
7+
java --module-path mods --module dockerx.firstModule
8+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.example;
2+
3+
public class Main {
4+
public static void main(String[] args) {
5+
System.out.println("Hello Java9");
6+
}
7+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module dockerx.firstModule {
2+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /