Home > Java, Mac OS > Java 1.6 on Mac OS X 1.5

Java 1.6 on Mac OS X 1.5

I have been using my macbook pro for almost 5 months now and I must say I am very satisfied with the performance. Though the machine gets quite hot when actively used, developing on the Mac is indeed very good.

But………

I find it frustrating that the amount of time that i need to put in for setting up a proper Java development environment takes so much time. There should be better support from Mac for this. But for the time being I will just blog my findings and hopefully someone else finds them usefull.

Environment variables:

As a Java developer, you always need to set the JAVA_HOME environment setting value to the home directory of you Java installation. Though a lot of application nowadays don’t check this variable, Java tools like maven and ant are depending on it. I have added this value on the normal linux way: /etc/profile. By adding this value in profile, the JAVA_HOME is set on startup for all users.

Path:

Second I needed to add the different applications executables to the PATH variable. Normally I always do this in the /etc/profile page. But I found out that for Mac this is done on a different place. In /etc you will find a directory paths.d. In this directory, you can just add a file with some ‘path values’ and it will be automatically added to the path. So this is quite easy. The only think is, you need to know this!

Java versions:

As a developer you need to work on different projects and it often requires us to run different versions of JDK. Normally I don’t have issues with it since I use Eclipse as main IDE. Eclipse installation includes different JDK versions, so you can easily switch it up in Eclipse. But for building purposes (example: running maven in terminal) I often use the terminal to run the build scripts. Now the big husttle is to get Mac use a 1.6 JDK since code depend on it. What I did was the following:

  • install the Mac updates (1.5 update 4)
  • open terminal
  • go to /System/Library/Frameworks/JavaVM.framework/Versions
  • unlink CurrentJDK (it was pointing to 1.5, seen via ls -la)
  • ln -s 1.6 CurrentJDK

Now when I run ‘java -version’, I get the 1.6 64-bit version.

Eclipse memory settings:

Since I run applications in Eclipse that takes quite some memory, I needed to increase the max heapsize of the JVM. Now in Windows, this is done easily by editing the eclipse.ini file. In Mac version, this file seems to be missing. This is not true. Seems that the executable Eclipse file, can be opened as a directory. The eclipse.ini file, can be found inside the eclipse executable.

BEA weblogic

For the ones who are trying to get BEA weblogic running on the Mac. Well, to get the server running was not that big of an issue. You need to do some tricks but there are 2 articles written for this purpose. But to get BEA workshop going is a little different story. There is no IDE for this and I haven’t been successful in manually installing it. If I have it (or someone get’s it working), I will add comments.

Categories: Java, Mac OS Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.