This page last changed on Jun 04, 2014 by or-sbus.

Hi everyone,
I am new and i am working on implementation new protocol.
My protocol need to find it's local broadcast IP address
Eg. Computer IP is -> broadcast IP:
But when i try this below code:

InetAddress localHost = Inet4Address.getLocalHost();
NetworkInterface networkInterface = NetworkInterface.getByInetAddress(localHost);

int iNICSize = networkInterface.getInterfaceAddresses().size();
for (int j = 0; j < iNICSize; j++) {
 InterfaceAddress ifa = networkInterface.getInterfaceAddresses().get(j);
 if (ifa.getAddress() instanceof Inet6Address) {"Skipped IPv6 address (not supported) " + ifa.getAddress());
 broadcastIP = ifa.getBroadcast();"Found broadcast: " + broadcastIP);

It works well in JDK 7, but JDK 6 (Open remote uses) give an incorrect broadcast IP.
JDK 6 give for this ip. Please help to find other ways.

The OpenRemote Pro as of version 1.0.13 does work with Java 7. Don't know when this will trickle into the free version.

Posted by pz1 at Jun 04, 2014 09:58

Can I use Java7 with Openremote free version, what errors will occurs?

Posted by or-sbus at Jun 05, 2014 06:01

OP works with JDK7. Just the rule engine from the current download version does not work with JDK7.
If you don't want to use rules for now, you can take JDK7.
There is a patch on the forums which enables drools for JDK7 if you need rules.

Posted by mredeker at Jun 05, 2014 09:26

currently, i don't use rules.

Posted by or-sbus at Jun 05, 2014 09:56
Document generated by Confluence on Jun 05, 2016 09:36