• Post Reply Bookmark Topic Watch Topic
  • New Topic

question about compatibility of different versions of jar and jdk.  RSS feed

 
Jianfeng Qian
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i use jdk1.5 to compile class,it can't run in a computer which use jdk1.4?
if i use jdk1.4.2 to compile class,it can't run in a computer which use jdk1.4.1?
if i use log4j1.2.jar to compile class,it can't run in a computer which use log4j1.1.jar ?or it only depends the jdk?
 
Marilyn de Queiroz
Sheriff
Posts: 9082
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i use jdk1.5 to compile class,it can't run in a computer which use jdk1.4?

unless you compile with the -target switch.

if i use jdk1.4.2 to compile class,it can't run in a computer which use jdk1.4.1?

I think it should, as long as you don't use any methods that are specific to jdk1.4.2

if i use log4j1.2.jar to compile class,it can't run in a computer which use log4j1.1.jar ?or it only depends the jdk?

I think it should, as long as you don't use any methods that are specific to log4j1.1
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i use jdk1.5 to compile class,it can't run in a computer which use jdk1.4?

Sure it can. You must compile with -target 1.4 (or 1.3), which then implies -source 1.4 (or 1.3).

if i use jdk1.4.2 to compile class,it can't run in a computer which use jdk1.4.1?

Yes it can. Deviation from this implies a violation of licence agreement.

if i use log4j1.2.jar to compile class,it can't run in a computer which use log4j1.1.jar ?or it only depends the jdk?

Dunno - what does the log4j documentation say about reverse compatibility?
 
Jianfeng Qian
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
q1.if i use jdk1.5 to compile class,it can't run in a computer which use jdk1.4?

a1.unless you compile with the -target switch.
q1.1if i didn't use the class only belong to 1.5 ,can it be used in 1.4?

q2.if i use jdk1.4.2 to compile class,it can't run in a computer which use jdk1.4.1?

a2 I think it should, as long as you don't use any methods that are specific to jdk1.4.2

q3.if i use log4j1.2.jar to compile class,it can't run in a computer which use log4j1.1.jar ?or it only depends the jdk?

a3I think it should, as long as you don't use any methods that are specific to log4j1.1(I think you mean log4j1.2 at here)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!