transparent block Click here to login or logout The Photo Gallery All about me


I think age is a very high price to pay for maturity.
Tom Stoppard

Java 7 (icedtea) on Ubuntu Gutsy: Problems and Fixes

Posted in Personal by Riskable on the October 23rd, 2007

I’ve been running Gutsy for a few weeks now (including pre-release) and I just recently figured out all my java problems. I googled all over the place and couldn’t find these fixes ANYWHERE so I did what any Linux geek would do: I debugged and fixed them myself. So if you’re having problems with Java on Gutsy here’s some fixes…

The proxy server problem with java 7 (icedtea)

My first problem was that java applets were not connecting through the proxy server (which is the only way for me to connect where I am). For whatever reason the default for the icedtea-java7 package(s) is to NOT get the system default proxy settings. The fix is to edit /etc/java-7-icedtea/net.properties and change

java.net.useSystemProxies=false

to be:

java.net.useSystemProxies=true

Easy enough!

The java.net.SocketPermission problem

My second problem was that no applet would load because the default policy in the icedtea-java7 package(s) is defaults to DENY for java.net.SocketPermission for everything but the “listen” attribute. to fix this I had to add some permissions under the “grant {” section in the /etc/java-7-icedtea/security/java.policy file:

// allows anyone to listen on un-privileged ports
permission java.net.SocketPermission "localhost:1024-", "listen";
permission java.net.SocketPermission "*", "resolve";
permission java.net.SocketPermission "*", "connect";
permission java.net.SocketPermission "*", "accept";

The first two lines should already be there. Just add the resolve, connect, and accept lines then restart Firefox. Java should now be working properly. Test it here

Leave a Reply