T
tommygun101
Hey people
i am using eclipse and i tried to use jacob to run the following code,
which links java to this scripting language called autoit.
package core;
import com.jacob.com.*;
import com.jacob.activeX.*;
import java.util.*;
import java.io.*;
public class Index {
/**
* @param args
*/
public static void main(String[] args) {
try{
Runtime.getRuntime().exec("regsvr32.exe /s AutoItX3.dll");
} catch (IOException ex){
ex.printStackTrace();
}
ActiveXComponent AutoIt3 = new
ActiveXComponent("AutoItX3.Control");
AutoIt3.invoke("Run","notepad.exe");
}
}
I set the parameters in run>arguments>vm arguments
-Djava.library.path=<G:\mainpath\AutoItX3.dll>
-Djava.library.path=<G:\mainpath\jacob.dll>
and i added the jacob.jar file to the classpath
But i still get a runtime error,
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.LibraryLoader.loadJacobLibrary(LibraryLoader.java:
57)
at com.jacob.com.JacobObject.<clinit>(JacobObject.java:150)
at core.Index.main(Index.java:20)
Oh.. and placing the dll's in the c:/windows/system folder doesnt help
and i also added the dll to the java/jre/bin/ext and that doesnt help
iether
I have been searching the net , trying to figure out whats going wrong
please could you help me out
thanx
i am using eclipse and i tried to use jacob to run the following code,
which links java to this scripting language called autoit.
package core;
import com.jacob.com.*;
import com.jacob.activeX.*;
import java.util.*;
import java.io.*;
public class Index {
/**
* @param args
*/
public static void main(String[] args) {
try{
Runtime.getRuntime().exec("regsvr32.exe /s AutoItX3.dll");
} catch (IOException ex){
ex.printStackTrace();
}
ActiveXComponent AutoIt3 = new
ActiveXComponent("AutoItX3.Control");
AutoIt3.invoke("Run","notepad.exe");
}
}
I set the parameters in run>arguments>vm arguments
-Djava.library.path=<G:\mainpath\AutoItX3.dll>
-Djava.library.path=<G:\mainpath\jacob.dll>
and i added the jacob.jar file to the classpath
But i still get a runtime error,
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.LibraryLoader.loadJacobLibrary(LibraryLoader.java:
57)
at com.jacob.com.JacobObject.<clinit>(JacobObject.java:150)
at core.Index.main(Index.java:20)
Oh.. and placing the dll's in the c:/windows/system folder doesnt help
and i also added the dll to the java/jre/bin/ext and that doesnt help
iether
I have been searching the net , trying to figure out whats going wrong
please could you help me out
thanx