In Ubuntu just run the following command:
sudo apt-get -y install sun-java6-plugin
This will install the Sun Java web plugin and runtime environment. Then you can just right click .jar files and run them with Java. You may need to log out and back in for the menu option to be there when you right click.
Alternatively you can do it manually with the following:
java -jar JARFILE.jar
Where JARFILE.jar is the java file you're trying to execute.