in debian you can select which version of java (if you have several)
is default. it's done through alternatives mechanism. as root one has
to type in a terminal window:
update-alternatives --config java (in ubuntu you probably just prefix
it with 'sudo') and then select the version you want to use as
default.
another way to start an application with a different version of java
is a script which states explicitly which version of java to use.