#Need help in Java 9 module in Vs Code
1 messages ยท Page 1 of 1 (latest)
<@&987246527741304832> please have a look, thanks.
Here is an AI assisted attempt to answer your question ๐ค. Maybe it helps! In any case, a human is on the way ๐. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
To create a Java 9 multi-module project without build tools in VS Code, you can follow these steps:
-
Create a new folder for your project and create subfolders for each module you want to include in your project.
-
Inside each module folder, create a
module-info.javafile to define the module. -
Create your Java classes inside each module folder.
-
Open VS Code and open the project folder.
-
Create a new Java file in the root of your project to act as the main class that will run your application.
-
In this main class, you can use
requiresstatements to specify the dependencies between modules. -
To compile and run your project, you can use the command line within VS Code or use an extension like "Code Runner" to run your main class.
It's important to note that using build tools like Maven or Gradle is recommended for managing dependencies and building Java projects, especially for larger projects with multiple modules. However, if you prefer not to use build tools, you can still manually compile and run your Java code in VS Code as described above.