Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » ClassNotFoundException with runnable jar
ClassNotFoundException with runnable jar [message #1850003] Thu, 10 February 2022 11:53 Go to next message
Eclipse UserFriend
I made a runnable jar with packed libraries.

I'm going mad with java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

even if I added MySql Connector J in my Java Build Path.

This exception is thrown on a machine with openjdk 11.0.8, while it's not thrown on machines with 1.8.0_302.

When I try to export the runnable jar with libraries inside the lib subfolder, the exception becomes:
java.lang.NoClassDefFoundError: javax/activation/DataSource

Is it not possible to export a runnable JAR from a dev machine with Java 8 and running it on Java 11 ??
Re: ClassNotFoundException with runnable jar [message #1850104 is a reply to message #1850003] Wed, 16 February 2022 01:06 Go to previous messageGo to next message
Eclipse UserFriend
You said you made a runnable Jar. But didn't specify how you are running. Are you running it from Eclipse or from command line? In either case, can you share what the command looks like?

[Updated on: Wed, 16 February 2022 01:07] by Moderator

Re: ClassNotFoundException with runnable jar [message #1850108 is a reply to message #1850104] Wed, 16 February 2022 03:05 Go to previous message
Eclipse UserFriend
I solved the problem downgrading OpenJDK from 11 to 8 on the server were the JAR is running.

Regarding your questions:
- I'm running it from command line
- The command looks like "java -jar myapp.jar"
Previous Topic:generalize Eclipse Linux/GTK3 support to Unix/GTK3
Next Topic:WYSIWYG javascript visual designer and layout tools
Goto Forum:
  


Current Time: Wed Jul 16 12:52:45 EDT 2025

Powered by FUDForum. Page generated in 0.06149 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top