on 08-29-2017 10:49 AM
Hi,
i have a question to SAP PO 7.5 and JAVA UDF function. I want to use a JAVA feature like:
try (BufferedReader br = new BufferedReader(new FileReader(path))) {
return br.readLine();
}
In PI 7.5 i receiving the following error:
try-with-resources is not supported in -source 1.5 (use -source 7 or higher to enable try-with-resources)
What is to do? I thought SAP PO 7.5 supports already JAVA 1.8.
Regards,
Marcus
I also had similar question on the SWITCH statement comparing a string - that should work under Java 1.7 - but it does not work under SAP PO7.5 that is running Java 1.8. We have just installed SAP PO7.5 in a test machine.
error: strings in switch are not supported in -source 1.5 (use -source 7 or higher to enable strings in switch)
I have checked the JAVA version in a UDF and returns 1.8.0_144 - so the version is higher correct.
String version = System.getProperty("java.version");
return version;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marcus,
I remember a recent thread was raised for the same issue with Switch not working with 1.8 and was throwing the similar error , the recent update was the SAP would update this is in upcoming patch to take the version 1.8 and not 1.5.
Br,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.