Mixing Java 1.4 and 1.6 bytecode in a class hierarchy

后端 未结 5 2081
被撕碎了的回忆
被撕碎了的回忆 2021-01-07 11:27

The question first, the story will follow:

Is it safe to mix different bytecode version in a class hierarchy? What are the risks?

For a case, Class C extends

5条回答
  •  时光取名叫无心
    2021-01-07 12:22

    I am maintaining an environment with mix of 1.4 (old library jars) and 1.5 (my fixes and stuff) classes on Tomcat using Sun JVM 1.5 and it runs fine.

    However, for RMI you may be in trouble if client and server has different class version because the server might check the class version (I ran into this problem).

    The best way to find out is to do a proof of concept type of project on small scale.

    A friendly reminder though, you are digging a pretty big hole for yourself here :-)

提交回复
热议问题