If, like me, you do Java development on the Mac, at some point you’ll need to change the JDK that the Mac uses by default. Tools such as Eclipse and IntelliJ make life easier as they can point to specific JDKs (and you can tell it which one), but certain tools like Maven determine the correct JDK based on directories, etc.
The Mac makes this extremely frustrating with the way it handles JDKs (weird directories, many symbolic links, etc.) and their Console doesn’t change the current JDK just the Runtime.
I found this link that makes updating your current jdk rather easy. Its a short command-line script that I can only describe as magic:
Setting Current JDK Programmatically on the Mac.
1 comment so far ↓
Neat script.
Also worth warning – the default JDK 6 is 64-bit, which blows up SWT (Eclipse) and some other things – pretty nasty.
Leave a Comment