Aurélien Pupier created CAMEL-17617:
---------------------------------------
Summary: Specify minimal Java version in Jbang script
Key: CAMEL-17617
URL: https://issues.apache.org/jira/browse/CAMEL-17617
Project: Camel
Issue Type: Improvement
Components: camel-jbang
Affects Versions: 3.15.0
Reporter: Aurélien Pupier
jbang is using the defautl jvm that it finds. it can result to this kind of
error:
{noformat}
jbang -Dcamel.jbang.version=3.15.0 camel@apache/camel run test.yaml
--max-messages=10 --logging-level=info --reload
[jcordes@jcordes ~]$ jbang -Dcamel.jbang.version=3.15.0 camel@apache/camel run
test.yaml --max-messages=10 --logging-level=info --reload
[jbang] Building jar...
/home/jcordes/.jbang/cache/urls/f20491f9ebc0e16d2fca028eb3d4f03aafdf8cd62b8af1a9d1730bfe382d8165/CamelJBang.java:28:
error: cannot access CamelJBangMain
import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
^
bad class file:
/home/jcordes/.m2/repository/org/apache/camel/camel-jbang-core/3.15.0/camel-jbang-core-3.15.0.jar(org/apache/camel/dsl/jbang/core/commands/CamelJBangMain.class)
class file has wrong version 55.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the
classpath.
[jbang] [ERROR] Error during compile
[jbang] Run with --verbose for more details
{noformat}
the minimal java version can be specified
https://www.jbang.dev/documentation/guide/latest/javaversions.html#managing-jdks
--
This message was sent by Atlassian Jira
(v8.20.1#820001)