Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » class file not getting exported while exporting bundle with external jars(class file not getting exported while exporting bundle with external jars)
icon9.gif  class file not getting exported while exporting bundle with external jars [message #1728482] Mon, 04 April 2016 18:44 Go to next message
Sindhu Priya is currently offline Sindhu PriyaFriend
Messages: 3
Registered: April 2016
Junior Member
We have imported pi4j in a kura plugin development project and pi4j jar files are kept in a separate lib folder in the same project and the same is added in the classpath under runtime tab.Now on exporting the jar file don't have the .class files . what can be the suggested solution to this issue
Re: class file not getting exported while exporting bundle with external jars [message #1728484 is a reply to message #1728482] Mon, 04 April 2016 19:19 Go to previous messageGo to next message
Benjamin Cabé is currently offline Benjamin CabéFriend
Messages: 201
Registered: July 2009
Location: Toulouse, France
Senior Member

You should make sure that pi4.jar is also included in your build.properties in order to be part of the bundle's JAR file when it is exported.

Re: class file not getting exported while exporting bundle with external jars [message #1728864 is a reply to message #1728484] Fri, 08 April 2016 06:16 Go to previous messageGo to next message
Said Ucar is currently offline Said UcarFriend
Messages: 56
Registered: June 2015
Member
Hello Sindhu,

When you import an external .jar to the project, let's say "libs" folder in project class-path, you have to include these *.jar files to the both "build.properties" and "MANIFEST.MF" file. I follow these steps, when I want to import external *.jar files to my Kura project,

1- Create a folder, "libs" to project classpath.
2- Place *.jar files to "libs" folder
3- Open MANIFEST.MF file and switch the "runtime" tabs
4- In this tab, there is a section called "Classpath", you can click 'Add..' button and simply select the jar files under "libs" folder you just created step 1, and finally save MANIFEST.MF file.

After that, when you export your bundle, the external jar files also exported in bundle. If, still you have an error like

"The type javax.microedition.io.Connection cannot be resolved. It is indirectly referenced from required .class files"

I suggest you to complete Example projects [1], In Serial-Example [2], there is a solution for this problem,

Quote:
Under Options, select the checkbox Use class files compiled in the workspace in addition to the checkboxes already enabled, and click Finish.



Thanks,
Said.

[1] = http://eclipse.github.io/kura/
[2] = http://eclipse.github.io/kura/doc/serial-example.html
Re: class file not getting exported while exporting bundle with external jars [message #1729027 is a reply to message #1728864] Sat, 09 April 2016 17:42 Go to previous message
Sindhu Priya is currently offline Sindhu PriyaFriend
Messages: 3
Registered: April 2016
Junior Member
Hi said,
This problem resolved after adding the jar files properly. The mistake which i did was i removed the . file which came in the class path after adding the external jars.

Thanks,
Sindhu
Previous Topic:Is it possible to enable HTTPS for the web ui?
Next Topic:Kura under JamVM
Goto Forum:
  


Current Time: Thu Apr 18 22:37:04 GMT 2024

Powered by FUDForum. Page generated in 0.02121 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top