My personal codebase while learning the Java language
- basics
some basic features of Java - examples
various small examples of algorithms - puzzles
my solutions to all the puzzles inside the books
Written with StackEdit.
If you want to run classes that belong to a package you must provide as classpath the root folder where the .class files are located. And you must provide also the full name of the class along with the package name. So the jvm will append the classpath folder and the package name, and it must find the .class file of the class you are trying to run.
For example: java -classpath "F:\Workspaces\PortfolioProjects\java-portfolio\src\main\java" com.cipitech.samples.java.basics.MyFirstApp
Or from the IDE: java -classpath F:\Workspaces\PortfolioProjects\java-portfolio\target\production\java-portfolio com.cipitech.samples.java.basics.MyFirstApp