Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!




View RSS Feed

All Blog Entries

  1. Look and Feel ToolBar solution.

  2. Fun little optimization

    Disclaimer: While optimizations can be fun and addictive, determine if your particular application needs any before attempting to optimize it.

    I've always wondered if the Java compiler was capable of performing certain loop optimizations. So for fun, I picked a two of them (a simple permutation and loop unrolling) and tested them out.

    public class Test
    	public static void main(String[] args)
    		final int DIM = 0x2000;

    Updated November 23rd, 2011 at 08:32 AM by helloworld922

  3. Shutdown Hooks

    Shutdown hooks are threads to be run when the JVM is about to terminate. This can happen if all non-daemon threads have finished execution, System.Exit() has been called, or if the user is logging off/shutting down their OS among other operations.

    So to play around, I decided to write a simple shutdown hook that would print out "goodbye!" when the JVM was shutting down. The main program would spawn a number of threads which each would stay alive for some number of time. ...

    Updated September 21st, 2011 at 01:50 AM by helloworld922

  4. Java Programming Careers. Our new website!



  5. Java Native Access and Eclipse Indigo Swing GUI editor

    Normally for native access, I would use JNI to run native code, especially code I've written which interfaces with Java components. However, often you just want to call native functions (particularly system calls).

    Rather than having to go through the whole JNI process (which is rather painstakingly slow), someone has created the JNA library which allows you to basically call native methods directly.

    As far as I understand, there are two main ways to use JNA: