046db293cf4d470e461bc83544aecddd94cf7d07
[platform/upstream/iotivity.git] / service / simulator / java / eclipse-plugin / README.txt
1 Eclipse plug-in
2 -----------------
3
4
5 Pre-requisites to launch Eclipse plug-in
6 ------------------------------------------
7
8 1.Eclipse IDE with PDE(Plug-in Development Environment) support.
9
10 2.Execute the "scons SIMULATOR=1" command from the IoTivity home
11 directory in the terminal to build Simulator specific libraries along
12 with the iotivity native libraries.
13
14 3.Simulator application requires liboc.so, liboctbstack.so and
15 liboc_logger.so native libraries and libSimulatorManager.so,
16 libRamlParser.so simulator specific libraries, all of which are
17 generated in ~/iotivity/out/linux/<arch>/release directory.
18
19
20 Setting up and launching the Eclipse plug-in projects
21 --------------------------------------------------------
22
23 1. Import the below projects into Eclipse IDE using File -> Import ->
24 Select 'Existing projects into Workspace' under General category -> click
25 next -> Browse to the location as given below -> Click Finish.
26
27 i)   Service Provider Plugin:
28 ~/iotivity/service/simulator/java/eclipse-plugin/ServiceProviderPlugin
29
30 ii)  Client Controller Plugin:
31 ~/iotivity/service/simulator/java/eclipse-plugin/ClientControllerPlugin
32
33 iii) Simulator Java SDK: ~/iotivity/service/simulator/java/sdk
34
35
36 2. Right click the Simulator Java SDK project -> Export -> select
37 'JAR file' option under Java -> Next -> Select the export destination as
38 ClientControllerPlugin\libs\Simulator.jar and ServiceProviderPlugin\libs\Simulator.jar -> Finish.
39
40
41 3. Copy the libraries libSimulatorManager.so, libRamlParser.so, liboc.so,
42 liboctbstack.so, and liboc_logger.so generated previously in
43 ~/iotivity/out/linux/<arch>/release directory into the libs folder of both the plug-in projects.
44
45
46 4. Set the LD_LIBRARY_PATH environment variable. Right click any plug-in project -> Properties ->
47 Run/Debug Settings. To configure the LD_LIBRARY_PATH, there needs to be a launch configuration.
48 We may choose to use the existing launch configuration or create a new launch configuration.
49 If no launch configurations exist, then a new one has to be created.
50 To create a new launch configuration, select 'New' from Run/Debug settings ->
51 select 'Eclipse Application' as the configuration type -> OK. It opens a new window for editing
52 the launch configuration -> Change the launch configuration name(optional) -> Apply -> OK to close
53 the Edit Configuration window.
54
55 From Run/Debug settings, Choose a launch configuration and press Edit -> select 'Environment' tab
56 -> Click on 'Select' -> check LD_LIBRARY_PATH option -> OK. Edit the LD_LIBRARY_PATH and add the
57 complete path upto the libs folder of the plug-in project
58 ( ~/iotivity/service/simulator/java/eclipse-plugin/ClientControllerPlugin/libs)
59 -> Apply -> OK. Then Apply -> OK to close the properties window.
60
61
62 5. Right click the project -> Run as Eclipse Application -> If it prompts for a configuration,
63 then select the one which was configured in the LD_LIBRARY_PATH in the previous step.
64
65
66 Note: To switch the iotivity stack for conformance, need to build the latest iotivity code and
67 replace liboc.so, liboctbstack.so, and liboc_logger.so native libraries in libs folder of
68 respective plug-in applications.