Closed Hixon10 closed 2 years ago
If you build the project and use the artifact do you have the same issue ? I thought I used the latest commit when I pushed.
@cyriltovena yes, if I build the library locally, everything works fine with it with JDK 8
.
hi, I downloaded the jar package from maven central,https://mvnrepository.com/artifact/com.grafana/jpprof/0.1.0
and verify the class file version
jar -xf jpprof-0.1.0.jar
file jpprof/CPUProfiler.class
and the result output
jpprof/CPUProfiler.class: compiled Java class data, version 55.0 (Java SE 11)
the package in maven built for JDK11+
Yes I built it using my machine (Java 11) does this means I need to downgrade to 8 ? happy to deploy a 0.1.1 today if needed let me know.
EDIT: We're working on it.
sorry for delay..
Basically, there a few options here, what you can do:
jdk11
, like https://www.baeldung.com/java-source-target-optionsBy default, I would suggest to go to option 1. However, something it is not possible to have maven credentials in github, in this case you can use something else.
P.S. If you are not aware, check https://sdkman.io/ . It is a great tool, which allows you to have multiply JDK versions, and switch them in 1 second, like sdk use java 17.0.4.1-librca
Thanks @Hixon10! So we went for option 1, as you say, in the end. The library is now built and published via GH actions. Latest version (0.1.4) should work fine with jdk8, so closing the ticket now.
Hello,
It seems, that you pushed the library to maven repo with
JDK 11
target.When I try to run an example with
JDK 8
, I got the following error:I think, you pushed the library to maven before this change https://github.com/grafana/JPProf/commit/290f9a5f67c55711a126714119103006dfd832d2#diff-655a69127303f6948c0b150902436756156ec7f82640e994c1f552cbdec5bbceL11-L12