0

I have a basic JAVA-MySQL connection class. But, when I execute the code I get

The filename, directory name, or volume label syntax is incorrect

error.

I am using MySQL through wamp server. And, Eclipse is my IDE.

Code (MySQL_connection.java) :

import java.sql.*;

public class MySQL_connection {
    public static void main(String args[]) {
        try {
            Connection conn = DriverManager.getConnection(
                        "jdbc:mysql://localhost:8080/error_report","root","");
            System.out.println("Connection success");
        } catch (Exception e) {
            System.err.println(e);
        }
    }
}

I have created error_report database from phpmyadmin.

Jonathan Drapeau
  • 2,610
  • 2
  • 26
  • 32
Amit Tank
  • 67
  • 1
  • 9

1 Answers1

0

Check to make sure your MySQL config file does not contain & in the XML. XML Files must use &amp

Brockr22
  • 13
  • 7