Switching Netbeans to dark color theme is not a trivial task. You can pretty easily change editor theme. It is a little more difficult to change colors of UI elements. Still you will find out that some colors are simply hardcoded in the source code.
Here is step by step guide to make Netbeans to show its dark side.
Read more... »
When Java application running inside virtual machine tries to connect to the Oracle database it can suddenly and seemingly in a completely random moment throw "I/O Exception: Connection reset". At first database driver hangs for a while and after the timeout expires gives up and prints the error. Restart of the application usually does not help.
How to fix this problem?
Launch 'find /' in the console.
The connection suddenly establishes.
So what happens?
Linux system on a virtual machine lacks an entropy. Oracle driver needs a pool of random numbers in order to encrypt its connection. It uses java.security.SecureRandom which in turn reads them from /dev/random file.
But here is what 'man 4 random' says:
The random number generator gathers Environmental noise from device drivers and other sources into an entropy pool. [...] When the entropy pool is empty, reads from /dev/random will block until additional Environmental noise is gathered.
The best source of randomness in a computer are the physical devices. The problem is that the virtual machine does not have a mouse or a keyboard. After a while hard drive operations are no longer useful either as all data will be cached in the host machine. Firing 'find /' helps because it forces the system to read something new from the disk immediately gathering some entropy. But this is only one time workaround.
Read more... »