Good Morning,
I have created a jar file which works fine on my pc at home.
However, when I run it on another pc, it gives me this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/pdfbox/exc
eptions/InvalidPasswordException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.pdfbox.exceptions.Invali
dPasswordException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 6 more
Do you know what could be the problem? Is it something to do with the classpath? And if yes, isn't a jar file supposed to run as a standalone program on every pc with jdk installed without needing to set classpath etc...?
Thanks for your help.