Home > Archive > Java Help > July 2006 > Call Java 1.5 Jar from Java 1.4 JVM ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Call Java 1.5 Jar from Java 1.4 JVM ?
|
|
| stephenson.martin@gmail.com 2006-07-21, 8:01 am |
| Is it possible to call a Jar file complied with Java 1.5 from a 1.4 JVM
?
I have done a wee bit of testing and I get :
"class file has wrong version 49.0, should be 48.0"
To be honest, this is preretty much what I expected, but I need to do
some investigation on this.
The reason is this:
App A <----> App B
App A is a 3rd Party component we use and it's being moved to Java 1.5
(we have no access to the code base)
App B uses a JAR file from App A (subclasses off it and calls APIs)
However, App B is Java 1.4 and is part of a framework that that is 1.4.
App B and the Framework code total about 1,000 Java files and quite a
few IDL files as it has CORBA stuff as well.
Basically, I want to know what options I have to make App B call the
new App A 1.5 JARs ?
The obvious answer is to migrate all App B to Java 1.5 and Bob's your
uncle....But do I have any other options, as this is a big thing to do
(Maybe not much code will change, but from unit test, system test
points of view the whole solution will have to be retested) ???
Any suggestions/ideas would be great.
Thanks !
Martin.
| |
| Roland de Ruiter 2006-07-21, 8:01 am |
| On 21-7-2006 12:32, stephenson.martin@gmail.com wrote:
> Is it possible to call a Jar file complied with Java 1.5 from a 1.4 JVM
> ?
>
> I have done a wee bit of testing and I get :
>
> "class file has wrong version 49.0, should be 48.0"
>
> To be honest, this is preretty much what I expected, but I need to do
> some investigation on this.
>
> The reason is this:
>
> App A <----> App B
>
> App A is a 3rd Party component we use and it's being moved to Java 1.5
> (we have no access to the code base)
>
> App B uses a JAR file from App A (subclasses off it and calls APIs)
>
> However, App B is Java 1.4 and is part of a framework that that is 1.4.
> App B and the Framework code total about 1,000 Java files and quite a
> few IDL files as it has CORBA stuff as well.
>
> Basically, I want to know what options I have to make App B call the
> new App A 1.5 JARs ?
>
> The obvious answer is to migrate all App B to Java 1.5 and Bob's your
> uncle....But do I have any other options, as this is a big thing to do
> (Maybe not much code will change, but from unit test, system test
> points of view the whole solution will have to be retested) ???
>
> Any suggestions/ideas would be great.
>
> Thanks !
>
>
> Martin.
>
Is it possible to start App B in a 1.5 JVM? A 1.5 JVM should be able to
run 1.4 code (i.e. class file version 48.0).
--
Regards,
Roland
| |
| stephenson.martin@gmail.com 2006-07-21, 7:02 pm |
| Possibly.....
Might be easier just to test this, instead of migrating the code to
1.5.....
Roland de Ruiter wrote:
> On 21-7-2006 12:32, stephenson.martin@gmail.com wrote:
> Is it possible to start App B in a 1.5 JVM? A 1.5 JVM should be able to
> run 1.4 code (i.e. class file version 48.0).
> --
> Regards,
>
> Roland
| |
| Tony Morris 2006-07-23, 8:00 am |
| On Fri, 21 Jul 2006 03:32:51 -0700, stephenson.martin wrote:
> Is it possible to call a Jar file complied with Java 1.5 from a 1.4 JVM
> ?
It is possible, however, not if the class file(s) are compiled with
the -target 1.5 option. If so, you will get the error message that you
refer to. There are third parties (retroweaver?) that allow you to run
-target 1.5 code on earlier version VMs, but I cannot comment based on
(lack of) experience with them.
--
Tony Morris
http://tmorris.net/
| |
| stephenson.martin@gmail.com 2006-07-24, 4:00 am |
| Thanks Tony,
Seeing as the problem is with 3rd party classes, we don't have any
control over how they compile them, and we cannot recompile them
ourselves, as the 3rd party would not support them
Tony Morris wrote:
> On Fri, 21 Jul 2006 03:32:51 -0700, stephenson.martin wrote:
>
>
> It is possible, however, not if the class file(s) are compiled with
> the -target 1.5 option. If so, you will get the error message that you
> refer to. There are third parties (retroweaver?) that allow you to run
> -target 1.5 code on earlier version VMs, but I cannot comment based on
> (lack of) experience with them.
>
> --
> Tony Morris
> http://tmorris.net/
|
|
|
|
|