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 b840b0b

Browse files
Kentros AlexandrosKentros Alexandros
Kentros Alexandros
authored and
Kentros Alexandros
committed
2 parents 146893a + ffff196 commit b840b0b

File tree

1 file changed

+51
-6
lines changed

1 file changed

+51
-6
lines changed

‎README.md‎

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Java 9 ++ modules full tutorial
22
#### Everything is tested with JDK 11.0.3
33
![Logging-Sins-793x397](https://user-images.githubusercontent.com/20374208/58885740-674c4900-86eb-11e9-9448-b0af3d8b52c0.png)
4-
### Complety PDF with tutorial [download](https://github.com/goxr3plus/java9-modules-tutorial/files/3256292/JPMS.PDF)
4+
### Complete PDF for the tutorial [download](https://github.com/goxr3plus/java9-modules-tutorial/files/3256292/JPMS.PDF)
55

6-
I tried to make a more simple , including code examples and pictures tutorial about a *hot and important topic* whhich is nothing else than JPMS which came in Java 9. I hope you enjoy :
6+
I tried to make a simple yet fun, including code examples and pictures tutorial about a **hot and important topic** which is JPMS([**Java Platform Module System**](https://en.wikipedia.org/wiki/Java_Platform_Module_System)) which came in Java 9.
77

8-
9-
- **Contents**
8+
- **Tutorial Contents**
109
- [**Simple module**](#1)
1110
- [**Optional**](#2)
1211
- [**Transitive**](#3)
@@ -15,6 +14,8 @@ I tried to make a more simple , including code examples and pictures tutorial ab
1514
- [**Observable**](#6)
1615
- [**Aggregator**](#7)
1716
- [**Module Graph**](#8)
17+
- [**Package Naming Conflicts**](#9)
18+
- [**Module Resolution Process**](#10)
1819

1920

2021
Highly based on [ java-9-new-features-in-simple-way-jshell-jpms-and-more ](https://www.udemy.com/java-9-new-features-in-simple-way-jshell-jpms-and-more/) and [Jenkov Tutorials](http://tutorials.jenkov.com/java/modules.html)
@@ -201,14 +202,14 @@ error: cyclic dependence involving moduleA requires moduleA;
201202
Compile :
202203

203204
``` JAVA
204-
javac --module-source-path aggregator_module -d out6 -m aggregator,moduleA,moduleB,moduleC,useModule
205+
javac --module-source-path aggregator_module -d out7 -m aggregator,moduleA,moduleB,moduleC,useModule
205206
```
206207

207208

208209
Run :
209210

210211
``` JAVA
211-
java --module-path out6 -m useModule/pack4.Main
212+
java --module-path out7 -m useModule/pack4.Main
212213
```
213214

214215

@@ -226,5 +227,49 @@ error: cyclic dependence involving moduleA requires moduleA;
226227
![chrome_2019年06月06日_10-42-12](https://user-images.githubusercontent.com/20374208/59015566-f66e7380-8847-11e9-86ab-d7e6799a866a.png)
227228
![chrome_2019年06月06日_10-42-23](https://user-images.githubusercontent.com/20374208/59015567-f66e7380-8847-11e9-94c6-86080734321b.png)
228229

230+
<a name="9"></a>
231+
---
232+
# 9. ------------ Package Naming Conflicts ------------
233+
234+
![chrome_2019年06月10日_15-49-59](https://user-images.githubusercontent.com/20374208/59196550-af5de680-8b97-11e9-843c-59b4384d03aa.png)
235+
![chrome_2019年06月10日_15-50-33](https://user-images.githubusercontent.com/20374208/59196552-af5de680-8b97-11e9-8635-ba5702194a6b.png)
236+
![chrome_2019年06月10日_15-50-45](https://user-images.githubusercontent.com/20374208/59196553-af5de680-8b97-11e9-9496-023ec2b7b821.png)
237+
![chrome_2019年06月10日_15-51-00](https://user-images.githubusercontent.com/20374208/59196554-aff67d00-8b97-11e9-81b9-2617b95b2389.png)
238+
239+
Compile :
240+
241+
``` JAVA
242+
javac --module-source-path name_conflicts_module -d out9 -m moduleA,moduleB,useModule
243+
```
244+
245+
This will produce the following error :
229246

247+
``` JAVA
248+
error: module useModule reads package pack1 from both moduleA and moduleB
249+
module useModule{
250+
^
251+
1 error
252+
```
230253

254+
<a name="10"></a>
255+
---
256+
# 10. ------------ Module Resolution Process ------------
257+
258+
![chrome_2019-06-10_16-06-02](https://user-images.githubusercontent.com/20374208/59197415-f64cdb80-8b99-11e9-8ed9-5ec4b7add576.png)
259+
![chrome_2019-06-10_16-06-35](https://user-images.githubusercontent.com/20374208/59197416-f64cdb80-8b99-11e9-98ac-38c11509130f.png)
260+
![chrome_2019-06-10_16-06-51](https://user-images.githubusercontent.com/20374208/59197418-f64cdb80-8b99-11e9-9668-8e8060923af4.png)
261+
![chrome_2019-06-10_16-07-02](https://user-images.githubusercontent.com/20374208/59197419-f64cdb80-8b99-11e9-90a3-b377c3f34cc8.png)
262+
![chrome_2019-06-10_16-07-38](https://user-images.githubusercontent.com/20374208/59197420-f64cdb80-8b99-11e9-8680-b230fac2b96c.png)
263+
![chrome_2019-06-10_16-07-46](https://user-images.githubusercontent.com/20374208/59197421-f6e57200-8b99-11e9-9ab7-f97a06f3b3c7.png)
264+
265+
Compile :
266+
267+
``` JAVA
268+
javac --java-module-path resolution_process_module -d out10 -m useModule,moduleA,moduleB,moduleC,moduleD
269+
```
270+
271+
Run :
272+
273+
``` JAVA
274+
java --module-path out10 --show-module-resolution -m useModule
275+
```

0 commit comments

Comments
(0)

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