Project Jigsaw: Early-Access Builds available on jdk9.java.net/jigsaw

Mandy Chung mandy.chung at oracle.com
Thu Sep 10 22:23:28 UTC 2015



On 09/10/2015 01:55 PM, Jim Connors wrote:
>
> When you run the com.greetings.Main class via:
>
>     $ java -mp mods -m com.greetings/com.greetings.Main
>
> The Quick Start guide shows the output as:
>
>     class org.fastsocket.FastNetworkSocket
>
> The Main.java file referenced above prints nothing (at least in my 
> case), would it have to be modified slightly, something like:
>
> $ cat src/com.greetings/com/greetings/Main.java
>     package com.greetings;
>
>     import com.socket.NetworkSocket;
>
>     public class Main {
>         public static void main(String[] args) {
>             NetworkSocket s = NetworkSocket.open();
>             System.out.println(s.getClass().toString());
>        }
>     }
>

I think you are right.  The System.out.println is missing in the sample 
code in the quickstart guide.  The key point there is to show that the 
service provider implementation class is loaded.

Mandy

Mandy


More information about the jigsaw-dev mailing list