This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: kawa lib and jdk version
- From: Per Bothner <per at bothner dot com>
- To: Damien MATTEI <Damien dot Mattei at unice dot fr>
- Cc: Kawa mailing list <kawa at sourceware dot org>
- Date: Mon, 2 May 2016 07:27:34 -0700
- Subject: Re: kawa lib and jdk version
- Authentication-results: sourceware.org; auth=none
- References: <5723663C dot 7020608 at unice dot fr> <5723836A dot 8000303 at bothner dot com> <201605021222 dot 12586 dot Damien dot Mattei at unice dot fr>
On 05/02/2016 03:22 AM, Damien MATTEI wrote:
i had made few attemps to work with jdk7,unfortunately it complains about a major version of 51 (my platform) instead of 52 (kawa)
so i will use jdk8 where all is ok ,it's just that where i work servers are under jdk7 but i hope it will be upgraded soon
That is why you have to compile Kawa with '-target 7', so that javac with generated classfile version 51.
I just did a test - you actually also have to specify -source 7. The following works:
$ JAVAC='javac -source 7 -target 7' ./configure --with-java-source=7 ...other-options...
$ make all
Then I was able run the resulting kawa.jar on java 7.
Of course this assuming you're using the JDK 1.8 to "cross-compile" Kawa so
the result can be used on JDK 1.7.
If you're using JDK 1.7 to build Kawa, it should just work.
--
--Per Bothner
per@bothner.com http://per.bothner.com/