This question is an exact duplicate of:
Running Java Program from Command Line Linux
I know how to run a single java class but I have a special directories architecture on Eclipse:
+- root
|
+- folder-1
| |
| +- src
| |
| +- bin
|
+- folder-2
|
+- folder-3
| |
| +- src
| |
| +- package1
| | |
| | +- subpackage
| | |
| | |- Main.java
| |
| +- package2
| |
| +- package3
| |
| +- package4
|
+- folder-4
I have managed to compile each folder's "src" folder inside its "bin" folder. The main "src" (outside specific folders) is equally compiled to the main "bin" folder.
My question is how to run from the Linux command line Main.java which uses some classes located in the subpackage and also uses an auxiliary class in the main "src" folder.