From the course: Advanced Java Programming
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Running modules from the command line - Java Tutorial
From the course: Advanced Java Programming
Running modules from the command line
- [Instructor] Compiling and running modular applications from the command line is slightly different to compiling and running normal Java applications. This is all done under the hood when using an IDE, so this time, I will be using a project that I made in a simple Notepad application. I'm currently in the begin directory inside 05_05, and I have an application called modular example. Inside that, I have a directory called source. And inside that, helloworld, and this is the root directory of my module. I note it's the root directory because in here I have the module-info.java file. If I open this, it shows that this is a simple file declaring a module called helloworld. It doesn't require or export anything. At the same level in my directory structure, I have a folder called com, and in that I have one called bethen, and in here I have one called greetings. In greetings, I have a single Java file called HelloWorld.java. This is a very simple class with a main method that prints out…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.