Eclipse on OSX

Eclipse is an Interactive Development Environment for many languages, especially Java and C++/C. It includes web development tools, data modeling tools, and many other features. Because it integrates access to version control (CVS and Subversion), it makes collaboration with other programmers easy. I use the Subclipse plugin to integrate Eclipse with a remote Subversion repository.

Installing Eclipse

Here are instructions for setting up a 64-bit Eclipse 3.6 (Helios) on Snow Leopard, tested August 2010. These instructions also work to install Eclipse 3.7 (Indigo) on OSX Lion (10.7), tested February 2012, and Eclipse 4.2 (Juno) on OSX Mountain Lion (10.8.2), tested October 2012.

  1. Make a copy of your workspace if you are upgrading from an older version, in case you have to revert.
  2. Make sure you have Java installed. In a Terminal window, type java and you should get a long usage message.
  3. Navigate your browser to www.eclipse.org/downloads
  4. Download the "Eclipse IDE for Java Developers" 64-bit Mac package, untar it, and install in /Applications.
  5. Start Eclipse. When it asks for a workspace, specify your new copy.

Subversion

I use Subversion for version control on several projects. Our repository is on a Unix system, accessed via SSH tunnel.

  1. On the server side, change your .profile or .bash_profile to do a umask 002.
  2. In Help ► Eclipse Marketplace... search for Subclipse, and click to add it. Accept the license, click Finish, and restart Eclipse.
  3. If you are upgrading an old workspace, it will appear with the little Subversion badges.
  4. To connect to an SVN repository for the first time, configure: open new perspective, add repository, specify private key auth and your keyfile, select path to repository as svn+ssh://example.com/path-to-repo and then select File ► Import... ► SVN ► Checkout projects from SVN.
  5. For Mountain Lion. There is no Mountain Lion version of JavaHL at collab.net. https://subversion.open.collab.net/ds/viewMessage.do?dsForumId=3&dsMessageId=470176 says that "the volunteer who provided these binaries has not been able to continue to do so." It recommends installing macports or homebrew. I installed macports, and the package subversion-javahlbindings. (This brought in a lot of dependencies, such as openssl, sqlite, expat, ncurses, and zlib.) I did svn upgrade on each subversion working copy in the workspace to the new version of subversion.
  6. Restart Eclipse again. You should not need to give any passwords or reload any files, if you had subclipse running on a previous version. Subclipse appears to work: I can check out and sync files OK.

(If any project used to be a Java project and now is not, delete it, keeping the files, and add it with the same name, specifying a Java project.)

(If you are asked for a userid and password when you commit a file, even though you have set up SSH keys to your repo, this may be due to a bug in JavaHL. To fix it, open a Terminal window and cd to your repository directory; then type svn update. JavaHL should cache your credentials and not ask any more.)

Russell Batemen has written some useful tutorials: see https://www.javahotchocolate.com/tutorials/eclipse-summary.html.

Home | FAQ © 2010-2023, Tom Van Vleck updated 2023-07-24 09:40