Skip to content
Draft

Jdk25 #3839

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 .github/actions/setup-java/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ runs:
- uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287
with:
distribution: temurin
java-version: '21'
java-version: '25'
cache: maven
18 changes: 9 additions & 9 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
- [JDK21 or later, suggested is OpenJDK](https://adoptium.net/en-GB/temurin/releases?version=21).
- [JDK 25 or later, suggested is OpenJDK](https://adoptium.net/en-GB/temurin/releases?version=25).
- [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-21.0.11+10/Contents/Home
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-25/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-21-or-later
export JAVA_HOME=/path/to/your/jdk-25-or-later
export PATH="$JAVA_HOME/bin:$PATH"
eclipse/eclipse -consoleLog

Check Eclipse Preferences:

* Java, Installed JREs: JDK 21-or-later should be the default
* Java, Compiler: JDK Compliance should be "21" or higher
* Java, Installed JREs: JDK 25-or-later should be the default
* Java, Compiler: JDK Compliance should be "25" 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-21).
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-25).
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 21 or above
* Ensure that the JDK is version 25 or above
* Change the project name to Phoebus and click finish

To run the Phoebus application:

* Run | Edit Configurations...
* Select + | Application
* Module: Your JRE 21
* Module: Your JRE 25
* Classpath `-cp`: select `product` from drop-down
* Main class: `org.phoebus.product.Launcher`
* Set the name to Phoebus
Expand All @@ -145,7 +145,7 @@ To run the Phoebus application:

First download [NetBeans 9](https://netbeans.apache.org/download/nb90/nb90.html),
then the target platform as described above. After running NetBeans, select
**Tools** ➜ **Java Platforms** and make sure that a Java 9 or 10 platform is set as
**Tools** ➜ **Java Platforms** and make sure that a Java 25 platform is set as
the default one.

To open the Maven project Select the **File** ➜ **Open Project…** and select the
Expand Down
2 changes: 1 addition & 1 deletion app/alarm/logging-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
<version>${jackson.annotations.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down
2 changes: 1 addition & 1 deletion app/channel/channelfinder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
<version>${jackson.annotations.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
Expand Down
6 changes: 6 additions & 0 deletions app/email/ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.testfx</groupId>
<artifactId>openjfx-monocle</artifactId>
<version>21.0.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion app/logbook/olog/client-es/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
<version>${jackson.annotations.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down
2 changes: 1 addition & 1 deletion app/logbook/olog/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
<version>${jackson.annotations.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
Expand Down
6 changes: 6 additions & 0 deletions app/logbook/ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.testfx</groupId>
<artifactId>openjfx-monocle</artifactId>
<version>21.0.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion 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 21** or later
- **Java 25** or later
- **Maven** (for building from source)
- **Bluesky Queue Server** running and accessible

Expand Down
6 changes: 6 additions & 0 deletions core/ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.testfx</groupId>
<artifactId>openjfx-monocle</artifactId>
<version>21.0.2</version>
<scope>test</scope>
</dependency>
<!-- Include all JavaFX modules so single dependency
on core-ui will provide all that's needed
-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import org.springframework.web.socket.messaging.WebSocketStompClient;

import javax.websocket.DeploymentException;
import jakarta.websocket.DeploymentException;

import java.lang.reflect.Type;
import java.net.URI;
import java.util.ArrayList;
Expand Down Expand Up @@ -151,7 +152,7 @@ public void connect() {
try {
synchronized (WebSocketClientService.this) {
if (attemptReconnect.get()) {
stompSession = stompClient.connect(connectUrl, sessionHandler).get();
stompSession = stompClient.connectAsync(connectUrl, sessionHandler).get();
stompSession.subscribe(this.subscriptionEndpoint, new StompFrameHandler() {
@Override
public Type getPayloadType(StompHeaders headers) {
Expand Down Expand Up @@ -268,7 +269,7 @@ public static boolean checkAvailability(String webSocketConnectUrl) {
WebSocketClient webSocketClient = new StandardWebSocketClient();
WebSocketStompClient stompClient = new WebSocketStompClient(webSocketClient);
try {
StompSession stompSession = stompClient.connect(webSocketConnectUrl, new StompSessionHandlerAdapter() {
StompSession stompSession = stompClient.connectAsync(webSocketConnectUrl, new StompSessionHandlerAdapter() {
@Override
public Type getPayloadType(StompHeaders headers) {
return super.getPayloadType(headers);
Expand Down
2 changes: 1 addition & 1 deletion dependencies/phoebus-target/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
<version>${jackson.annotations.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down
12 changes: 5 additions & 7 deletions phoebus-product/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The following use cases have been verified:

#### Prerequisites

* A working Phoebus build environment, i.e. JDK 11 and Maven.
* A working Phoebus build environment, i.e. JDK 25 and Maven.
* `jpackage` must be run on the same OS as the target OS, i.e. cross builds are not supported.
* JDK 14 or newer.
* On Windows you also need to install the "WiX" tools, available here: https://wixtoolset.org/.
Expand All @@ -51,7 +51,7 @@ The following use cases have been verified:
5. Determine a version for your application, in the following referred to as `app_version`.
6. For Window installers determine a menu group in which the application will be placed. If the group does not
exist, it will be created.
7. Identify the path to the Java 11 SDK. In the following referred to as `<jdk_root>`. See below for additional
7. Identify the path to the Java 25 SDK. In the following referred to as `<jdk_root>`. See below for additional
information on the selecttion of target Java runtime.

##### `jpackage` build step 1
Expand Down Expand Up @@ -91,10 +91,9 @@ and MacOS at the European Spallation Source.

### Selection of target Java runtime
During build (step 1) a target Java runtime is specified. If this option (`--runtime-image`) is omitted, `jpackage` will
bundle the Java runtime containing the `jpackage` tool, i.e. Java 14+. Tests on Windows shows that the
target runtime selection may impact the end result, i.e. the Phoebus application installed from the msi file.
For instance, while the Java runtime Adopt JDK 11.0.9 can be bundled into a working installation,
Adopt JDK 11.0.12 will not work when Phoebus is launched. On MacOS Adopt JDK 11.0.12 works fine.
bundle the Java runtime containing the `jpackage` tool, i.e. Java 14+. Tests on Windows show that the
target runtime selection may impact the end result, i.e. the Phoebus application installed from the msi file.
When preparing installers, validate the exact JDK 25 runtime you plan to bundle on each supported OS.

### Application signing
Starting from MacOS 13.2 (possibly from 13.0), installer packages must be signed for a hassle-free installation process.
Expand All @@ -112,4 +111,3 @@ Developer Program may request/create such certificates.

`


22 changes: 13 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@
<epics.version>7.0.11</epics.version>
<epics.util.version>1.0.8</epics.util.version>
<vtype.version>1.0.8</vtype.version>
<openjfx.version>21.0.7</openjfx.version>
<openjfx.version>25.0.3</openjfx.version>
<!-- netscape.javascript jar for the JDK 26+ profiles; versioned separately
from openjfx as it's only published for 25+. -->
<jsobject.version>26.0.1</jsobject.version>
<jackson.version>2.12.3</jackson.version>
<jackson.version>2.21.2</jackson.version>
<jackson.annotations.version>2.22</jackson.annotations.version>
<batik.version>1.17</batik.version>
<mockito.version>2.23.4</mockito.version>
<postgresql.driver.version>42.6.2</postgresql.driver.version>
Expand All @@ -92,18 +93,18 @@
<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.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</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.18</spring.boot.version>
<spring.boot.version>4.0.5</spring.boot.version>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.2</version>
<version>3.14.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
Expand All @@ -125,7 +126,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<version>3.2.5</version>
<configuration>
<excludes>
<exclude>**/*FXTest.java</exclude>
Expand All @@ -135,7 +136,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version>
<version>3.2.5</version>
<configuration>
<skipITs>${skipITTests}</skipITs>
</configuration>
Expand Down Expand Up @@ -251,6 +252,9 @@
<java.awt.headless>true</java.awt.headless>
<testfx.robot>glass</testfx.robot>
<testfx.headless>true</testfx.headless>
<glass.platform>Monocle</glass.platform>
<monocle.platform>Headless</monocle.platform>
<headless.geometry>1920x1080-32</headless.geometry>
<prism.order>sw</prism.order>
<prism.text>t2k</prism.text>
<testfx.setup.timeout>2500</testfx.setup.timeout>
Expand Down Expand Up @@ -291,7 +295,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<version>3.2.5</version>
<configuration>
<systemPropertyVariables>
<ignore_local_ipv6>true</ignore_local_ipv6>
Expand Down
2 changes: 1 addition & 1 deletion 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>21</java.version>
<java.version>25</java.version>
</properties>
<artifactId>service-alarm-config-logger</artifactId>
<name>${project.groupId}:${project.artifactId}</name>
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:21-jre
FROM eclipse-temurin:25-jre

# deployment unit
COPY target/service-alarm-logger-*.jar /alarmlogger/service-alarm-logger-*.jar
Expand Down
32 changes: 19 additions & 13 deletions services/alarm-logger/pom.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.phoebus</groupId>
<artifactId>services</artifactId>
<version>6.0.0-SNAPSHOT</version>
</parent>
<properties>
<java.version>21</java.version>
<java.version>25</java.version>
<elasticsearch.version>8.2.0</elasticsearch.version>
</properties>
<artifactId>service-alarm-logger</artifactId>
Expand Down Expand Up @@ -37,14 +38,14 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -89,7 +90,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
<version>${jackson.annotations.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
Expand Down Expand Up @@ -137,7 +138,11 @@
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webmvc-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down Expand Up @@ -193,7 +198,8 @@
<configuration>
<!-- This section defines the general configuration, which can be overriden for each generated document. -->
<apiConfiguration>
<library>SPRING_MVC</library> <!-- SPRING_MVC is the default value. Here this tag could be deleted. Other possible values are JAKARTA_RS and JAVAX_RS -->
<library>SPRING_MVC
</library> <!-- SPRING_MVC is the default value. Here this tag could be deleted. Other possible values are JAKARTA_RS and JAVAX_RS -->
<fileFormat>json</fileFormat>
<tagAnnotations> <!-- Only useful if you use Spring MVC -->
<!-- RestController is the default value, but can be replaced by RequestMapping -->
Expand Down
Loading
Loading