Tuesday, March 22, 2011

Install Java 1.5 on Mac OSX

http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard
Snow Leopard Java problems (and fix)

Update: OneSwarm 0.6.7 is now available and fixes most Snow Leopard compatibility issues. Download here

The OneSwarm annonymous filesharing client version 0.6.5 does not run properly on Mac OS X 10.6 "Snow Leopard" because of compatibility issues between the 64 bit Java 6 VM and SWT, symptoms are:

  • Connections will never handshake completely because packets sent by the user running 10.6 will not reach the network interface (except the initial ~20 byte handshake packet). Probable cause: not receiving write selects (?). Workaround below
  • When double clicking on a torrent a window will pop up saying "file could not be opened".
  • In the classic ui: Preferences will not show the values of the actual preferences, clicking in the box will cause the value to be shown.

Workaround for connection problem

In the terminal:

Get the java 5 that was included in 10.5 "leopard" and unpack

cd /tmp/ ;curl -o java.1.5.0-leopard.tar.gz http://www.cs.washington.edu/homes/isdal/snow_leopard_workaround/java.1.5.0-leopard.tar.gz ;tar -xvzf java.1.5.0-leopard.tar.gz 

Move it to your System java folder (password needed)

sudo mv 1.5.0 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard 


Tell OS X that java 5 actually is java 5

cd /System/Library/Frameworks/JavaVM.framework/Versions/ ;sudo rm 1.5.0 ;sudo ln -s 1.5.0-leopard 1.5.0 ;sudo rm 1.5 ;sudo ln -s 1.5.0 1.5 

Open Java Preferences

open "/Applications/Utilities/Java Preferences.app" 

Change the properties to use Java 5 32-bit by default:



1 comment:

Unknown said...

Thanks for the detailed information. and also most of the times both 32 bit and 64 bit works as these expect in some cases where if there are any machine specific calls are called. 32 bit takes 4 bytes long,64 bit takes 8 bytes of size, so 32 bit takes less size compared to 64 bit machines.
To find out the 32 bit or 64 bit 32 bit or 64 bit