jar - Compile isolated java file -



jar - Compile isolated java file -

i need patch old version of java software. problem reconstructing whole bundle @ old version hard because complex program.

i have corrected source file. there way compile 1 file class file , insert jar, or have have every single source file?

update - how java patch

using elliott frisch's reply able create patch. here command line:

javac -target 1.5 -source 1.5 -cp original.jar;otherlib.jar correctedsource.java

so, sum up. specify target version of java , set source match, include original jar (and libs) classpath, name source code want compile. can take resultant class files , insert them jar, replacing old class files.

to find out target version of class file

it should work if recompile 1 file long as

you utilize same -target <release>, per javac -help generate class files specific vm version , believe need match original version. you replace version of old class in jar file new class file generated in 1. please, backup original jar file first.

java jar compilation compatibility .class-file

Comments

Popular posts from this blog

javascript - I need to update the text of a paragraph by inline edit -

javascript - THREE.js reposition vertices for RingGeometry -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -