D
Don Bruder
Bear with the newbie...
I'm thinking in terms of "new code fed to old compiler". As in, I've got
an older compiler (and due to financial and hardware constraints, I'm
going to continue having the "old" one for the forseeable future) - It
shipped with the JDK 1.1something (I'm very hazy on what version it's
supposed to be, but it APPEARS to be 1.1 or 1.1.1) stuff, if I'm reading
things correctly - but I've got a wad of code I need to work with that
was developed using at least the 1.4.2 JDK - perhaps even newer, but I
can't tell for sure - that I need to compile.
Is throwing this code at the compiler I have going to give me a useful
result, or have things changed enough between 1.1 and 1.4.2 to make the
code I've got unrecognizable garbage to the compiler I have?
On a closely related note, I'm finding that a lot of the java.something
and javax.something imports in the code I'm trying to work with simply
don't exist - As in not there at all, whether in plain sight, disguised
as something else, or otherwise - under the version of the JDK that came
with the compiler I have. Is it advisable/safe/otherwise useful to
simply snatch the code chunks I need from 1.4.2, and use them along with
my existing 1.1whatever-it-is JDK stuff? Or is that going to do nothing
but blow me to the dark side of the moon?
If "mixing and matching" JDK version code is inadvisable, would I be
safe in simply grabbing the 1.4.2 stuff, dumping my 1.1something stuff,
and feeding the compiler on that? (which comes right back to the first
question - Will the 1.1something compiler cope with 1.4.2 JDK elements?)
I've been thinking of the various "java.whatever", "javax.whatever", and
so on modules in terms of my fairly extensive C experience - Figuring
they (at least roughly) correspond to libraries, only they seem to be
stored in source form, rather than object code form. I'm thining that
since they're stored in source form, it should be easy enough to
recompile, allowing me to make this project work. This, of course,
assumes that the compiler isn't going to choke to death on them... Does
this even come somewhat close to being a reasonable assumption?
On the other hand, I'm new enough to Java that I know I can't safely
assume this is reality, and so far, haven't managed to come up with
enough information to decide if it's worth making the attempt or not.
(It's a rather large chunk of code that I'll be trying to work with)
I guess what I'm asking boils down to this:
Can newer Java code be *PRACTICALLY* compiled with an older compiler, or
is the "back-conversion" going to involve more headache than any sane
person would consider dealing with?
I'm thinking in terms of "new code fed to old compiler". As in, I've got
an older compiler (and due to financial and hardware constraints, I'm
going to continue having the "old" one for the forseeable future) - It
shipped with the JDK 1.1something (I'm very hazy on what version it's
supposed to be, but it APPEARS to be 1.1 or 1.1.1) stuff, if I'm reading
things correctly - but I've got a wad of code I need to work with that
was developed using at least the 1.4.2 JDK - perhaps even newer, but I
can't tell for sure - that I need to compile.
Is throwing this code at the compiler I have going to give me a useful
result, or have things changed enough between 1.1 and 1.4.2 to make the
code I've got unrecognizable garbage to the compiler I have?
On a closely related note, I'm finding that a lot of the java.something
and javax.something imports in the code I'm trying to work with simply
don't exist - As in not there at all, whether in plain sight, disguised
as something else, or otherwise - under the version of the JDK that came
with the compiler I have. Is it advisable/safe/otherwise useful to
simply snatch the code chunks I need from 1.4.2, and use them along with
my existing 1.1whatever-it-is JDK stuff? Or is that going to do nothing
but blow me to the dark side of the moon?
If "mixing and matching" JDK version code is inadvisable, would I be
safe in simply grabbing the 1.4.2 stuff, dumping my 1.1something stuff,
and feeding the compiler on that? (which comes right back to the first
question - Will the 1.1something compiler cope with 1.4.2 JDK elements?)
I've been thinking of the various "java.whatever", "javax.whatever", and
so on modules in terms of my fairly extensive C experience - Figuring
they (at least roughly) correspond to libraries, only they seem to be
stored in source form, rather than object code form. I'm thining that
since they're stored in source form, it should be easy enough to
recompile, allowing me to make this project work. This, of course,
assumes that the compiler isn't going to choke to death on them... Does
this even come somewhat close to being a reasonable assumption?
On the other hand, I'm new enough to Java that I know I can't safely
assume this is reality, and so far, haven't managed to come up with
enough information to decide if it's worth making the attempt or not.
(It's a rather large chunk of code that I'll be trying to work with)
I guess what I'm asking boils down to this:
Can newer Java code be *PRACTICALLY* compiled with an older compiler, or
is the "back-conversion" going to involve more headache than any sane
person would consider dealing with?