OPC Client Programming with Java
ErgoTech OPC Gateway
A more targeted product is ErgoTech's OPC Gateway. ErgoTech is a producer of Java components for manufacturing, and the OPC Gateway is designed to work with that company's Virtual Instrumentation Beans (VIB) product. VIB is a collection of visualization and data server components designed to be used with real-time devices.
Odense Production Information (OPI) of Denmark takes a different approach with its Java OPC client API. JOPCClient is restricted to the Windows platform only, and uses Sun's Java Native Interface (JNI). This technique allows Java developers to access the functionality of OPC using only Java calls and without needing knowledge of COM and DCOM. JNI is supported by most Java Virtual Machines (excluding the Microsoft JVM), and JOPCClient is compatible with JDK 1.1, 1.2 and 1.3.
A free evaluation, limited in the number of connections, groups and items which may be added, may be downloaded from OPI.
NetModule's JOPC-Bridge allows OPC client programs to be coded in Java.
Supported OPC specifications include DA 3.0, 2.0 and 1.0, as well as AE 1.1. Java classes are provided which mirror OPC-specific server objects. Java Native Interface (JNI) is used to interface to the actual OPC server, via a JOPCBridge DLL coded in C.
NetModule claims tested compatibility with OPC servers from Siemens, Rockwell, B&R and K&W.
Free Source Code
Antonín Fischer's Java OPC Client is now greatly enhanced and hosted on SourceForge. It uses a JNI layer coded in Delphi. Full source code (both Java and Delphi) is provided.
Features exposed via JNI include access to OPCEnum for locating Data Access servers, and DA server address space browsing. The current version supports both DA 2.0 and 3.0.
Antonín is keen to hear from anyone who would like to collaborate on future enhancements to JEasyOPC.
Utgard - pure Java OPC library
Utgard is an open source project offering an OPC library written in pure native Java, i.e. with no dependency on JNI or other DLLs. It is licensed under the GPL.
Support is currently provided for DA 2.0 client development, with server enumeration now implemented. DA 3.0 client and DA server side are planned to follow.
Utgard is a contributor to the larger OpenSCADA project, and uses j-Interop (see below) for DCOM interoperability.
Intrinsyc Software's J-Integra enables development of OPC clients using Java, allowing OPC data to be made available on pretty much any operating system.
J-Integra bridges between pure Java and COM, and the Intrinsyc website includes sample Java code for communicating with an OPC Automation server. J-Integra is available as a time-limited download for trial purposes.
J-Integra was originally developed in the UK by Linar Ltd.; Linar was later acquired by Intrinsyc.
j-Interop is a Java Open Source library (LGPL) that implements the DCOM wire protocol. Thus it allows development of pure Java applications which can interoperate with both custom and automation COM components.
j-Interop is implemented as pure Java and does not use Java Native Interface (JNI) to provide COM access.
Other Java-COM Bridges
There are several other Java-COM bridging solutions: