-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
- Create a simple Eclipse 3.x RCP application with the wizard of new plug-in project. Name it as app plugin.
- Run app plugin and make sure the simple view defined in the plug-in appear.
- Create a plug-in project with the wizard of "Plug-in from existing JAR archives", choose JavaSerial-0.7.jar as external JAR. Name this plug-in as JavaSerial-3rd-lib.
- Turn to app plugin, open plugin.xml file and add JavaSerial-3rd-lib plugin as required plug-ins.
- Open the View.java file in app plugin, replace the return statement of createInitialDataModel() method with: return Arrays.asList(SerialPort.getSerialPorts());
- In the Run configurations -> plug-ins tab, check JavaSerial-3rd-lib plug-in, run it.
- Errors occured:
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: com/rm5248/serial/SerialPort
Caused by: java.lang.NoClassDefFoundError: com/rm5248/serial/SerialPort
at javaserialportosgitest.View.createInitialDataModel(View.java:70)
at javaserialportosgitest.View.createPartControl(View.java:57)
- create another plug-in project with the wizard of "Plug-in from existing JAR archives", choose jssc-2.8.0.jar (https://github.com/scream3r/java-simple-serial-connector) as external JAR. Name this plug-in as jssc-3rd-lib.
- Add jssc-3rd-lib plugin to the required plugins of app plugin project.
- Open the View.java file in app plugin, replace the return statement of createInitialDataModel() method with: return Arrays.asList(SerialPortList.getPortNames());
- In the Run configurations -> plug-ins tab, checkjssc-3rd-lib plug-in, run it. The available serial ports list in the view and no error occured.
Metadata
Metadata
Assignees
Labels
No labels