• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

A General question - Pls help !!

 
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,
I have a certain question which has been haunting me for quite some time.
We all are aware that Java comes up with a new version every now and then.
And in each new version, new API's are added, Code is optimized for performance & certain existing Bugs are fixed. Thus in general it is better to use a newer ( and probably more stable) version of Java than the Old one.
I have a couple of questions on this:
1. If i develop some code (say a servlet) using a new java version and later deploy the class files to a server ( running Tomcat or someother) which has an older version of Java installed (assuming that there are no new APIs used in my code). Which version of java will finally be used for my code execution? Obviously it should be the version installed on the server. In this case wouldnt my java servlet code still be performing bad since it is using the Old java version to execute though the class files are generated using the New java version.
2. If i develop some code (say a servlet) using an old java version and later deploy the class files to a server ( running Tomcat or someother) which has a new version of Java installed. Which version of java will finally be used for my code execution?
Please give these questions some careful thought and let me know the answers.
Thanks,
Sajee Joseph
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Yes.
2. The newer, likely faster version.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic