Tuesday, February 9, 2010

Re: [android-developers] connect android emulator to mysql server

Ah sorry, the java.lang.ClassNotFoundException is a different thing. You may be missing a .jar file when generating your project.

On Tue, Feb 9, 2010 at 6:34 PM, David Turner <digit@android.com> wrote:
Replace localhost with 10.0.2.2 and you should be all set.

See http://developer.android.com/guide/developing/tools/emulator.html#emulatornetworking


On Tue, Feb 9, 2010 at 1:57 AM, saravanan p <saravanan6024@gmail.com> wrote:
Hi

           I am new to android development. How to connect mysql
server from our android emulator. I am using



           private String url = "jdbc:mysql://localhost:3306/";

     dbname =test;

     username = "";

     password = "";

     Class.forName("com.mysql.jdbc.Driver");

     Connection con = DriverManager.getConnection(url+dbName,
username, password);



     But I got the exception java.lang.ClassNotFoundException:
com.mysql.jdbc.Driver



     Please tell me the solution for this proplem.



     Thanks



     P.saravanan

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate