Berkeley Electronic Press Selected Works. To prove it here’s the Eclipse About box to show Eclipse Luna 4.4.2 successfully running on OS X 10.10.3. Update: June 19th 2016: A recent update broke the above solution. I hadn’t used Eclipse on the affected Mac for a few weeks so I’m not sure if it was broken by a Java update, an OSX update or even an Eclipse. After upgrading to yosemite, java 6 jdk is no longer available, remember that jdk 6 for mac osx is a 32-bit application, older eclipse releases needs a 32-bit jvm in order to run properly, a 32-bit application cannot run with a 64-bit jvm like java 7 or 8, so you need to install jdk 6 to run those java applications that needs a 32 bit virtual machine.
Follow this tutorial to learn how to install eclipse on Mac. Furthermore, learn how to configure the workspace which eclipse will use to save your projects. Installing Eclipse on Mac OS X In this video tutorial you will learn how to download the latest java version and the eclipse IDE for Mac OS X.
I think it is the CLASSPATH. (On a Mac how does one insert the JDBC into the CLASSPATH?) I do not know how to find it on the Mac (probably something ridiculously simple). Would greatly appreciate any and all help.
The attached show states of things.
I am running Eclipse Luna 2 (4.4.2) on Mac OS Yosemite (10.10.5). The program was running (correctly collecting data from files), but then, after adding the JDBC to connect to PostgreSQL 9.4, it produced the following error: 'Error: No suitable driver found for jdbc:postgresql://localhost.pg1 ' I am trying to connect it to the PostgreSQL database for the first time on the Mac (was successful on PC but I'm a newbie on the Mac). Had downloaded the JDBC from PostgreSQL site.
I think it is the CLASSPATH. (On a Mac how appreciate any and all help.
The attached show states of things.
does one insert the JDBC into the CLASSPATH?) I do not know how to find it on the Mac (probably something ridiculously simple). Would greatly appreciate help.
Please see attachments.
If (on the Windows box) you set the global environment variable CLASSPATH then that would have been (IMO) an error of that setup.
The classpath should be defined local to the application, not to the box as a whole.
jdbc:postgresql://localhost.pg1
That does not look like one of the recognized DB URL formats according to https://jdbc.postgresql.org/documentation/94/connect.html
As an aside, please don't post screenshots of text - copy/paste them here so that they are easily readable, can be easily quoted, and are searchable.
Also, I'm not familiar with Eclipse, but I note that you posted the build path containing the driver jar - the runtime path may be set elsewhere, and will also have to contain the jar.
String url ='jdbc:postgresql://localhost:5432/pg1'; // connect to DB
.But I still get the same error.
When I press the run button, the first thing that happens is an error message occurs: 'Errors in Workspace' with the message box containing 'Errors exist in required project'. It gives me the option to run or not. So I tell it to continue. Having made a simple change to the code, a println; it does not print the new line, simply does a previous run. Seems it is not compiling correctly.
What do I do?
It gives me the option to run or not. So I tell it to continue.
Don't do that. The message is telling you there are problems in some classes in the project. Correct the problems first.
In Eclipse, there will be a red 'x' net to the line with the problem and a squiggly line under where in the line it thinks the problem starts. In Netbeans it's similar, but it's a lightbulb with a little red exclamation mark.
All things are lawful, but not all things are profitable.
I have also looked at the Referenced Libraries. I click on the classes under the postgresql-9.4-1200.jdbc4.jar and they all say that the source attachment does not contain the source for the file X.class (e.g., Driver.class, PGConnection.class).
I suspect that I should download the JDBC from PostgreSQL and restart (?).
Knute, thanks for your help.
All things are lawful, but not all things are profitable.
1. Deleted old postgesql downloads in download folder.
2. Downloaded from https://jdbc.postgresql.org the appropriate driver for my JVM of 1.8.
3. Copied the following files from the download to the project.src.lib folder
(Note: believe only the jar is necessary, but above doesn’t hurt)
4. In Project Explorer
Mac Os Yosemite Requirements
Mac Os X Yosemite Installer
All things are lawful, but not all things are profitable.