Makefile problem with current JDK 9

115 views
Skip to first unread message

Hartmut Branz

unread,
Jun 2, 2017, 4:10:05 PM6/2/17
to Frege Programming Language
Create an new fregec.jar for target 1.8 using a current JDK 9 javac.

If you use this new fregec.jar to compile your frege code with a JDK 1.8
Then you get the error:

java -Xss1m -jar fregec.jar -d classes src\hello.fr
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: frege/run8/Lazy has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)

To fix this problem change the makefile by adding -source 1.8 -target 1.8 in below line:

[ "$(TARGET)" = "1.7" ] || $(JAVAC) -d build -source 1.8 -target 1.8 frege/run8/*.java

Can this be fixed in the github master branch?

Ingo W.

unread,
Jun 3, 2017, 3:11:37 AM6/3/17
to Frege Programming Language
Hallo Hartmut,

thanks for observing and analyzing this problem.

It'd be great if you could create a patch.

Regards, Ingo


Reply all
Reply to author
Forward
0 new messages