谢谢,在我的项目出现问题之前,我的项目是在 android 中制作应用程序,然后应用程序可以连接到我公司的数据库,但这不是连接
这是我的脚本
package mas.ganteng;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Mas Ganteng Indonesia
*/
public class ConnectedAccessActivity {
Connection conn;
String url="jdbc:odbc:JavaMsAccess";
String user="";
String pass="";
public Connection getConnection(){
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection(url,user,pass);
System.out.println("Connected!!!");
} catch (SQLException ex) {
Logger.getLogger(ConnectedAccessActivity.class.getName()).log(Level.SEVERE, null, ex);
} catch (ClassNotFoundException ex) {
Logger.getLogger(ConnectedAccessActivity.class.getName()).log(Level.SEVERE, null, ex);
}
return conn;
}
public static void main(String [] args){
ConnectedAccessActivity acc=new ConnectedAccessActivity();
acc.getConnection();
}
}
它是eclipse中的控制台
Invalid layout of java.lang.String at value
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (javaClasses.cpp:124), pid=3848, tid=3876
# fatal error: Invalid layout of preloaded class
#
# JRE version: (8.0-b104) (build )
# Java VM: Java HotSpot(TM) Client VM (25.0-b46 mixed mode windows-x86 )
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# D:\My Android\ConnectedAccess\hs_err_pid3848.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
你能帮我解决这个错误吗??????