Compiling and running with different revisions

W

Will

Ok, silly question but I can't seem to find the answer. If I compile
with JDK version 1.3.1_07 can I run my code without problems on a JRE
1.4.2_xx? I think the answer should be yes, but I just want to make
sure. I know that some of the JREs behave differently (bug fixes,
etc.) but they are still forward/backward compatible, right?
My specific problem, should someone already have another fix, is that
in 1.3.1_07 the JFileChooser is crippled and annoying compared to the
native Windows dialog. It cannot rename folders or files
successfully, it cannot jump to the file starting with the same letter
you pressed, and the look and feel occassionally hiccups. I'm hoping
some or all of these bugs have been corrected in later JREs and that I
won't have to recompile my code since the JFileChooser is part of
Sun's packages and should just get linked to, not compiled in with
mine. Any thoughts? Or any alternatives to the JFileChooser class?
-Will
 
P

Paul Lutus

Will said:
Ok, silly question but I can't seem to find the answer. If I compile
with JDK version 1.3.1_07 can I run my code without problems on a JRE
1.4.2_xx?

The answer for this specific example should be "yes", but in some cases
(with a greater gap between versions) there are differences that could
create problems.

Why not test your application on each version you intend to support?
I think the answer should be yes, but I just want to make
sure. I know that some of the JREs behave differently (bug fixes,
etc.) but they are still forward/backward compatible, right?

In general, yes, but it is always prudent to test your application with the
target versions.
My specific problem, should someone already have another fix, is that
in 1.3.1_07 the JFileChooser is crippled and annoying compared to the
native Windows dialog. It cannot rename folders or files
successfully, it cannot jump to the file starting with the same letter
you pressed, and the look and feel occassionally hiccups. I'm hoping
some or all of these bugs have been corrected in later JREs and that I
won't have to recompile my code since the JFileChooser is part of
Sun's packages and should just get linked to, not compiled in with
mine.

For this particular example, you really should recompile with a later
version to see the outcome. And in general, it is a good idea to tell the
users of your program which Java versions are supported/expected.
 

Ask a Question

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.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
arinsharma
Top