Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Re-building the class files in JDK 1.6

 
Rajesh Balu
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


I have some class files which are built in JDK 1.5 version.

Now how can i re-build the existing classes in JDK 1.6 if i upgrade the JDK version?



Thanks,
Rajesh.B
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do it the same way you did before, except you use the javac in your 1.6 installation instead of the one in your 1.5 installation.
 
Maneesh Godbole
Saloon Keeper
Posts: 11185
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are thinking about compatibility, you need not worry. Anything compiled in 1.5 would run on 1.5+ (but not the other way round)
 
Rajesh Balu
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it will owrk for sure.

But i want to know, is there any possiblity to build with the upgraded JDK version without using the source code?
 
Maneesh Godbole
Saloon Keeper
Posts: 11185
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
 
Campbell Ritchie
Sheriff
Pie
Posts: 50245
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it will work, but as you have already been told, it is completely unnecessary.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15490
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To be clear, Maneesh's "No" was an answer to this question:
Rajesh Balu wrote:But i want to know, is there any possiblity to build with the upgraded JDK version without using the source code?

You cannot rebuild your project with a new JDK version if you don't have the source code for the project.

(And as others have said, it's not necessary to rebuild your project with the newer JDK version).
 
Rajesh Balu
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Everyone....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic