openweave / openweave-core

openWeave is a home area network application protocol stack designed to enable asynchronous, symmetric, device-to-device, device-to-mobile and device-to-cloud communications for control path and data path messaging.
Apache License 2.0
233 stars 106 forks source link

[java] Version requirement #535

Open turon opened 4 years ago

turon commented 4 years ago

When building openweave-core using the Project Linking instructions the following error appears if jdk 12 is used:

Making all in device-manager/java
  JAVAC   
warning: [options] bootstrap class path not set in conjunction with -source 6
error: Source option 6 is no longer supported. Use 7 or later.
error: Target option 6 is no longer supported. Use 7 or later.
make[3]: *** [WeaveDeviceManager.jar.classes.stamp] Error 2
make[2]: *** [all-recursive] Error 1

It seems Java 11 is required, though that is not made clear on the build instruction page.

turon commented 4 years ago

Another potential work-around for this is:

diff --git a/src/device-manager/java/Makefile.am b/src/device-manager/java/Makefile.am
index f3f1be5b..618564de 100644
--- a/src/device-manager/java/Makefile.am
+++ b/src/device-manager/java/Makefile.am
@@ -112,7 +112,7 @@ WeaveDeviceManager_jar_JAVA_SRCS                   =        \
     nl/Weave/DataManagement/ResourceIdentifier.java         \
     $(NULL)

-WeaveDeviceManager_jar_JFLAGS                      = -source 6 -target 6
+WeaveDeviceManager_jar_JFLAGS                      = -source 7 -target 1.7

 WeaveDeviceManager_jar_JAVA_MAIN_CLASS             = nl.Weave.DeviceManager.TestMain