No viable input at alternative 'System'

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)

Never mind.
I spelled started wrong… :-/

1 Like

System startet

copy paste typo?
should be System started

Just wanted to tell you this is an English speaking community :wink:

That is like seeing a typo right after you hit Send for an email. We have all been there.

Beware, meta humor ahead

after you hit Send for an email

after you hit Sent

2 Likes

Actually it happens sometimes if I read my copy after it has been sent :frowning: