Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Compilation : compile with new JVM version and run on older version.

816922Jul 16 2015 — edited Jul 17 2015

Hello,

Here is a small explanation of my problem.

I have an application which was compiled with java 1.5. This application is installed on 2000 pc (blockboxes) installed at customer premisses.

The jar of my application is often updated to add new feature and fixes, but for technical reasons, it is not very easy to update the java version, so I must keep using Java 1.5 on those existing machines.

Few months ago, I got a request for a new requirement for this application. To fulfil this task I have added the usage of Hazelcast in this application.

My problem if the following:

- Hazelacast jar file needs Java 1.6 or above, so I must compile my application with 1.6

- The new functionality using hazelcast will only be activated on demand by settings a new parameter. This means that it will not be used in the 2000 already installed blackboxes.

- All new blackboxes will be installed with Jave 1.6 or above to be able to use the Hazealcast functionality.

 

 

My problem is that I want to have a unique source code and unique version of my application for old blackboses using Java 1.5 and new blackboxes using 1.6 or above.

In the beginning, my idea was to always compile with version 1.5 and make sure that the new functionality would only be activated in blockboses using java 1.6 or above. This option is not working, because when I compile with 1.5, the compiler complains that Hazelcast jar file needs 1.6

The second option would be to compile with 1.6, but then I cannot be sure that my application will still work properly on all blackboxes using 1.5.

I'm would like to know if someone here would know how to solve this kind of problem?

Just let me know if my explanation is not clear

Thanks in advance for your help.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2015
Added on Jul 16 2015
3 comments
2,835 views