Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use OpenJDK 11 as default JDK #846

Merged
merged 9 commits into from
Feb 21, 2019
Merged
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 @@ -19,7 +19,7 @@ cache:
- .autoconf
- $HOME/.m2
jdk:
- oraclejdk8
- openjdk11
notifications:
email:
- [email protected]
11 changes: 4 additions & 7 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Building Eclair

## Requirements
- [Java Development Kit](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) 1.8u161 or newer
- [OpenJDK 11](https://jdk.java.net/11/).
- [Maven](https://maven.apache.org/download.cgi) 3.5.4 or newer
- [Inno Setup](http://www.jrsoftware.org/isdl.php) 5.5.9 (optional, if you want to generate the windows installer)
- [Docker](https://www.docker.com/) 18.03 or newer (optional) if you want to run all tests

:warning: You can also use [Oracle JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) to build and run eclair, but we recommend you use Open JDK11.

## Build
To build the project, simply run:
```shell
Expand All @@ -22,8 +23,4 @@ To only build the `eclair-node` module
```shell
$ mvn install -pl eclair-node -am -DskipTests
```
To generate the windows installer along with the build, run the following command:
```shell
$ mvn install -DskipTests -Pinstaller
```
The generated installer will be located in `eclair-node-gui/target/jfx/installer`

16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,13 @@ deprecatedrpc=signrawtransaction

### Installing Eclair

The released binaries can be downloaded [here](https://github.com/ACINQ/eclair/releases).
Eclair is developed in [Scala](https://www.scala-lang.org/), a powerful functional language that runs on the JVM, and is packaged as a JAR (Java Archive) file. We provide 2 different packages, which internally use the same core libraries:
* eclair-node, which is a headless application that you can run on servers and desktops, and control from the command line
* eclair-node-gui, which also includes a JavaFX GUI

#### Windows
To run Eclair, you first need to install Java, we recommend that you use [OpenJDK 11](https://jdk.java.net/11/). Eclair will also run on Oracle JDK 1.8, Oracle JDK 11, and other versions of OpenJDK but we don't recommend using them.

Just use the windows installer, it should create a shortcut on your desktop.

#### Linux, macOS or manual install on Windows

You need to first install java, more precisely a [JRE 1.8](http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html).

:warning: If you are using the OpenJDK JRE, you will need to build OpenJFX yourself, or run the application in headless mode (see below).

Then download the latest fat jar and depending on whether or not you want a GUI run the following command:
Then download our latest [release](https://github.com/ACINQ/eclair/releases) and depending on whether or not you want a GUI run the following command:
* with GUI:
```shell
java -jar eclair-node-gui-<version>-<commit_id>.jar
Expand Down
7 changes: 7 additions & 0 deletions eclair-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@
<version>0.9.8</version>
<scope>test</scope>
</dependency>
<!-- neeeded for our docker tests, see https://github.com/spotify/dockerfile-maven/issues/90 -->
<dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this?

Copy link
Member Author

@sstone sstone Feb 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this for our docker tests, I've added a comment in the pom

<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-testkit_${scala.version.short}</artifactId>
Expand Down
11 changes: 11 additions & 0 deletions eclair-node-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<skipNativeVersionNumberSanitizing>true</skipNativeVersionNumberSanitizing>
<nativeOutputDir>${project.build.directory}/jfx/installer</nativeOutputDir>
<mainClass>fr.acinq.eclair.JavafxBoot</mainClass>
<preLoader>fr.acinq.eclair.gui.FxPreloader</preLoader>
<verbose>false</verbose>
<bundler>EXE</bundler>
<updateExistingJar>true</updateExistingJar>
Expand All @@ -122,6 +123,16 @@
<artifactId>core</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11.0.2</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11.0.2</version>
</dependency>
<!-- TESTS -->
<dependency>
<groupId>com.typesafe.akka</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package fr.acinq.eclair
import java.io.File

import akka.actor.ActorSystem
import com.sun.javafx.application.LauncherImpl
import fr.acinq.eclair.gui.{FxApp, FxPreloader}
import grizzled.slf4j.Logging
import javafx.application.Application

/**
* Created by PM on 25/01/2016.
Expand All @@ -35,7 +35,8 @@ object JavafxBoot extends App with Logging {
implicit val system = ActorSystem("eclair-node-gui")
new Setup(datadir).bootstrap
} else {
LauncherImpl.launchApplication(classOf[FxApp], classOf[FxPreloader], Array(datadir.getAbsolutePath))
System.setProperty("javafx.preloader", classOf[FxPreloader].getName)
Application.launch(classOf[FxApp], datadir.getAbsolutePath)
}
} catch {
case t: Throwable =>
Expand Down
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<scala.version>2.11.11</scala.version>
<scala.version>2.11.12</scala.version>
<scala.version.short>2.11</scala.version.short>
<akka.version>2.4.20</akka.version>
<akka.http.version>10.0.11</akka.http.version>
Expand Down Expand Up @@ -127,6 +127,8 @@
<arg>-unchecked</arg>
<arg>-Xmax-classfile-name</arg>
<arg>140</arg>
<!-- needed to compile Scala code on JDK9+ -->
<arg>-nobootcp</arg>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes the scala jar from the boot classpath and is need to compile scala code on JDK9+

</args>
<scalaCompatVersion>${scala.version.short}</scalaCompatVersion>
</configuration>
Expand Down