Eclipse For Mac Os Yosemite



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.

Ranch Hand
posted 4 years ago
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 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.
File size:246 Kbytes
Ranch Hand
Eclipse For Mac Os Yosemiteposted 4 years agoYosemite
I am adding attachments, which I did not know how to attach before. Sorry.
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.
File size:370 Kbytes
File size:228 Kbytes
File size:176 Kbytes
Ranch Hand
posted 4 years ago
Code:
Master Rancher
posted 4 years ago
How do you run the program?
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.
Ranch Hand
posted 4 years ago
I run the program from Eclipse, Luna Service Release 2 (4.4.2). I hit the green run button at the top. It is on a Mac, not on Windows platform. Please see attachments.
Saloon Keeper
posted 4 years ago

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
Eclipse 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.
Ranch Hand
posted 4 years agoThanks for noting the error. I now have

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?For
Sheriff
posted 4 years ago

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.

Ranch Hand
posted 4 years ago
I have looked at all the classes, there are no error marks.
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.
Sheriff
posted 4 years ago
Tell us if that helped. The current version is 1211, so 1200 is a little behind. Still, I would except that it would have Driver.class in it!

All things are lawful, but not all things are profitable.

Eclipse For Mac Os Yosemite
Ranch Hand
posted 4 years ago
Have resolved the problem by doing the following. Note: this is on a Mac OS X Yosemite 10.10.5, using Eclipse (Version: Luna Service Release 2 (4.4.2)).
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
  • Postgresql-jdbc-head.doc
  • Postgresql-9.4.12.11.jar
  • Postgresql-jdbc-head.doc.tar

  • (Note: believe only the jar is necessary, but above doesn’t hurt)
    4. In Project Explorer
  • go to project
  • Referenced Libraries, right click
  • Select Build Path, select Configure Build Plan
  • Select Libraries tab
  • Remove old postgresql entries (which had no entries in them)
  • Select add JARS
  • Open project.
  • Select src.lib
  • Highlight material there.
  • Click OK, OK.

  • Sheriff
    posted 4 years ago

    Mac Os Yosemite Requirements

    Thanks for posting the solution! Have a cow! (that's a good thing)

    Mac Os X Yosemite Installer

    All things are lawful, but not all things are profitable.