System: Ubuntu 16.04 LTS
Environment: Vscode+java extension Pack opens a Gradle Java project; In addition, a terminal is used to launch the Groovysh
Error:
Groovysh Error Java.util.prefs.FileSystemPreferences Syncworld
Warning: couldn ' t flush user prefs:java.util.prefs.BackingStoreException:Couldn ' t get file lock.
References [1]:https://stackoverflow.com/questions/2027566/java-util-prefs-throwing-backingstoreexception-why
Solve:
According to [1] in the "If" JVMs attempt to lock the file at the same and then that's what you'll see. "
Open Task Manager and see two Java processes, one is the JVM (JVM1) started by the Eclipse JDT run by vscode Java extension, and the other is the JVM that the Groovysh started (JVM2)
So, because the JVM1 process has acquired lock, causing jvm2 to fail to get lock and error
Groovysh no more error after closing Vscode Java project
Fix warning couldn ' t flush user prefs:java.util.prefs.BackingStoreException:Couldn ' t get file lock.