Closed bendoerr closed 10 years ago
@mrstampy btw, if you could give some instructions on compiling using ant and ivy I wouldn't mind submitting a patch that really is Java 5 compatible. I've never been super familiar with ant and couldn't get anything compiled when I tried.
@bendoerr , thanks for the offer. If there is sufficient interest in the codebase I'll be tackling it myself, however if you are keen you can check out the project in Eclipse and install the IvyDE plugin. The build files are specific for publication of artefacts and probably won't work stand-alone.
Issue Although Stampy targets 1.5 in it's build, the 1.7 API is used by Stampy. For example
AbstractStampyMessageGateway
makes use ofjava.lang.invoke.MethodHandles
which is new in Java 7. Though closer inspection it looks like any class which is logging is usingjava.lang.invoke.MethodHandles
to reflect the class object. Thus when attempting to run a Stampy server on a JVM of lesser vintage that 1.7 you experience aNoClassDefFoundError
exception which looks like the following on a 1.6 JVM:Solution 1 Replace "Java 5 compatible" in the documentation with "Java 7 only" and stop targeting 1.5 for no reason.
Solution 2 Replace usages of the 1.7 API with 1.5 compatible equivalents. For example: