private static void loadLibraryFromJar(String libName) 
	{
		try 
		{
			InputStream fis = null;
			try
			{
				String libResName = "/" + libName + LIB_EXT;
				fis = NativeLibLoader.class.getResourceAsStream(libResName);

				String prefix = libName + System.currentTimeMillis();
				File tempFile = File.createTempFile(prefix, LIB_EXT);
				String tempPath = tempFile.getAbsolutePath();
				
				OutputStream fos = null;
				try 
				{
					fos = new FileOutputStream(tempFile);
					
					// copy file
					byte[] buffer = new byte[1024];
					int bytesRead;
					while ((bytesRead = fis.read(buffer)) != -1)
					{
						fos.write(buffer, 0, bytesRead);
					}
				} 
				finally 
				{
					if (fos != null)
					{
						fos.close();
					}
				}
				
				System.load(tempPath);
			} 
			finally 
			{
				if (fis != null)
				{
					fis.close();
				}
			}
		} 
		catch (UnsatisfiedLinkError e)
		{
			throw e;
		}
		catch (Exception e) 
		{
			throw new NativeLibraryLoadException(e);
		}
	}