Skip to main content

Export jar from eclipse project

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-01-09

I have a simple project that uses com.mysql.jdbc.Driver and org.apache.http.HttpServerConnection.
When I run a project within an Eclipse everything works fine. When I export the project to *.jar file and tried to run I got an exception.
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
java.lang.ClassNotFoundException: org.apache.http.HttpServerConnection
As I understand this problem happens because I didn't specify a classpath for that libraries. But I don't have any idea where is it located in Kubuntu Linux?
Is it any way to create jar file that solve any dependances? I am going to run that jar in a different environment.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2011-01-09

I have that jars in different directories. So I pointed them when start applications.