I don't know how to install JEasyOPC in Java
I'm trying to read signals from a PLC trough Java, and for that I think I should use a "bridge" called JEasyOPC. The problem is that I don't how to install it, and make it work.
I followed a tutorial but I get always stuck at the same problem. I get an error:
开发者_如何学JAVAProperty file javafish.clients.opc.JCustomOpc doesn't exist. System terminated.
If you are using JEasyOpc inside a web application (e.g. inside a .war file), then you may need to do the following
Replace this line in PropertyLoader.java with
ClassLoader cl = ClassLoader.getSystemClassLoader();
with
ClassLoader cl = PropertyLoader.class.getClassLoader();
Also, make sure you specify -Djava.library.path=[path to folder containing dll]
The property file is in a directory called resources. If you have the jeasyopc.jar in a directory, /jeasy, then the resources directory should be in a directory such as /jeasy/resources. You need to put this on your classpath. This can be done in your environment or at run time with something like java -Djava.ext.dirs=.:/jeasy/resources .
精彩评论