public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
From: Per Bothner <per@bothner.com>
To: Kawa mailing list <kawa@sourceware.org>
Subject: kawa and java 9 modules
Date: Thu, 28 Sep 2017 20:36:00 -0000	[thread overview]
Message-ID: <7a3f4c5e-8f39-3564-d530-d8ea1085fa67@bothner.com> (raw)

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/

             reply	other threads:[~2017-09-28 20:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 20:36 Per Bothner [this message]
2017-09-29  7:29 ` Helmut Eller
2017-09-29 11:39   ` Per Bothner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7a3f4c5e-8f39-3564-d530-d8ea1085fa67@bothner.com \
    --to=per@bothner.com \
    --cc=kawa@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).