I've been looking on here for a couple of hours and tried a bunch of different solutions, but I haven't gotten any further. I've got my .jar file in my environment variables and all that. I made sure Eclipse has mysql-connector...jar in my build path.
I can't find the Deployment Assembly setting which leads me to believe there's something I have no idea exists that I'm doing wrong. Or maybe they took that feature out of photon? I feel like I've hit an adamantium wall.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class main {
public static void main(String[] args) {
Connection conn = null;
try {
//Server connection details
Class.forName("com.mysql.jdbc.Driver");
String host = "jdbc:mysql://localhost/3306/db";
String userName = "admin";
String password = "admin";
//Get the connection going.
conn = DriverManager.getConnection(host, userName, password);
}
catch (SQLException err) {
System.out.println(err.getMessage());
}
}}
Here's what I get:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Unhandled exception type ClassNotFoundException
at main.main(main.java:12)