T
travel2light
Is there a way to find this out? Thanks for any advice.
Michael
Michael
Is there a way to find this out? Thanks for any advice.
Is there a way to find this out?
Is there a way to find this out? Thanks for any advice.
Please repeat subject line in the body of the message.
What app.? Yours or someone elses?
For your own, you might try compiling the code
using the -bootclasspath option, and pointing it
to the rt.jar of the earlier version.
...
...I
only want to find out what versions of java the compiled code will run
on. I am using 1.6.0_03-b05. I don't intend to recompile it for
different versions.
travel2light said:Is there a way to find this out? Thanks for any advice.
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?
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?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.