From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66352 invoked by alias); 28 Sep 2017 20:36:30 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 65968 invoked by uid 89); 28 Sep 2017 20:36:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=relates, UD:htm X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Sep 2017 20:36:27 +0000 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1dxfXk-0001mT-Fx for kawa@sourceware.org; Thu, 28 Sep 2017 22:36:24 +0200 Received: from [76.9.90.245] (helo=localhost.localdomain) by mailfront10.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1dxfXG-0004pt-TE for kawa@sourceware.org; Thu, 28 Sep 2017 22:35:55 +0200 To: Kawa mailing list From: Per Bothner Subject: kawa and java 9 modules Message-ID: <7a3f4c5e-8f39-3564-d530-d8ea1085fa67@bothner.com> Date: Thu, 28 Sep 2017 20:36:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-q3/txt/msg00089.txt.bz2 One reason Kawa 3.0 is delayed is I've been trying trying to build and run Kawa on Java 9. Most of the issues are fixed and checked into git. One remaining issue relates to "Modules Shared with Java EE Not Resolved by Default" https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-F640FA9D-FB66-4D85-AD2B-D931174C09A3 This doesn't affect building Kawa, but it breaks some of the testcases in the testsuite. These can be fixed by passing the new --add-modules switch to java. For example: ../bin/kawa.sh -J--add-modules -Jjava.xml.bind -d .. -P testsuite. -T JaxbAnnotations3 -C jaxb-annotations3.scm One problem is this fails when running under Java 8. One solution is to pass the -add-modules option when configured --with-java-source=9 and not otherwise. That fails when building the default sources (which will remain java-8 for now) using java-9. A solution is to check java -version, in the actual Makefile: JAVA_VERSION=`java -version 2>&1 |sed -e '1,1s|.*version "\(.*\)"|\1|p' -e '1,$d'` One idea I had is to add support for --add-modules to the kawa shell script, just like we do for the -J and -D options. If not running under Java 9, we ignore the -add-modules option. (Note the shell script would have to execute 'java -version' as a separate command, *before* starting the Java/kawa process, so it would slow things down, though only when using -add-modules.) I'm leaning to *not* adding -add-modules to the kawa shell script at this time, but I'm open to adding it later if it would help people. Any thoughts? -- --Per Bothner per@bothner.com http://per.bothner.com/