I'm trying to run a JAVA Class under Linux Mint from the Terminal.
My Java class runs nice within any IDE, so I know it's not a code problem, but actually need to run it from the Command Line this time. However, I'm having issues at this point.
I used the following command:
java -cp . Interface
But it happens that it gives me an java.lang.NoClassDefFoundError Exception:
Exception in thread "main" java.lang.NoClassDefFoundError: Interface (wrong name: client/Interface)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:788)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:447)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
I'm looking to understand all the components that could make it possible to solve this issue and to be able to overcome future problems on the topic.
Thank you for your time.
Interfaceor its default?