view Samples/Basic/NOTES.txt @ 29:118adbad648f

sharing common properties between samples
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 12 Jun 2024 14:44:37 +0200
parents 6b9433432ee0
children
line wrap: on
line source


This sample plugin installs a simple "Hello, world" route in the REST
API. To run this sample Java plugin:


(1) Make sure to build the C++ plugin:

# cd ../../Plugin/
# mkdir Build
# cd Build
# cmake .. -DCMAKE_BUILD_TYPE=Release
# make -j4


(2) Compile the Java plugin using Maven:

# cd ../../Samples/Basic
# mvn compile package


(3) Start Orthanc:

On Ubuntu 20.04 or 22.04 (replace "mainline" with the version of the
Java plugin for Orthanc):

# LD_LIBRARY_PATH=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/ \
  ORTHANC_JAVA_VERSION=mainline \
  Orthanc ./configuration.json


(4) Call the REST API implemented by the Java plugin:

# curl http://localhost:8042/java
Hello from Java!