aspose file tools*
The moose likes Java in General and the fly likes Re-building the class files in JDK 1.6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Re-building the class files in JDK 1.6" Watch "Re-building the class files in JDK 1.6" New topic
Author

Re-building the class files in JDK 1.6

Rajesh Balu
Ranch Hand

Joined: Nov 07, 2011
Posts: 55
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

Joined: Jan 03, 2004
Posts: 6109
    
    6

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

Joined: Jul 26, 2007
Posts: 10372
    
    8

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)


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Rajesh Balu
Ranch Hand

Joined: Nov 07, 2011
Posts: 55
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

Joined: Jul 26, 2007
Posts: 10372
    
    8

No
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38818
    
  23
Yes, it will work, but as you have already been told, it is completely unnecessary.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14149
    
  18

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).


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Rajesh Balu
Ranch Hand

Joined: Nov 07, 2011
Posts: 55
Thanks Everyone....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Re-building the class files in JDK 1.6