diff --git a/README.md b/README.md index 34a4349184..36850e78c4 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ https://control-system-studio.readthedocs.io ## Requirements - - [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/) +- [JDK25 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/) ## Target Platform @@ -24,10 +24,10 @@ mvn clean verify -f dependencies/pom.xml ## Building with maven -Define the JAVA_HOME environment variable to point to your Java installation directory. +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.0.2/Contents/Home ``` Verify through: ``` @@ -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 @@ -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. @@ -120,20 +120,36 @@ Can now start product/src/main/java/org.phoebus.product/Launcher.java. ## Developing with Intellij IDEA -To import the project: +To import and set up the project: -* Import 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 -* Change the project name to Phoebus and click finish +* Select New Project. +* Enter Phoebus as the project name. +* Select Maven as the project type. +* Choose the appropriate JDK 25 installation path. +* Navigate to File → Settings → Build, Execution, Deployment → Build Tools → Maven. +* Under Maven → Runner, set the JRE to JDK 25. +* Open the Maven tool window from the right sidebar. +* Click Sync All Maven Projects to synchronize the project and download the required dependencies. + +To build the phoebus application: + +* Open a terminal in IntelliJ IDEA and navigate to the Phoebus project root directory. +* Ensure that JDK 25 or later and Maven 3.x are installed and configured correctly. + +``` +# Verify Java and Maven versions +java -version +mvn -version + +# Build the application +mvn clean install -DskipTests +``` 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