Properly adding a Facebook jar in Eclipse for Blackberry - facebook

How to add Facebook .jar file properly in eclipse for blackberry
"ERRO :Module 'FacebookBlackBerrySDK-v0.8.25' not found."

Below is the step to add the jar properly to your eclipse project. Its seems that you are not adding the jar properly in your eclipse environment. So check the step please.
Create a folder called “lib” (or whatever you want to call it) under your project, and copy the downloaded JAR files into that folder.
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

Related

add jar files to classpath to eclipse

in this link http://mina.apache.org/mina-project/userguide/ch1-getting-started/first-steps.html says "Put the following jars in the classpath"
what does that mean? how can I do that in eclipse? without eclipse?
Here's how you could do it in eclipse:
Right click on your project
Select Build path -> Configure Build Path
Select libraries tab
Click on add external jar and select the jar file by browsing your file system and click on open.
click on ok on your configure build path screen.
Without eclipse, when you are about to compile, you will need to use:
javac -classpath <all jar files class path seperated by ; in windows or : on linux> java source file
And similar option while running the class via java command.

Import JGraphT distribution to Eclipse

How can I install the JGraphT distribution offered in this link:
http://sourceforge.net/projects/jgrapht/files/
I do not understand the tree structure of files and its relation with the structure of a project in Eclipse. I would like to run the java code listed in:
http://jgrapht.org/visualizations.html
but I am not able to import the proyect to Eclipse. For example, that .java file is under
jgrapht-0.9.0\source\jgrapht-demo\src\main\java\org\jgrapht\demo
Follow these steps:
1) download the .zip file on that page
2) create a new java project in eclipse
3) unzip .zip file
4) right click on the 'src' folder and select 'import...' from file system
5) select 'src->org' under the unzip files
6) you will need 'jgraph' to run any of the examples
You can import the jars as internal/external jars into your project.
For example, right click on the project -> Build Path -> Configure Build Path
Then go to libraries and 'Add Jars' or 'Add External Jars' (if your jars are located outside the project space), you should now be able to import classes associated with JGraphT.
This works for me: Install JGraphT in Eclipse. I just downloaded jgrapht-1.0.1.zip and I use Eclipse Oxygen (4.7.1). The link above describes the steps in detail. Basically, do the following:
Download jgrapht-x.y.z.zip and extract it.
In Eclipse, create a new Java project.
Add the jars of the extracted jgrapht libraries to your Eclipse user libraries.
Add the just-added user libraries to your project's Build Path as libraries.
Now your project can make use of jgrapht.

Eclipse jar file is not exported with project

I have a simple project that I need to be very easily imported into eclipse and started. When I export my project and import it again it comes with an error saying it is missing a required jar file. This jar file is added to the build path, but does not carry over when the project is exported. Why is this? I have been searching all day for an answer on Google and none have helped.
Would I just have to send the jar file along with the project and have the users manually add it?
Things I have tried:
Going into build path order and export and clicking the jar file.
using a clean workspace for the import / restarting eclipse.
For anyone with a future problem like this one. I was putting the jar in the lib folder and also adding it to my build path, but the jar would not export over. When I added the jar to the WEB-INF / lib folder it successfully carried over with the export.
You may want to try this:
Right click on the imported project select Build Path -> Configure Build Path -> Java build Path -> Libraries Tab and check if the jar file which eclipse says missing is present in the Libraries tab.
If it is present then select it and click Edit, a "File dialog" will pop up, find the desired jar which is in your computer's directory. and click Ok then wait for eclipse to build
the workspace. If it is not present then add it through Add JARs... or Add External JARs...
Export it as an Archive file of the project rather than a jar. Then it's just a matter of someone else importing it as an Existing Project. Exporting it as a jar is only something you do when you want to deploy the jar and run it.

Eclipse - Adding a Jar File to a existing Project

I am running Eclipse 3.7. I am currently working on a Plug-In Project for a Application called Team Center. I was recently made aware of a jar file of SWT Widgets named Opal. So I am trying to figure out how to add the Jar File to my existing project. I have tried many different ways to do this. Nothing has worked so far.
Here are some of the things I have tried.
Made a lib directory in my current project copied the jar file
Build Path Configure -> Libraries -> Added the Jar
Runtime tab -> Add -> selected the lib/jar file -> update build path
Saved
My project still compiles, but at runtime it fails and I get can't load proxied handler errors
I have tried to create a plugin project just for the Jar File, then add the opal plugin to required Plug-ins. If the Opal project is closed, that reflects with the Opal plugin in my project.
Here is the way my current project works. It is a plug-in project and when I finish or change code.
Build Project
Export
Deployable plug-ins and fragments
Select my project plug-in
Finish
Then I copy the project.jar to the TeamCenter Application plug-ins directory
I am assuming that somehow I have to include the opal.jar in the project.jar. But right now I am at a total lost on how to do it.
In Eclipse Plugin Project click on your MANIFEST.MF file and go to the runtime tab. There should be a section "Classpath". Try to add your lib there.
UPDATE
I've tried it and it has worked for me. I've executed following steps:
create new Plug-In project
create new lib folder in it
copy opal lib to the folder
open the MANIFEST.MF, go to the Runtime tab and add the lib to the Classpath section
check whether the lib folder is recognized of the build process (Build tab and lib folder should be checked)
Create new Run Configuration (Run -> Run Configuration... -> double click on OSGi Framework)
on Bundles tab check the new made project (Workspace section) and uncheck Target Platform for now
mark the new project and click on the button Add Required Bundles on the right side
now some needed bundles to run your project should be checked in the Target Platform section
click Apply, then Run and your OSGi env will be started
check build.properties in your plugin. check lib folder should be included there.
open plugin.xml or MANIFEST.MF in editor, you see build Tab. In the binary build, make sure your lib folder is checked.

How to create a Jar file in Netbeans

Well I have my source code that i have done using the IDE netbeans. Now I wanted to move this java application to a web application. For that I need to create a jar file from my source code, so that I could invoke it in ma jsp file.
I have not been able to find any option in netbeans or any other way to create a .jar file of this source code.
Could someone tell me how to do that.
Thanks
Create a Java archive (.jar) file using NetBeans as follows:
Right-click on the Project name
Select Properties
Click Packaging
Check Build JAR after Compiling
Check Compress JAR File
Click OK to accept changes
Right-click on a Project name
Select Build or Clean and Build
Clean and Build will first delete build artifacts (such as .class files), whereas Build will retain any existing .class files, creating new versions necessary. To elucidate, imagine a project with two classes, A and B.
When built the first time, the IDE creates A.class and B.class. Now you delete B.java but don't clear out B.class. Executing Build should leave B.class in the build directory, and bundle it into the JAR. Selecting Clean and Build will delete B.class. Since B.java was deleted, no longer will B.class be bundled.
The JAR file is built. To view it inside NetBeans:
Click the Files tab
Expand Project name >> dist
Ensure files aren't being excluded when building the JAR file.
Please do right click on the project and go to properties.
Then go to Build and Packaging.
You can see the JAR file location that is produced by defualt setting of netbean in the dist directory.
I also tried to make an executable jar file that I could run with the following command:
java -jar <jarfile>
After some searching I found the following link:
Packaging and Deploying Desktop Java Applications
I set the project's main class:
Right-click the project's node and choose Properties
Select the Run panel and enter the main class in the Main Class field
Click OK to close the Project Properties dialog box
Clean and build project
Then in the fodler dist the newly created jar should be executable with the command I mentioned above.
Now (2020) NetBeans 11 does it automatically with the "Build" command (right click on the project's name and choose "Build")