For some time now, installing/updating Java prompts you to install the Ask.com toolbar and search page. After installation, this is offered each time you install a new update of Java, which can be very annoying. A somewhat undocumented feature is that you can disable these offers from the Java Control Panel, preventing future updates from prompting you to install this thing.
For debugging purposes, I often prematurely abort a function by adding a return statement in the middle of it. With most compilers this works flawlessly, accept with Java...
The Java compiler bums out with an unreachable statement error, and won't allow you to compile a class until all code is reachable within a function.
Luckily, you can trick the compiler by adding an if-statement that's always true:
if (1==1) return;
This way, as the return is supposedly conditional, and the compiler doesn't consider the result of an if-statement, it is tricked into believing the following code is still reachable.
String x = JComboBox.getSelectedItem().toString();
String x = String.valueOf(JComboBox.getSelectedItem());
The second method protects against null values as well.
Avoid using casting:
String x = (String)JComboBox.getSelectedItem();
This would work fine if the item is indeed a string, but will fail if it can (also) be any other data type. To be safe, use either of the first two methods.
SwitchExplorer for Brocade FC switches no longer works properly on more recent versions of Java, because of security constraints. They can, however, be relaxed so you can still access your switches.
jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
Note for Windows Vista and up: open the file elevated, or you won't be able to save it.
Since a recent update of OSX, there's an issue with the Java-plugin not being active, even though Java Control Panel says it is. This is because in Safari the plugin is still set to inactive.
To resolve, surf with Safari to www.java.com/nl/download/testjava.jsp. You see the Java website with in the center the notification that the plugin is not active. Click on the text to re-active the plugin.