Platform information:
Hardware: Arm based
OS: ‘Armbian’ / Debian buster
Java Runtime Environment: 11.0.9 (i know it is not recommended, but there are some reasons I want to have JRE 11 on my box)
openHAB version: 2.5.10
Issue of the topic: The ‘System’ keyword is not recognized in a rule
Although I have been using openhab for a 1-2 years, now, I never felt the need to write a startup script (persistence was working for me, largely).
Now I do need it ot trigger a few scripts and initialize a HashMap
The following simple code throughs the above error, though:
rule "startup"
when
System startet
then
logInfo("testlog", "log something")
end
I wonder if this is (the first time) because of the higher Java version I am using. What could cause this (It is spelled with a capital ‘S’)?
Is there an import I can make to explicitly include whereever the “System” class is defined?
I tried
import java.lang.System
but it did not work (same error: no viable input at alternative ‘System’)
Also, the HashMap Intitialization in the form of
HashMap<String,String> offVals = new HashMap("Switch" -> "OFF", "Number" -> "0")
is not working either. (The reason why I wanted to try to put the initialization into a startup script, in the first place)