aspose file tools*
The moose likes Mac OS and the fly likes Java Preferences Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "Java Preferences" Watch "Java Preferences" New topic
Author

Java Preferences

Allasso Travesser
Ranch Hand

Joined: Feb 06, 2010
Posts: 35
Hi,

Recently I did an reinstall of Tiger (10.4) on my G5 iMac. I completed all the updates, and updated Java to 1.3 and 1.4. I did not want to update to Java 5 because I am developing some apps that have to work on older machines, and I want to be sure I am working in a 1.4 environment.

However, I have looked for the Java Preferences app, which according to all that I have researched, should be in Applications/Utilities, but it is not there.

sudo find / -name "Java Preferences" comes up with nothing also.

Does anyone have a suggestion as to how I can get Java Preferences on my machine?

Thanks,

Allasso
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10523
    
    9

Sorry can't help you with the Java Preferences.
...and I want to be sure I am working in a 1.4 environment.

You can open a terminal and run java -version to find out which java version you are running


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Using 'find', you would have to search for 'Java Preferences.app', not just 'Java Preferences'. Try using spotlight, though -- you don't have to be so accurate in your search terms.

That's odd that it's missing!


[Jess in Action][AskingGoodQuestions]
Allasso Travesser
Ranch Hand

Joined: Feb 06, 2010
Posts: 35
I updated to Java 5, and that gave the Java Preferences app. According to the Apple tech notes, that app only came with the Java 5 update on Tiger.

You can open a terminal and run java -version to find out which java version you are running


That will only tell me which version I am using, it will not change it. There are some very >>limited<< options in Java Prefs to change the version applets use, but you cannot guarantee that apps will use a certain version. There are other options however; Google "change Java version mac" and get a plethora of (sometimes passionate) debate on the matter.

The simplest is to change the default JDK by changing the symlink in /System/Library/Frameworks/JavaVM.framework/Versions to point to the version you want (this is where the passion comes in)

eg:

cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo ln -fhsv <directory_of_version_I_want_to_be_default> CurrentJDK

here is a nice little shell script that will do that for you (along with a lot of passionate debate following):

http://hints.macworld.com/article.php?story=20060121171126988

If you want to do it the "Apple" way, here are two good helps, and the reasons why changing the symlink may not be a good idea (which are worth considering):

http://developer.apple.com/library/mac/#releasenotes/Java/Java50Release3RN/UsingJ2SE50/UsingJava5.html#//apple_ref/doc/uid/TP40003184-CH5-SW1

http://hintsforums.macworld.com/showthread.php?t=47531
(this one also gives a good primer on Java versioning on a Mac. Well laid out, IMO)

Thanks

updated 2011-02-09
Allasso Travesser
Ranch Hand

Joined: Feb 06, 2010
Posts: 35
I updated my last post with some hopefully useful information...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java Preferences