Skip to content
This repository was archived by the owner on May 22, 2024. It is now read-only.

Commit 53deae3

Browse files
author
Jaroslav Tulach
committed
Compilation can be done on any JDK >= 8
1 parent e878110 commit 53deae3

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,5 +204,11 @@
204204
<version>4.12</version>
205205
<scope>test</scope>
206206
</dependency>
207+
<dependency>
208+
<groupId>org.graalvm.sdk</groupId>
209+
<artifactId>graal-sdk</artifactId>
210+
<version>${graalvm.version}</version>
211+
<scope>provided</scope>
212+
</dependency>
207213
</dependencies>
208214
</project>

src/main/java/com/mycompany/app/App.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,16 @@ public class App {
7171
+ "}\n";
7272

7373
public static void main(String[] args) throws Exception {
74-
benchGraalPolyglotContext();
74+
try {
75+
benchGraalPolyglotContext();
76+
} catch (LinkageError err) {
77+
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
78+
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
79+
System.out.println("!Download GraalVM.org or use JDK11!");
80+
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
81+
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
82+
System.exit(0);
83+
}
7584
benchGraalScriptEngine();
7685
benchNashornScriptEngine();
7786
}

0 commit comments

Comments
 (0)