...
...
[Snip]
> So, it works like this, you compile code
> using the 1.6 SDK, but specify the -bootclasspath
> option and point that towards a 1.4 rt.jar
> (as well, specify the -source and -target,
> but the -bootclasspath is the one most people
> miss).
I'm not the original poster, but I have a related question. You always
see the -source and -target options used together and set to the same java
version. Is this required these days. What I would like to do is to
create a 1.4 class file from 1.6 sources using a 1.4 rt.jar. So I could
use modern java language features, but restrict myself to the older
libraries and produce a class file that can be read by older versions of
the JRE?
Am I asking too much here?
Thanks.

Signature
Kenneth P. Turvey <kt-usenet@squeakydolphin.com>
Andrew Thompson - 10 Mar 2008 01:58 GMT
On Mar 10, 10:41 am, "Kenneth P. Turvey" <kt-
use...@squeakydolphin.com> wrote:
...
> I'm not the original poster, but I have a related question. You always
> see the -source and -target options used together and set to the same java
> version.
You might. I don't.
-source never has any meaning below '1.3',
whereas the -target might specify '1.1'.
>..Is this required these days. What I would like to do is to
> create a 1.4 class file from 1.6 sources using a 1.4 rt.jar. So I could
> use modern java language features, but restrict myself to the older
> libraries and produce a class file that can be read by older versions of
> the JRE?
I am not entirely sure what you are asking,
but note that generics (for e.g.) cannot be
used in any code intended to run on 1.4.
--
Andrew T.
PhySci.org
Kenneth P. Turvey - 10 Mar 2008 08:04 GMT
> I am not entirely sure what you are asking,
> but note that generics (for e.g.) cannot be
> used in any code intended to run on 1.4.
Well, that would be one feature I would like. Would this give the modern
looping constructs (a favorite of mine)? What about assertions?
Thanks?

Signature
Kenneth P. Turvey <kt-usenet@squeakydolphin.com>
Andrew Thompson - 10 Mar 2008 10:04 GMT
On Mar 10, 6:04 pm, "Kenneth P. Turvey" <kt-use...@squeakydolphin.com>
wrote:
> > I am not entirely sure what you are asking,
> > but note that generics (for e.g.) cannot be
> > used in any code intended to run on 1.4.
>
> Well, that would be one feature I would like. Would this give the modern
> looping constructs (a favorite of mine)? What about assertions?
I do not believe so, though the spec. gurus
might be in a better position to advise.
(shrugs) I usually 'specify the options and let
the compiler decide'. Further, since I only too
regularly need to design for binaries that will
run on 1.4 or (shock/horror) 1.1, my enthusiasm
for the 'new language constructs' has been somewhat
lacking.
> Thanks?
I understand 'Thanks' and 'Thanks!', but what
does 'Thanks?' mean?
Bear with me - I took the English level in school
that was designed for people who's parents were
cousins (more interested in math and any flavor
of science or tech.).
--
Andrew T.
PhySci.org