Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Intellij java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

Featured Replies

I made a project with Intellij which is not osrs related.

The project use database.

The project works when I run it in Intellij.

However, the runnable JAR (.jar) compiled by IntelliJ shows this error when I run it.

I already added mysql-connector-java-5.1.38-bin.jar to artifact,

and IntelliJ generated mysql-connector-java-5.1.38-bin.jar and the program jar when I click rebuild artifact.

I don't use maven.

 

Could anyone tell me how to solve it step by step?

Edited by Pegasus

  • Author
5 minutes ago, Hi G00gle said:

https://stackoverflow.com/questions/23771129/cant-test-connection-to-mysql-using-intellij

 

Are you able to get a connection?

 

A solution might be in there, thought I'd put it in here.

The project works when I run it in intellij.

However, when my pc have low memory or I just don't want to turn on intellij,

I will just want to double click the .jar file, but it shows java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

I'm not an expert on Intellij IDEA but I quickly made a project to test and it works both on IDE and .jar.

Here is my artifacts settings:
rVrL38W.png

  • Author
10 hours ago, Lordsthan said:

Sure, pm'd.

Thanks for making step by step video.

problem fixed

 

cp2iVgC.png

  • 2 years later...

As the name suggests classNotFoundException in Java occurs when JVM (Java Virtual Machine) tries to load a particular class and doesn't found the requested class in the classpath you specified. When building the project, java throws ClassNotFoundException exception because a file (the com.mysql.jdbc.Driver class) from the java mysql connectivity library is not found. The solution is adding the library to the project, and java will find the com.mysql.jdbc.Driver

 

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.