• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swapping a .class file out for another compiled from command line...  RSS feed

 
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay. I've been wrestling this decompiled code to get this application to compile and run locally but the more errors I fix the more I uncover. Today it dawned on me I may or may not need to do this...

The particular piece I have to update seems insular and for the sake of this question I'll assume it is and insular meaning that while this piece of code is contained within the application the aspects it deals with are not immediately effecting other pieces save for the database.

The application is written for WebObjects and an older version at that not utilizing the current Project Wonder frameworks. In any case I've attempted to decompile the application and resulted in a mess that I mentioned above.

Would it be possible to compile from command line using javac to get the resulting .class using only the java file I need to make my changes?

Another way to think of this would be to say if you have 10 dependent files and you need to replace one, if it is compiled separately and then the resulting .class file replaces the one with the original 10 would the application still work?


 
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is: Maybe

It depends on what public/protected code you change and if you're compiling with the same version of the JDK.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!