Is java 1.6 compatible with java 1.5?

A

arshad

Hello,
I want to use a tool which works on java 1.5 and I have java 1.6
installed on my machine.
Getting lot of errors when trying to build the tool.
I am guessing that version difference is the reason. Is it?
 
R

Roedy Green

Hello,
I want to use a tool which works on java 1.5 and I have java 1.6
installed on my machine.
Getting lot of errors when trying to build the tool.
I am guessing that version difference is the reason. Is it?

Any code written for JDK 1.5 will compile and run fine on JDK 1.6,
with a very few exceptions. However, code for JDK 1.6 will not run on
JDK 1.5, unless you avoid 1.6 features and methods, and use the 1.5
target options.

See http://mindprod.com/jgloss/javacexe.html

Your problems are likely libraries you had available, on the classpath
or ext dir, no longer available eto JDK 1.6.

If you quoted the exact error messages we could be of more help.

You could also look them up at
http://mindprod.com/jgloss/compileerrormessages.html
for some hints as to what could be going wrong.


--
Roedy Green Canadian Mind Products
http://mindprod.com

"You can have quality software, or you can have pointer arithmetic; but you cannot have both at the same time."
~ Bertrand Meyer (born: 1950 age: 59) 1989, creator of design by contract and the Eiffel language.
 
A

Arne Vajhøj

arshad said:
I want to use a tool which works on java 1.5 and I have java 1.6
installed on my machine.
Getting lot of errors when trying to build the tool.
I am guessing that version difference is the reason. Is it?

If you tell us what errors you are getting, then we can tell you.

Based on the above then we can just say that maybe it a setup
problem or maybe it is a code problem (example: the tool is
implementing some standard interfaces that has changed).

If you get a binary version of the tool, then it should
work on 1.6 even if it is build on 1.5.

Arne
 
A

Arne Vajhøj

Roedy said:
Any code written for JDK 1.5 will compile and run fine on JDK 1.6,
with a very few exceptions.

As we have have discussed here a couple of times, then there are
some exception - interfaces that has gotten added methods - especially
JDBC interfaces.

Arne
 
R

Richard Maher

Roedy Green said:
Any code written for JDK 1.5 will compile and run fine on JDK 1.6,
with a very few exceptions.

Forget about Major versions; what about minor "upgrades"?

Look, I don't have proof as, like everything, that'll take time (and it's
more likely to be something I'm doing rather than Java) but as this is an
opportune moment to flag it: -

I *suspect* that somewhere between 1.6_12 (which is lovely) and 1.6_15
several chunks of AWT handling went tits-up from a browser context.

1) On IE6 now when I create a separate Modal Dialog box, my WindowListener
is receiving multiple WindowActivated events when the window is only
activated the once. What I want to do is requestFocus() to a field (other
than the first) when the dialog is displayed. This used to work but with
6_15 I appear to be getting activated events for Windows *other than the
dialog*. :-(
2) Does Java even support FF2 anymore. I'm happy if it doesn't ('cos the
alternative is that SUN's regression testing is crap) but if it does then
stuff "just stopped working" (tm)

I know that's not much to go on and it could well be me *but* reverting to
1.6_12 made everything work again. Magic!

I advise everyone to wait for 1.6_*16* or possibly *18* before migrating!

Cheers Richard Maher

Roedy Green said:
Any code written for JDK 1.5 will compile and run fine on JDK 1.6,
with a very few exceptions. However, code for JDK 1.6 will not run on
JDK 1.5, unless you avoid 1.6 features and methods, and use the 1.5
target options.

See http://mindprod.com/jgloss/javacexe.html

Your problems are likely libraries you had available, on the classpath
or ext dir, no longer available eto JDK 1.6.

If you quoted the exact error messages we could be of more help.

You could also look them up at
http://mindprod.com/jgloss/compileerrormessages.html
for some hints as to what could be going wrong.


--
Roedy Green Canadian Mind Products
http://mindprod.com

"You can have quality software, or you can have pointer arithmetic; but
you cannot have both at the same time."
~ Bertrand Meyer (born: 1950 age: 59) 1989, creator of design by contract
and the Eiffel language.
 
L

Lew

Richard said:
I advise everyone to wait for 1.6_*16* or possibly *18* before migrating!

Well, since 1.6.0_16 has been out for about a month now, that won't be a long
wait.
 
R

Roedy Green

I *suspect* that somewhere between 1.6_12 (which is lovely) and 1.6_15
several chunks of AWT handling went tits-up from a browser context.

I have not noticed this. Have you an SSCCE that will demonstrate the
problem?

The OS updates video drivers get automatically from time to time. This
complicates sorting out the cause of the trouble.
 
M

Mike Schilling

Richard said:
Forget about Major versions; what about minor "upgrades"?

IIRC, it was1.4.2 that changed the rules for method overload
resolution to no longer take the return type into account.
 
R

Roedy Green

IIRC, it was1.4.2 that changed the rules for method overload
resolution to no longer take the return type into account.

Do you have any URLs that talk about his? Either it slipped by
unnoticed or slipped my mind. I would think any incompatible change
to Java syntax would have been red-flagged in my memory.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top