Installing Java API for GPIB devices in eclipse -


this trivial question, having trouble installing java api called jpib_windows eclipse should allow me control external devices connected via gpib.

this contents of folder downloaded. enter image description here

i created new project in eclipse, right clicked project , went build path -> configure build path.

i clicked on add external libraries , added jpib.jar file. file added, still not able use classes in api.

is there else need able use api? there better way of importing api project?

you jar file installed correctly. jpib (and many other java libraries) wrapper low-level routines. mandatory load corresponding native libraries before using java classes.

in eclipse go run > run configurations... > arguments tab, select configuration for, perhaps, main method. specify in vm arguments field:

-djava.library.path=c:\path\to\jpib\dll

then add @ beginning of main() following line:

system.loadlibrary("jpib_32");

then run edited configuration. should ok. in case of failure can examine path dll:

system.out.println("libary path: " + system.getproperty("java.library.path"));

also working directory can specified in same tab, avoiding absolute path, first time absolute path simple , less error-prone.

also note java may not recognize windows-specific issues (missing drivers, insufficient user privileges, wrong dll version) , report general error.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -