The java application does not work with java9 and eclipse

I am trying to create a HelloWorld module for Java9, the following steps have been given below.

  • File> New> Java Project project description com.hello

  • Right-click the project (e.g. com.hello)> New> Source Folder> enter the name of the source folder (. E. Com.hello ) p>

  • Right-click the source folder (i.e. com.hello)> New> Package> enter a name (the same as the name of the source folder ie com.hello)
  • Right-click the Source folder (i.e. com.hello)> New> File> enter the file name (the standard java9 file name for the module, which is module-info.java)

    module com.hello {
            exports com.hello;
    }
    
  • (i.e com.hello) > > (.. HelloWorld)

    package com.hello;
    
    public class HelloWorld {
    
            public static void main(String[] args) {
                    System.out.println("Hello World");
            }
    
    }
    

HelloWorld > > Java.

java.lang.module.FindException: com.hello

project catalog image

PS:

structure of the draft decision

: . . ()

. , "Java Builder" "com.hello". 19

+4
2

, Eclipse Oxygen.1a (4.7.1a) Release, 11 , 2017 JPMS Junit5 -

Java, , com.hello module-info.java src . , , : -

com.hello[project]
|
|-src
|  |
|  |-- com.hello[package]
|  |   |
|  |   |- HelloWorld.java [your class]
|  | 
|  |--module-info.java

. - Maven (pom.xml, ), Maven in Eclipse: .

+2

, @nullpointer. . , maven. artifact id.

,

group name : com.hello
artifact-id: your_project_name

maven eclipse

0

Source: https://habr.com/ru/post/1687476/


All Articles