Path: csiph.com!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: Problem compiling with 9 for 8 Date: Mon, 2 Oct 2017 19:46:30 -0400 Organization: Aioe.org NNTP Server Lines: 40 Message-ID: References: NNTP-Posting-Host: PBuS014lhzVyHjLbXmo/ZQ.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 X-Notice: Filtered by postfilter v. 0.8.2 Content-Language: en-US Xref: csiph.com comp.lang.java.programmer:37523 On 10/2/2017 5:08 PM, Knute Johnson wrote: > On 10/2/2017 15:10, Arne Vajhøj wrote: >> Yes. But does it work? > > Yes it does. > > I guess I shouldn't read the docs because they say: > > --release release > >     Compiles against the public, supported and documented API for a > specific VM version. Supported release targets are 6, 7, 8, and 9. > >     Note: > >     When using --release for a version of the Java Platform that > supports modules, you can’t use --add-modules to access internal JDK > modules, nor can you use --add-exports to access internal JDK APIs in > the modules. > > And with no further information supplied that implies to me that you > don't need to have JDK 8 installed (or parts of it) to get it to compile. As I explained then I believe that --release replaces -source (that set the language itself version), -target (that set the generated Java byte code version) and -Xbootclasspath (that set the javart.jar used and therefore the version used). So I do not expect the Java compiler to have a list of the entire Java API for all 4 versions and verify usage against that. So I am not surprised that Java 8 is needed. If Java 8 javac automatically find jfxrt.jar then I would lean towards that Java 9 javac with --release 8 does not to be a bug. Arne