Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

will java bytecode of java 7 work in other versions of Java

Tags:

java

I just wanted to know if the bytecode generated in one version of java will work on other versions of java

like image 768
Rahul Kumar Avatar asked Sep 17 '26 05:09

Rahul Kumar


1 Answers

In general, bytecode will run without modification on a newer version of Java. It will not run on an older version unless you compile it with special arguments (javac -target) and take extreme care not to use the new library classes.

like image 118
Steven Schlansker Avatar answered Sep 19 '26 19:09

Steven Schlansker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!