private static void setupLibraryPath () throws SecurityException, NoSuchFieldException, IllegalAccessException {
		OperatingSystem os = OperatingSystem.getCurrent();
		
		// If the OS is supported by LWJGL (Linux, Mac, Windows, Solaris)
		if ( os == OperatingSystem.LINUX | os == OperatingSystem.MAC | os == OperatingSystem.SOLARIS
			| os == OperatingSystem.WINDOWS )
		{
			String dirname = "natives-" + os.getName().toLowerCase();
			
			String pathsep = System.getProperty( "path.separator" );
			String dirsep = System.getProperty( "file.separator" );
			String oldlibpath = System.getProperty( "java.library.path" );
			
			// <oldpath>:lib/natives-os
			String newlibpath = oldlibpath + pathsep + "lib" + dirsep + dirname;
			System.setProperty( "java.library.path", newlibpath );
			
			// Propagate the change
			Field fieldSysPath = ClassLoader.class.getDeclaredField( "sys_paths" );
			fieldSysPath.setAccessible( true );
			
			if ( fieldSysPath != null ) {
				fieldSysPath.set( System.class.getClassLoader(), null );
			}
		}
	}