I am trying to create a HelloWorld module of Java9 following steps were given below.
Right-click project(i.e. com.hello)>New>Source Folder>enter source folder name(.e. com.hello)
- Right click Source Folder(i.e. com.hello)>New>Package>enter name(same as source folder name i.e com.hello)
Right click Source Folder(i.e. com.hello)>New>File>enter file name(java9 standard file name for module which is module-info.java)
module com.hello { exports com.hello; }
Right Click Package(i.e com.hello)>New>enter class name(i.e. HelloWorld)
package com.hello; public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World"); } }
Right click on HelloWorld>Run As>Java Application It throws
Error occurred during initialization of boot layer
java.lang.module.FindException: Module com.hello not found
My project directory structure
PS: after trying this solution my project structure looks like below
Notice: I have noticed one more thing. Afte saving the changes. eclipse(oxygen) throws
Errors occurred during the build. Errors running builder 'Java Builder' on project 'com.hello'. Unknown constant pool type 19