VSCode / Java version
Confluence User - 02 May, 2019
Hello,
I loaded jw-community in VSCode (with no changes to the standard java settings). I get errors on certain files, for examples:
@Override
public int compare(JSONObject a, JSONObject b) {
This gives an error:
The method compare(JSONObject, JSONObject) of type new Comparator<JSONObject>(){} must override a superclass method
The reason is that from Java v6, it was allowed to use '@Override' for implementing an interface, whereas prior to this, this is an error.
In all the pom.xml files, Java version is 5:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
So it looks like VSCode is "right" to give this error if it used java v5 to compile. It is surprising that the project uses Java v5 and it would seem like these settings are not being used in the normal build process using mvn, but I don't see how.
Has anyone managed to get jw-community to work with VSCode? What am I missing in the way the java versions are setup in maven?
java;developer_environment