Skip to content
Merged

Jdk 21 #3814

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sudo: required
language: java
dist: xenial
jdk:
- openjdk17
- openjdk21

services:
- xvfb
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://control-system-studio.readthedocs.io


## Requirements
- [JDK17 or later, suggested is OpenJDK](https://adoptium.net/en-GB/temurin/archive/?version=17).
- [JDK21 or later, suggested is OpenJDK](https://adoptium.net/en-GB/temurin/releases?version=21).
- [maven 3.x](https://maven.apache.org/) or [ant](http://ant.apache.org/)


Expand All @@ -27,7 +27,7 @@ mvn clean verify -f dependencies/pom.xml
Define the JAVA_HOME environment variable to point to your Java installation directory.
Mac OS users should use something like:
```
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-17.0.10+7/Contents/Home
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-21.0.11+10/Contents/Home
```
Verify through:
```
Expand Down Expand Up @@ -73,14 +73,14 @@ Download "Eclipse for Java Developers" from https://www.eclipse.org/downloads/pa

Start Eclipse like this:

export JAVA_HOME=/path/to/your/jdk-17-or-later
export JAVA_HOME=/path/to/your/jdk-21-or-later
export PATH="$JAVA_HOME/bin:$PATH"
eclipse/eclipse -consoleLog

Check Eclipse Preferences:

* Java, Installed JREs: JDK 17-or-later should be the default
* Java, Compiler: JDK Compliance should be "9" or higher
* Java, Installed JREs: JDK 21-or-later should be the default
* Java, Compiler: JDK Compliance should be "21" or higher


### Use plain Java configuration
Expand Down Expand Up @@ -112,7 +112,7 @@ In Help/Eclipse Marketplace, search for Maven Integration for Eclipse Luna or ne
Use File/Import/Maven/Existing Maven Projects to import the phoebus source code.

There can be a compiler error because the "JRE System Library" in the Package Explorer shows "[J2SE-1.4]".
Right click on the affected projects (greeting-app, probe), Build Path, Configure Build Path, Libraries, Edit the JRE System Library to use the Workspace default (jdk-17).
Right click on the affected projects (greeting-app, probe), Build Path, Configure Build Path, Libraries, Edit the JRE System Library to use the Workspace default (jdk-21).
Restart Eclipse IDE.

Can now start product/src/main/java/org.phoebus.product/Launcher.java.
Expand All @@ -126,14 +126,14 @@ To import the project:
* Select the Phoebus directory
* Import project from external model: Maven
* Accept the default options and click Next twice
* Ensure that the JDK is version 11 or above
* Ensure that the JDK is version 21 or above
* Change the project name to Phoebus and click finish

To run the Phoebus application:

* Run | Edit Configurations...
* Select + | Application
* Module: Your JRE 17
* Module: Your JRE 21
* Classpath `-cp`: select `product` from drop-down
* Main class: `org.phoebus.product.Launcher`
* Set the name to Phoebus
Expand Down
4 changes: 0 additions & 4 deletions app/alarm/audio-annunciator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
</parent>
<artifactId>app-alarm-audio-annunciator</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<dependencies>
<dependency>
Expand Down
5 changes: 0 additions & 5 deletions app/alarm/freetts-annunciator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
</parent>
<artifactId>app-alarm-freetts-annunciator</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<dependencies>
<dependency>
<groupId>net.sf.sociaal</groupId>
Expand Down
2 changes: 0 additions & 2 deletions app/display/actions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<artifactId>app-display-actions</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
Expand Down
4 changes: 0 additions & 4 deletions app/display/linearmeter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@

<artifactId>app-display-linearmeter</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencies>
<dependency>
Expand Down
6 changes: 0 additions & 6 deletions app/display/thumbwheel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
<version>6.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<artifactId>app-display-thumbwheel</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions app/queue-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ A JavaFX-based client for the [Bluesky QueueServer](https://blueskyproject.io/bl

### Prerequisites

- **Java 17** or later
- **Java 21** or later
- **Maven** (for building from source)
- **Bluesky Queue Server** running and accessible

Expand Down Expand Up @@ -107,4 +107,4 @@ When making changes:
2. Test with both WebSocket and HTTP fallback modes
3. Verify API key authentication works
4. Update documentation for new features
5. Follow existing code style and patterns
5. Follow existing code style and patterns
4 changes: 0 additions & 4 deletions app/save-and-restore/util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

<artifactId>save-and-restore-util</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<dependencies>
<dependency>
Expand Down
7 changes: 1 addition & 6 deletions app/trends/archive-datasource/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>app-trends-archive-datasource</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<name>${project.groupId}:${project.artifactId}</name>
<dependencies>
<dependency>
<groupId>org.phoebus</groupId>
Expand Down
7 changes: 1 addition & 6 deletions app/trends/archive-reader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>app-trends-archive-reader</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<name>${project.groupId}:${project.artifactId}</name>
<dependencies>
<dependency>
<groupId>org.phoebus</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*
* <p>
* This parser has specifically been written in order to minimize the
* dependencies needed for parsing JSON document. It only uses the Java 17 SE
* dependencies needed for parsing JSON document. It only uses the Java SE
* API and the Apache Commons Lang 3 library.
* </p>
*
Expand Down
11 changes: 6 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,21 @@
<derby.version>10.16.1.1</derby.version>
<jython.version>2.7.4b1</jython.version>
<jgit.version>6.9.0.202403050737-r</jgit.version>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<activemq.client.version>5.18.4</activemq.client.version>
<commons.compress.version>1.26.1</commons.compress.version>
<spring.framework.version>5.3.22</spring.framework.version>
<spring.boot.version>2.7.3</spring.boot.version>
<spring.boot.version>2.7.18</spring.boot.version>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.2</version>
<configuration>
<source>17</source>
<target>17</target>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<fork>true</fork>
<compilerArgs>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
Expand Down Expand Up @@ -283,7 +284,7 @@
<configuration>
<!-- add this to disable checking -->
<doclint>none</doclint>
<source>17</source>
<source>${maven.compiler.source}</source>
</configuration>
</execution>
</executions>
Expand Down
4 changes: 2 additions & 2 deletions services/alarm-config-logger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<version>6.0.0-SNAPSHOT</version>
</parent>
<properties>
<java.version>17</java.version>
<java.version>21</java.version>
</properties>
<artifactId>service-alarm-config-logger</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
Expand Down Expand Up @@ -96,7 +96,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.7.9</version>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
Expand Down
2 changes: 1 addition & 1 deletion services/alarm-logger/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:17-jre
FROM eclipse-temurin:21-jre

# deployment unit
COPY target/service-alarm-logger-*.jar /alarmlogger/service-alarm-logger-*.jar
Expand Down
4 changes: 2 additions & 2 deletions services/alarm-logger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<version>6.0.0-SNAPSHOT</version>
</parent>
<properties>
<java.version>17</java.version>
<java.version>21</java.version>
<elasticsearch.version>8.2.0</elasticsearch.version>
</properties>
<artifactId>service-alarm-logger</artifactId>
Expand Down Expand Up @@ -168,7 +168,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.7.9</version>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
Expand Down
2 changes: 1 addition & 1 deletion services/alarm-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:17-jre
FROM eclipse-temurin:21-jre

# deployment unit
COPY target/service-alarm-server-*.jar /alarmserver/service-alarm-server-*.jar
Expand Down
2 changes: 1 addition & 1 deletion services/save-and-restore/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:17-jre
FROM eclipse-temurin:21-jre

# deployment unit
COPY target/service-save-and-restore-*.jar /saveandrestore/service-save-and-restore-*.jar
Expand Down
4 changes: 2 additions & 2 deletions services/save-and-restore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The save-and-restore service implements service as a collection
of REST endpoints. These can be used by clients to manage configurations (aka save sets) and
snapshots, to compare snapshots and to restore PV values from snapshots.

The service is packaged as a self-contained Spring Boot jar file. External dependencies are limited to a JVM (Java 17+)
The service is packaged as a self-contained Spring Boot jar file. External dependencies are limited to a JVM (Java 21+)
and a running instance of Elasticsearch (8.x).

# Build
Expand Down Expand Up @@ -82,4 +82,4 @@ This may be preferable compared to setting environment variables on command line
```>export HOST_IP_ADDRESS=1.2.3.4```.

**NOTE:** Accessing IOCs over pva (default mode in the Docker compose files) works **only** if IOC is running on the
same host as the Docker container. Moreover, this has been verified to work only on Linux.
same host as the Docker container. Moreover, this has been verified to work only on Linux.
2 changes: 1 addition & 1 deletion services/save-and-restore/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The save-and-restore service implements service as a collection
of REST endpoints. These can be used by clients to manage configurations (aka save sets) and
snapshots, to compare snapshots and to restore PV values from snapshots.

The service is packaged as a self-contained Spring Boot jar file. External dependencies are limited to a JVM (Java 17+)
The service is packaged as a self-contained Spring Boot jar file. External dependencies are limited to a JVM (Java 21+)
and a running instance of Elasticsearch (8.x).

Running the service
Expand Down
2 changes: 1 addition & 1 deletion services/save-and-restore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.7.9</version>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
Expand Down
2 changes: 1 addition & 1 deletion services/scan-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:17-jre
FROM eclipse-temurin:21-jre

# deployment unit
COPY target/service-scan-server-*.jar /scanserver/service-scan-server-*.jar
Expand Down
2 changes: 1 addition & 1 deletion services/scan-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.7.9</version>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
Expand Down
Loading