Build OPCUA applications with Java

UA Java is an OPC UA stack and a number of sample applications.

From the OPC Foundation

The official OPC Foundation OPC UA Java Stack and sample applications.

Donated to the community for development of OPC UA applications and to assure that OPC UA becomes the defacto-standard technology for the Industrial-Internet-of-Things and Industrie 4.0.

Numerous products, organizations, and other standards-bodies rely on OPC UA as their communications back-bone, with more joining daily.

Visit https://opcfoundation.org/ for more information.


OPC Foundation Membership

OPC Foundation membership provides funding to continue the research and development necessary to expand the capabilities and benefits of OPC UA.

Become a Member Now [benefits]

Quality

Stack: The code is made available by OPC Foundation for historical reasons. It will not receive further features and updates.

License

This repository includes the UA Java Stack and sample applications. The UA Java Stack follows a dual-license:

  • OPC Foundation Corporate Members: RCL
  • Everybody else: GPL 2.0

RCL enables OPC Foundation members to deploy their applications using the software without being required to disclose the application code. Non-members licensed under GPL 2.0 must disclose their application code when using the software.

If OPC Foundation Corporate Membership is terminated, the licence reverts to GPL 2.0 whenever any fixes or updates published on GitHub are applied to the former member’s application. This includes updates acquired by fetching any Git commit made after membership termination or the use of binaries distributed in OPC NuGet packages that were posted after the membership termination date.

Note: Dual license applies to this repository only; GPL 2.0 applies to all other repositories

All samples, the platform layers, and files generated with the ModelCompiler by means of the OPC UA NodeSet are provided under the MIT license.

Introduction

This UA-Java repo consists of:

  • Stack: low-level functions for delivering messages between UA Clients and Servers.
  • Unit Tests: validation of the stack functions
  • Sample Applications: demonstrating how to use the stack
  • Documentation: Instructions on building and using the stack

UA Profile Documentation

Learn how to build compliant self-describing applications using Profiles:

Getting Started

Follow these steps to build the Java stack:

  • Install JDK 6 Needed for compiling JRE 6 compatible version of the stack, see README.md section 'Building the Stack' for more details
  • Install Maven (or use maven integration provided by your favorite IDE)
  • Setup toolchains.xml for maven as described in the Readme.md
  • Clone this repo
  • Run mvn clean package from command line (or IDE equivalent)

Launching Reference Implementations

The following Samples are provided:

  • ServerExample1: basic server
  • SampleClient: connects to a server, browses, and then reads a value
  • ClientExample: basic tests for connecting to various servers
  • NanoServer: sample server that is Nano Server [profile] compliant.

The samples are provided as a separate maven project under 'examples' folder

  • Import the examples maven project to your IDE
  • In most cases the IDEs are smart enough to link the examples and the main stack projects so you can start the examples right away from the IDE. If not you might need to mvn install the stack first

In case you want to start the samples from the command line:

  • First install the stack jar to your local repo, run mvn install in the project root
  • Compile and package the samples, run mvn package in the examples folder
  • Bat/sh scripts used for starting the samples are generated to examples/target/assemblies/bin

Fork me on GitHub

Submit an issue or a suggestion

Submit an issue here.

Working Group Participation

The OPC Foundation contains multiple working groups that work hard to deliver OPC Specifications, Sample Applications, Compliance Test Tools, and more. Your participation can help steer OPC UA technology. Get involved today!

Fork and contribute

If you find an issue in the documentation or in the code, you can fork and send a pull request to the master branch.

Follow us