Skip to content
This repository has been archived by the owner on Dec 19, 2021. It is now read-only.

Commit

Permalink
Block launching the application with Java 9 (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinShalit authored and PeterJohnson committed Nov 17, 2017
1 parent d03c70d commit 028d284
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/edu/wpi/first/outlineviewer/OutlineViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.ButtonBar.ButtonData;
import javafx.scene.control.ButtonType;
import javafx.scene.layout.Pane;
Expand All @@ -18,6 +19,18 @@ public class OutlineViewer extends Application {

@Override
public void start(Stage primaryStage) throws IOException {
if (!"1.8".equals(System.getProperty("java.specification.version"))) {
Alert invalidVersionAlert = new Alert(Alert.AlertType.ERROR);
invalidVersionAlert.setHeaderText("Invalid JRE Version!");
invalidVersionAlert.setContentText(
String.format("You are using an unsupported Java version: %s! "
+ "Please download Java 8.",
System.getProperty("java.version")));
invalidVersionAlert.showAndWait();

return;
}

AutoUpdater updater = new AutoUpdater();

PreferencesDialog preferencesDialog = new PreferencesDialog(QUIT, START);
Expand Down

0 comments on commit 028d284

Please sign in to comment.