Java Question Compila HAP-HomeKIT Java

gemasoft

Member
Licensed User
Longtime User
Hi Friends

I need to compile the library to develop a interface with HOME KIT.

https://github.com/beowulfe/HAP-Java/

Using the SimpleLibraryCompiler i receive this error:

HAP-Java-master\src\main\java\com\beowulfe\hap\HomekitRoot.java:101: error: illegal start of expression
registry, subscriptions).thenAccept(port -> {
^
1 error

The complete line in this code is:

webHandler.start(new HomekitClientConnectionFactoryImpl(authInfo,
registry, subscriptions) .thenAccept(port -> {
try {
advertiser.advertise(label, authInfo.getMac(), port);
} catch (Exception e) {
throw new RuntimeException(e);
}
});

Some people could help me?

Thanks

Gabriel Giani
 

Roycefer

Well-Known Member
Licensed User
Longtime User
Lambdas were introduced in Java 8. I think SLC uses Java 7.

You can make a wish for SLC to be upgraded to the 21st century in the wish forum. Or you can comment out the offending code, then compile it with SLC. Discard the jar file and just keep the xml. Then build the jar yourself using javac version 8.
 

MarcoRome

Expert
Licensed User
Longtime User
Hi Friends

I need to compile the library to develop a interface with HOME KIT.

https://github.com/beowulfe/HAP-Java/

Using the SimpleLibraryCompiler i receive this error:

HAP-Java-master\src\main\java\com\beowulfe\hap\HomekitRoot.java:101: error: illegal start of expression
registry, subscriptions).thenAccept(port -> {
^
1 error

The complete line in this code is:

webHandler.start(new HomekitClientConnectionFactoryImpl(authInfo,
registry, subscriptions) .thenAccept(port -> {
try {
advertiser.advertise(label, authInfo.getMac(), port);
} catch (Exception e) {
throw new RuntimeException(e);
}
});

Some people could help me?

Thanks

Gabriel Giani
Hi Gemasoft.
The next time this "Question" is better that you move in "Question" and no in Library.
Thank you
 
Top