enjoyy2 opened a new issue, #5172:
URL: https://github.com/apache/hop/issues/5172
### Apache Hop version?
2.8.0
### Java version?
17.0.1
### Operating system
Windows
### What happened?
user defined java class.
added the aws sdk v2 s3 dependencies jars into the
C:\Work\apache-hop-client-2.8.0\hop\plugins\transforms\janino\lib . Created a
custom java class, to import this packages and did some custom java code for s3
buckets.
when writing
// Build the S3 client with dynamic credentials
S3Client s3 = S3Client.builder()
.region(Region.US_EAST_1) // Change to your region
.credentialsProvider(StaticCredentialsProvider.create(sessionCredentials))
.build();
janino compiler throws:
CompileException: Line 55, Column 40: Invocation of static interface methods
only available for target version 8+
Root cause: CompileException: Line 55, Column 40: Invocation of static
interface methods only available for target version 8+
i tried both with janino-3.1.11 and janino-3.1.12 .jar files
when printing out the java version from the same user defined java class
(System.getProperty("java.version")), i get 17.0.1. so the java used is the
correct one, but somehow the compiler does not see the correct java version.
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: C:\Users\dmusat\Downloads\maven-mvnd-1.0.2-windows-amd64\mvn
Java version: 17.0.1, vendor: Oracle Corporation, runtime:
C:\Work\openjdk-17.0.1_windows-x64_bin\jdk-17.0.1
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
tested out with both 2.8.0 and 2.12.0
dependencies for aws sdk are built with maven with correct java compiler
version.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>17</source>
<target>17</target>
<release>17</release>
</configuration>
</plugin>
manifest:
Manifest-Version: 1.0
Created-By: Maven JAR Plugin 3.4.1
Build-Jdk-Spec: 17
if i run the same code in an eclipse ide, it works as expected.

### Issue Priority
Priority: 3
### Issue Component
Component: Transforms
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]