• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Why "lock" an app to a particluar JRE version

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
Maybe a strange question but I felt that here is the place I can ask!
We are using a Java App at work (an editor tool for text documents)that requiers us to use JRE 1.3.1_XX (some version number). Does anyone here knows why you would want to do that? We can't even start the app if we have a higher version of JRE installed. Isn't the JRE backwords compatible? I mean, as far as I know you do get quite a speed increase in the latest JRE versions so it is really a shame to do this kind of thing. Or can anyone think of any reason why?
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, the JRE's are not backwards compatible. In each major version there are changes to the API implementation, so it's not guaranteed that the application would work without testing it first.
 
Tomas Hertzman
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK. I see. I thougt that you only added functionality to a new JRE to preserve compatibility. Seems like a economical issue then.....
Thank you.

/Tomas
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My cynical reaction to "why..." = "To ensure future consulting/upgrade income"
Bill
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In general Java implementations ARE backwards compatible. Very occasionally, an application will be written that depends on a bug; when that bug is fixed, the app breaks. And sometimes an application will use future reserved words or class names in java.lang, so that the old code won't compile under a newer compiler without modification. But it's not at all true that in general, an application written with JDK 1.3.1 won't run with 1.4.2 or even 5.0 -- in general it will.

If your application refuses to start under anything but 1.3.1, it's exceedingly likely that the programmer has included a statement to check the JDK version and refuse to run under anything but 1.3.1; presumably 1.3.1 was current at that time and he was refusing to run on older JDKs, because he used some API present only in 1.3.1. But it's because the app was poorly written, and almost certainly not because of some problem with the JRE.
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Tomas Hertzman:
Hi.
Maybe a strange question but I felt that here is the place I can ask!
We are using a Java App at work (an editor tool for text documents)that requiers us to use JRE 1.3.1_XX (some version number). Does anyone here knows why you would want to do that? We can't even start the app if we have a higher version of JRE installed. Isn't the JRE backwords compatible? I mean, as far as I know you do get quite a speed increase in the latest JRE versions so it is really a shame to do this kind of thing. Or can anyone think of any reason why?



I have seen hundreds of projects like this, and will probably see more. While I'd like to offer you an optimistic explanation, reality unfortunately prevents me from doing so. In *all* cases that I have observed, this is the result of general incompetence on behalf of the developers. In fact, I have watched a rather large (in fact, the largest Java project on the planet) project evolve its support contract based on the mistakes that its many hundreds of developers make. For example, I might be asked to write some component and I might add some assert statements. Since a 1.3 runtime is supported, and so assert statements are not, I will then engage in a bitter dispute about who needs to change their stance - since I am a lowly Australian and in this case, our operations are driven and funded by the US, I will likely be forced to concede regardless of the technical merits of my argument (or lack of). However, note that a reversal of roles would also see me conceding - again due to a politically motivated agenda - not a technical one.

In more simple terms, you end up with a big nasty contradictory mess, that customers pay lots of money for, and you drive yourself crazy trying to logically explain the reasons for its existence. My biggest piece of advice is "Do not attempt to rationalise your observation" - it will truly drive you nuts.

So did I guess right?
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've met an application, which refused to start with my 'unknown version' (1.4.x) and luckily it came with the source-code.
It tested the version to act differently for 1.1, 1.2 and an 1.3 - version, but the developers only thought of the past, not the future.
After threating everything unknown like 1.3, it worked as expected.
 
reply
    Bookmark Topic Watch Topic
  • New Topic