ClassNotFoundException Error in PostgreSQL
I am a complete newbie when it comes to using PostgreSQL and JDBC. I have successfully installed PostgreSQL on my Mac G4 running Mac OS X 10.1.
I'm able to start the DB daemon (with -i extension), I've created and populated a database (can query the database, etc.). When I installed PostgreSQL, I created a user account named "Newuser" on my computer, and start the DB daemon while logged onto that account (in a console window after logging into the postgres account using 'su - Newuser'). I've downloaded the pre-compliled jdbc7.1-1.1.jar JDBC driver. I put the JDBC driver file in /usr/local/pgsql/share/java. I've been trying to use JDBC to connect to a database and started with examples available in the source file.
When I try and run the executable after compilation I get an error. Specifically, the line of code in "Class.forName("org.postgresql.Driver");" returns the error "java.lang.ClassNotFoundException:
I became nuke over here and cannot move ahead....:no:
Please help..Anybody come across this before..
Re: ClassNotFoundException Error in PostgreSQL
Hi,
You need to Put the driver in /Library/Java/Home/lib/ext/ and see what happens. That's what the trick did for me.
I'm still using 10.0.4, but I assume they didn't change that directory in 10.1.
Re: ClassNotFoundException Error in PostgreSQL
if you get a Java ClassNotFoundException error message when attempting to view a java applet in LearnUW.
Most Mac OS browsers cannot support Java applets running under a secured environment (SSL) such as LearnUW.
Try using the Safari browser (v. 1.2 or higher) under Mac OS 10.3 or higher. LearnUW currently cannot support Java applets on the Macintosh using Internet Explorer, Netscape, Mozilla, Firefox, or Safari version 1.1 or lower.
Re: ClassNotFoundException Error in PostgreSQL
I think you need to give the fully qualified name in your code attribute.
Try something like:
code="projects.web.TestAppletGUI"