how to use external jar file in blackberry eclipse plugin - blackberry

I have a jar file which contains .cod,.cso and .csl files.I need to use the jar file in my blackberry project.I added the jar file to build path of my main project.It was giving the error "Cannot start project has verification errors". I preverified the jar file and added to the build path and exported the jar file(Right click on project -> Libraries ->Order and Export).When I export the jar file the project is not compiling.Can anyone suggest me to add the external jar file to my project.
regards

Right click on project -> Build Path -> Configure Build Path -> Libraries -> Add external Jar file ->and check the jar file you have added in the Order and Export Tab. And press ok .
Or you can also use a library to add the jar to your project do it like this way.
First make a folder lib in your project.
Right-click your project > Properties
Java Build Path > Libraries > Add JARs… > Choose the JAR files in the “lib” folder
Java Build Path > Order and Export > Check the JAR files. and then ok. may be this will help you

Related

Unable to build fsharp projects using FAKE. Getting "Cannot open assembly'.paket/paket.bootstrapper.exe': No such file or directory." Error

Created a new fsharp project from Visual Studio Code (Version 1.12.2) while trying to build it with FAKE it is showing this error
"Cannot open assembly '.paket/paket.bootstrapper.exe': No such file or directory."
I checked the .paket folder of my project the paket.bootstrapper.exe is missing in there.
I using ionide 2.25.14, ionide-fake 1.2.3 and ionide-Paket 1.6.3.
I tried building the project with msbuild and it is building without any errors.
EDIT
This is how the build target is defined in the build.fsx.
Target "Build" (fun _ ->
// compile all projects below src/app/
MSBuildDebug buildDir "Build"
appReferences |> Log "AppBuild-Output: "
)
Downloading paket.bootstrapper.exe from github and adding in to the .packet folder resolved the issue.
The simplest, and maybe the best thing to do is to download paket.bootstrapper.exe if it didn't get generated along with your project.
Your build script is trying to run paket.bootstrapper.exe, but can't find it, likely because your project was generated without one. If you already have a folder named .paket, then your project was likely generated with a paket.exe, instead.
The only thing paket.bootstrapper.exe does is download the latest version of paket.exe. Your build script is just trying to automate keeping your package manager up to date.

Header files are not found while archiving the build in xcode

I have a sub project that has been developed as dynamic lib and included that sub project into my main project and been set as target dependency.
When I run my main project, .a file for my sub project has been created successfully and the corresponding header files are created in the build directory such as (build/release-iphoneos/include). I have mentioned path using MACRO
In my main project, I mentioned header search path as the same that i mentioned above using MACRO.
But when I try to archive the build it throws the run time error file not found in the import statement
#import <subproject/myfile.h>
But it is getting build and run successfully even though it displays the file not found error in the xcode editor in compile time.
My question is
Is this because of the build directory will be empty while archieving?
I solved the problem as below
1. The header files were private so changed them as public so they are exposed to main project. (To build & run successfully)
2. I copied the header files and created a directory and add them into my main project and set the header search path to point that directory (To archive successfully)

Extract jar from aar for cordova plugin, Class not found error at runtime

I have an "aar" file that was generated using gradle with
apply plugin: 'com.android.library'
Now I want to use this aar library to create a cordova plugin. I unzip the aar file, get a "classes.jar" and put the jar into cordova's "libs" directory. My cordova project compiles without any problem, I can import and use classes in the jar file. But it crushed at run time with the following error
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/example/pkg/R$raw;
Package "com.example.pkg" is in my "classes.jar", but there is no class call "R$raw". What did I miss?
AAR files bundle not only source but also the libraries self contained Android resources. Take a look at the contents of an AAR bundle.
It appears the original AAR file you had contained some raw resources which are not included in the jar. You cannot package Android resources in a .jar file so your application is crashing when it needs to access the ID's generated for resources.
You can check this by opening up the original AAR file (it is simply a zip archive). Take a look under the res folder for any resources that are needed by the library.
Yes, extracting classes.jar is not going to work and it will throw runtimeexceptions...
What i did to solve the problem is:
After cordova project creation, adding platform, adding plugin is done.
Lets say the aar file are copied in libs folder. ( assume file name is cards.aar )
then in app build.gradle specify following and click sync project with Gradle files.
repositories { flatDir { dirs 'libs' } }
dependencies { compile(name:'cards', ext:'aar') }
It works for me!! but one drawback of this solution is .. you need to open the project from platform folder on Android Studio and add the above lines to your build.gradle

grails does not include jar files in lib folder to plugins during runtime

I am using Jasper Reports Plugin which is working fine, But when I try to export, i get Error.
URI
/cipg-backoffice/jasper/index
Class
net.sf.jasperreports.engine.util.JRFontNotFoundException
Message
Font 'Times New Roman' is not available to the JVM. See the Javadoc for more details.....
I then included the "DynamicJasper-core-fonts-1.0.jar" file into project's lib folder but the font is still not found.When I run 'grails list-plugins' I don't see the jar file listed.
Please tell how can I add fonts to the grails Project?
Try this
Run command : grails clean
Add you jar file in lib folder of your Grails App
Refresh dependencies
Run and test your application

Unable To Find Imported Jar File For Json ME In Blackberry JDE

I imported the Json ME jar file
downloaded from "github"
into a blackberry project in which i will need to interpret
JSON responses from a web service.
The issue is that the project fails to compile
when it encounters this line:
import org.json.JSONObject;
And gives the error
error: package org.json does not exist.
The name of the jar file is "json-1.0.jar"
How can i resolve this?.
As you have imported additional jar file, then you should get additional cod file when compilation finished. Seems that you have installed only application cod file without library cod file.
Look at the folder where your application cod file located. There must be additional cod file, related to org.json library. Sign this library and install it along with the application cod file.
If there is no library cod file exists in the compiled app folder, check your project settings. Seems that jar file has been added incorrectly or it is not accesible.
Create folder called lib within your resource folder, copy and put the jar file in lib folder right click the jar Select Build Path-> Add to build path, then import the jar if you want to use in ur project It wont through module not found exception.

Resources