• Post Reply Bookmark Topic Watch Topic
  • New Topic

JDK  RSS feed

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

There is a client which is developed using JDK1.5 and server components devloped using JDK1.4/1.3.

Can there be a issue if i use these clint and server together?.

Thanks in advance
 
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no easy "yes" or "no" answer to that question. It depends on how the client and server communicate. If they communicate by exchanging serialized Java objects then yes, there might be a problem. So, find out how client and server communicate and check if there might be some problems there.
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jesper Young:
There is no easy "yes" or "no" answer to that question. It depends on how the client and server communicate. If they communicate by exchanging serialized Java objects then yes, there might be a problem. So, find out how client and server communicate and check if there might be some problems there.


How can serialization be a problem in this case ?
 
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some serializable classes in the library have a warning that the serialized version may not be compatible with future releases of the JRE. Of course I can't find any right now.
 
Prashanth Bhanu
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well,In my case client is developed using JDK1.5 and server components with JDK1.4.I'm using servlet which accepts the request from the client and responds back .
Thanks in advance
 
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using a servlet implies HTTP communication, for which JDK version differences do not matter, unless the client serialize� objects over HTTP. So, the question becomes - does it?
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Prashanth Bhanu:
Well,In my case client is developed using JDK1.5 and server components with JDK1.4.I'm using servlet which accepts the request from the client and responds back .
Thanks in advance


It depends on the application level protocol version.Nothing to do with the JDK version which has been used to compile the application code.

If the server and the client both uses HTTP 1.0 then its fine , but if there is a mismatch in the HTTP Protocol version then there might be problem.

About serialization :There might be a problem , if the class changes in between serialization and deserialization , then the deserialization would fail.
 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most if not all the Swing components have that warning on them, about future versions not being compatible, as I recall.

Clients talking to servers involve protocols, not shared memory. The question is answerable like this: Does the protocol that you're using depend in any way on the version of Java you're using?

Serialisation does, and some other forms might too, such as XMLEncoder or xstream. xstream handles version differences pretty well though, I believe. Even so, I wouldn't trust it. Write tests. Run them.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!