Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #947

Re: Using javac 7 to compile java 6 code

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From Knute Johnson <september@knutejohnson.com>
Newsgroups comp.lang.java.help
Subject Re: Using javac 7 to compile java 6 code
Date Tue, 16 Aug 2011 13:20:56 -0700
Organization A noiseless patient Spider
Lines 35
Message-ID <j2ejfd$qs3$1@dont-email.me> (permalink)
References <j2efk6$us7$1@dont-email.me> <j2ehpc$fbm$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Tue, 16 Aug 2011 20:21:01 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="mz/LDSJwiWnk3Jnnqg7x+Q"; logging-data="27523"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199ejHsQJkFtZXz4QLSntdI"
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0
In-Reply-To <j2ehpc$fbm$1@dont-email.me>
Cancel-Lock sha1:646U0ixSK6uY+OWoJAd5R6hL7As=
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.help:947

Show key headers only | View raw


On 8/16/2011 12:52 PM, markspace wrote:
> On 8/16/2011 12:15 PM, Knute Johnson wrote:
>> I've got some currently running code that is using 1.6 runtimes and I
>> won't be able to upgrade them right away. I want to use the new compiler
>> for new work and I tried using the -target and -source options but I've
>> run into a snag. JList is now JList<E> and the compiler issues a warning
>> even with -source set to 1.6. Is that to be expected or what? I don't
>> think using the type specification with JList would compile with a 1.6
>> compiler. Do I just need to ignore the warning and press on? And
>> JComboBox too I found.
>
>
> I think you could probably just ignore the warning. I'd have to see the
> source code to be sure. Alternately, you can compile against an older
> version of the Java API if you have, for example, the 1.6 rt.jar still
> installed (or just available), I think.
>
> -bootclasspath bootclasspath
>
> Cross-compile against the specified set of boot classes. As with the
> user class path, boot class path entries are separated by colons (:) and
> can be directories, JAR archives, or ZIP archives.
>
> <http://download.oracle.com/javase/7/docs/technotes/tools/windows/javac.html>
>

Adding the bootclasspath gets rid of the warning with or without the 
-source and -target options.  I think I still need them though if I want 
it to run under a 1.6 VM.  At least the -target anyway.

Thanks,

-- 

Knute Johnson

Back to comp.lang.java.help | Previous | NextPrevious in thread | Find similar


Thread

Using javac 7 to compile java 6 code Knute Johnson <september@knutejohnson.com> - 2011-08-16 12:15 -0700
  Re: Using javac 7 to compile java 6 code markspace <-@.> - 2011-08-16 12:52 -0700
    Re: Using javac 7 to compile java 6 code Knute Johnson <september@knutejohnson.com> - 2011-08-16 13:20 -0700

csiph-web