| java.library.path error [message #78998] | 
Sun, 19 June 2005 17:47  | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: kunokneul.gmx.net 
 
Hello, 
 
I know this problem is well known and you can find many hints when  
searching (google,...). But I can't find any solution. 
 
The problem: 
 
I wrote a small java application. 
This program uses a dll file. 
The dll file (it's the jacob.dll from  
http://sourceforge.net/projects/jacob-project/) is in  
"C:\WINDOWS\system32". 
When I start the program manually (windows console) with 
"java -classpath .;D:\Projekte\jar\jacob.jar JacopProbe" 
everything work fine/perfect. 
But the same code in a eclipse java project doesn't work. 
As you can see (in the error message) my java.library.path property points  
to "C:\WINDOWS\system32". Setting  
-Djava.library.path="C:\WINDOWS\system32" as an vm argument in the run  
configuration doesn't work too. 
I'm using Eclipse SDK Version: 3.1.0 Build id: I20050610-1757. 
 
Any suggestions? 
 
Thanks in advanced, 
 
Gerd Richter 
 
You can see here the sourcecode of the program and the error message. 
 
sourcecode of the program: 
 ************************************************************ ******************** 
import com.jacob.activeX.ActiveXComponent; 
import com.jacob.com.Variant; 
 
public class JacopProbe { 
	public JacopProbe() { 
		System.out.println("JacopProbe Start"); 
		System.out.println(System.getProperty("java.library.path")); 
		ActiveXComponent automationApplication = new ActiveXComponent( 
				"PowerPoint.Application"); 
		automationApplication.setProperty("Visible", new Variant(true)); 
		try { 
			Thread.sleep(50000); 
		} catch (InterruptedException e) { 
			// TODO Auto-generated catch block 
			e.printStackTrace(); 
		} 
		// Shut down the app. 
		automationApplication.invoke("Quit", new Variant[] {}); 
		System.out.println("JacopProbe Ende"); 
	} 
	public static void main(String[] args) { 
		new JacopProbe(); 
	} 
} 
 ************************************************************ ******************** 
 
 
Error Message Eclipse: 
 ************************************************************ ******************** 
JacopProbe Start 
 C:\Programme\Java\jre1.6.0\bin;.;C:\WINDOWS\system32;C:\WIND OWS;C:\texmf\miktex\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WI NDOWS\System32\Wbem;C:\Programme\Executive  
Software\Diskeeper\;C:\Programme\Gemeinsame Dateien\Ulead  
Systems\MPEG;C:\Programme\Gemeinsame Dateien\GTK\2.0\bin;C:\Programme\ATI  
Technologies\ATI Control  
 Panel;D:\temp\MPlayer\mplayer;C:\Programme\Java\jdk1.6.0\bin ;C:\Programme\VDMSound;C:\Programme\ATI  
Technologies\ATI.ACE\ 
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jacob in  
java.library.path 
	at java.lang.ClassLoader.loadLibrary(Unknown Source) 
	at java.lang.Runtime.loadLibrary0(Unknown Source) 
	at java.lang.System.loadLibrary(Unknown Source) 
	at com.jacob.com.Dispatch.<clinit>(Dispatch.java:45) 
	at JacopProbe.<init>(JacopProbe.java:8) 
	at JacopProbe.main(JacopProbe.java:22) 
 ************************************************************ ********************
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.09398 seconds