Unfortunately the Windows build for Java is broken. At one point in time it was working but to get it working I had to change the build to statically link to most of the libraries. Dynamically linking to C++ libraries is currently not possible on windows. Unfortunately statically linking to the libraries caused multiple copies of the stack to be instantiated when using services. I had to change the linking options back to dynamically linking see https://jira.iotivity.org/browse/IOT-2678
Basically the decision was that Android is the primary target for Java language bindings so I could not break Java on Android even if it worked in Window. To get Java working in windows again someone needs to go through all of the code and add __declspec( dllexport) (using a MACRO that is only used on windows since this is VisualStudio specific) to all of the functions and classes that are needed for Java in windows. I started to do this but was asked if there was any demand for Java on windows. I could not find any demand for Java on windows at the time so I was asked to stop work on https://jira.iotivity.org/browse/IOT-2405. The BUILD_JAVA option is a left over from when it was activity working on the code. It actually used to build but would not run because it could not find the dlls needed to run. Since no-one is working on the code there must have been some changes that broke the build. Since windows should not be trying to use Gradle it should only use scons Just like Linux. So currently Windows+Java does not work If you are interested in taking ownership of IOT-2405 I would be happy to help you get started. George Nash -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Mats Wichmann Sent: Wednesday, May 9, 2018 7:49 AM To: [email protected] Subject: Re: [dev] [iotivity-1.3.0] Windows "Java" Build Fails On 05/09/2018 08:27 AM, Mohammed Wajahat Ali Siddiqui wrote: > Hi Iotivity Team, > > I am developing a client (spring-boot) application using iotivity java > sdk since our production environment is *windows 10* > > I have build Iotivity-1.3.0 on windows using the steps mentioned in > https://wiki.iotivity.org/windows > > When I try to enable *BUILD_JAVA=1 *flag I get below issues, I am > using *VS 2015 Professional with C++ common tools enabled on Windows > 10 machine* > > Kindly guide me if there is any way to build Java and get a similar > *iotivity-windows.jar file* I believe you want to use run.bat to build for Windows these days, not call scons directly - that's the impression I got from the Windows guys when they were being more active. That may or may not solve your problems, but it's worth trying. Please report back - there's certainly plenty of chance that something bit-rotted, since Windows+java is not one of the builds done by the CI system - it builds Linux secured/unsecured with Java, but the windows CI builds all default to java off, so we might not have seen it if something broke. _______________________________________________ iotivity-dev mailing list [email protected] https://lists.iotivity.org/mailman/listinfo/iotivity-dev -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9555): https://lists.iotivity.org/g/iotivity-dev/message/9555 View All Messages In Topic (3): https://lists.iotivity.org/g/iotivity-dev/topic/18970827 Mute This Topic: https://lists.iotivity.org/mt/18970827/21656 New Topic: https://lists.iotivity.org/g/iotivity-dev/post Change Your Subscription: https://lists.iotivity.org/g/iotivity-dev/editsub/21656 Group Home: https://lists.iotivity.org/g/iotivity-dev Contact Group Owner: [email protected] Terms of Service: https://lists.iotivity.org/static/tos Unsubscribe: https://lists.iotivity.org/g/iotivity-dev/unsub -=-=-=-=-=-=-=-=-=-=-=-
