So I have a project with just one java file
Main.java
My workspace is located at /programming/workspace
I added external jar's to the project to use the apache poi. I can run my program through eclipse and it works just fine but I need to be able to give this program to my friend and be able to run it through the terminal.
I was trying to do Java main where the Main.class file is located but got:
Exception in thread "main" java.lang.NoClassDefFoundError: Main
Caused by: java.lang.ClassNotFoundException: Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
How do I get my program to run through a command line that I can give to someone else to run it?