Hi all,

I'm new to Android development and Java. Now I'm work on application
that should interact with PostgreSQL (to be exact PostGIS) database. I
read "Android & PostgreSQL" presentation by Mark Wong [1] and know
that latest PostgreSQL JDBC driver (postgresql-9.0-801.jdbc.jar) works
on Android.

First I try to add external JAR in console because my PC is a bit slow
for
using Eclipse. As I understand from presentation, to use JDBC driver I
should create .classpath file in the my ptoject directory and all will
work.

But when I try to build project with and I get next error:

[javac] /home/alex/files/data/git/firereporter/src/com/nextgis/
firereporter/ReportActivity.java:51: unreported exception
java.lang.ClassNotFoundException; must be caught or declared to be
thrown
[javac]         Class.forName("org.postgresql.Driver");
[javac]                      ^
[javac] 1 error

Here is my .classpath file

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
       <classpathentry kind="lib" path="/home/alex/devel/java/
postgresql-9.0-801.jdbc4.jar"
</classpath>

I try to search how to do this, but all tips are related to Eclipse.
Well,
I install Eclipse and ADT plugin, then create new Android project and
tried to add JAR as described in [2] and [3] but this also don't help.
I get error on string

Class.forName("org.postgresql.Driver");

and project doesn't builds.

Can anyone help me with this? May be I miss something or do it wrong?

[1] http://www.pgcon.org/2011/schedule/events/278.en.html
[2] 
http://groups.google.com/group/android-developers/browse_thread/thread/f10e970aed37fbf7/0a85169db7fdae35?#0a85169db7fdae35
[3] http://www.youtube.com/watch?v=eY_uqi_qIz0

Thanks,
Alex

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

Reply via email to