Hacker News new | past | comments | ask | show | jobs | submit login

Your jar file only works if what it expects to find it is still there, it will crash and burn otherwise.

Same applies to other examples.




I'm not sure to understand.

You mean if your jar depends on other stuff?


Of course.

The way the bytecode is executed, the standard library, possible changes in GC and JIT implementation, other 3rd party libraries.

For example, if the jar code has a call to Thread.stop() and is loaded in Java 11 or later, when it comes to actually call that method you will get a java.lang.NoSuchMethodError exception.


Got it, thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: