I have a Java Project & Map/Reducer Project in eclipse Workspace, I want to use a class file of Map/Reducer Project from java project to perform computation, I am new to Apache Hadoop & Map/Reducer thing, please Suggest.
If a hadoop project is just like a Java project (and it probably is); right click on the other project in the package explorer, select properties, and then choose java build path. After that, click on the projects tab and select the add button. A dialog box should come up, and you should be able to select your hadoop project.
Both projects must be in the workspace, of course.
Related
I have generated a demo popup menu plugin project automatically by Eclipse. Here is the project structure,
I have set a objectContribution to the point org.eclipse.ui.popupMenus,
When I right click the project and choose Run as -> Eclipse Application, another Eclipse process run and I can see the configured menu works well,
How can I install this plugin for my original Eclipse process?
What I have tried
I did some research and tried to Export -> Deployable plug-ins and fragments, then put it into the %EclipseFolder%/plugins, but it didn't work. I also have tried to Export -> Deployable features and installed it by Help->Install New Software, also failed to see the menu when right click the project.
Will you please help? BTW, I would like to know how to contribute a menu which will display when I right click on a package in a project? Thanks so much.
Use the Deployable plug-ins and fragments wizard and select Intall into Host on the Destination page.
This will create a p2 repository at the denoted location and install the selected plug-ins from there into the host instance, i.e. the Eclipse IDE that you are currently working with. I think a restart may be required.
I created an eclipse product based on a plugin.
from the product pane:
left side, pressing "Launch an eclipse application" invokes a new eclipse platform that is only able to create an empty project or a project based on my plugin (no java project, etc...). OK that is what I want.
right side: I've exported my product in a fresh empty directory. When I run my application from the command-line, I'm asked to open a new workspace and then, I only get an empty window .
what's the proper way to export my application ?
Thxs
The reason your export doesn't work is that you select org.eclipse.ui.ide.workbench.
When you generated your EMF code as RCP. (This is an option in the .genmodel under Editor->Rich Client Plarform) you should get an application for the RCP. When you select this application in your .product, all will be fine.
Check your product configuration: go to the "dependencies" tab and press the "Add Required" button.
If you would like to export your plugin (product) as a standalone application(just create a build) I would recommend you to take a look at the Tycho (http://eclipse.org/tycho/). Tycho tutorial: http://www.vogella.com/articles/EclipseTycho/article.html.
I have a working java project (in ubuntu 12.04LTS, configured and compiled using ant). Is there a way I can configure and run it in Eclipse? Every time I try to load it in eclipse it gives a bunch of errors because of packages not being where its expecting I guess. Also, it will help if you could tell whats build path. I'm using Eclipse Java EE IDE Kepler Release.
My project structure looks like this:
project
build.xml
build.properties
build.common
projFolder - proj code, 3rd party lib/bin/src,
commons - proj code, ui code, 3rd party lib and binaries
dist - has a bunch of scripts and jars and may be some binaries
And how I got my project in Eclipse (this is probably not the most efficient way to have the project running in Eclipse, not sure)
I did new->java project then enter project name, unchecked 'use default location' and provided the location of my project so it imported my project in eclipse. then in my classes i have all the errors (red cross at the display) and it says imports cannot be resolved, objects can't be resolved to a type and such.
import com.psid.codedata.projects.TProjectDRD;
import com.psid.codedata.projects.TProjectsDRD;
error on above imports:
The import cannot be resolved
It probably needs you to add all your source folders to the build path:
Right-click on your project and select Properties,
Along the left-hand side click "Java Build Path",
Click the "Source" tab if it isn't already selected,
Click the "Add Folder..." button on the right-hand side,
Select whatever your source folders are in projFolder and commons,
Click the "Libraries" tab,
Click the "Add JARs..." button on the right-hand side,
Select whatever your libraries are in projFolder, commons and dist,
Click the "OK" button.
Note that "New -> Java project" is for creating a brand new, empty project. Since you want to create an Eclipse project from an existing project with an Ant script, you should select the appropriate selection under the "Ant" subsection in the New Project dialog. See this answer to a related SO question for details.
add this line to nbproject/project.properties:
j2ee.server.home=http://localhost
I have a Java Project in Eclipse, and a Java Dynamic Web Project in Eclipse. In the former, all the jar files are shown individually under the top-level project folder. In the latter, the jar files are under a Libraries folder and the navigation is more convenient.
Is it possible to organize them in the same way in the Java Project also? If so, how?
Update: It is the Project Explorer View. For the Java Project, I see: "my_project_name" with the arrow expanded to point downwards, then I see: "package_icon src/main/java" and below that "package_icon src/main/resources" and then 20 jar files one below the other: "jar_icon activation-1.1.jar", ...
For the Java Dynamic Web Project I see: "my_project_name" as above, then I see: "JAX-WS Web Services" (unexpanded), then "Deployment Descriptor" (unexpanded), then "Java Resources" which I have expandeded, so I see the components of it below, of which the first is: "package_icon src/main/java", then below it, "package_icon src/main/resources", then below it "libraries_icon Libraries" instead of 20 jars! I have the option of expanding Libraries if I really need to see the 20 jars.
The only option I found to make things prettier in Eclipse Kepler is to:
In the Project Explorer window there is a down arrow in the upper right corner. Select that and then Customize View.
Select 'Libraries from external' and then OK.
Kind of cheesy...
EDIT: Of course I had to go and do some more digging...and it looks like I'll have to try this and see how it works.
Similar to M Miller's answer (but for Juno), click Show 'Referenced Libraries' Node in the dropdown of the Package Explorer window:
I'm using:
Eclipse IDE for Java Developers
Version: Juno Release
Build id: 20120614-1722
I noticed this "feature" on Eclipse Juno (latest version), when you have a jar file added to the build path it is not shown as a single file on the project.
Try removing one of the jars from the build path to see if it shows up again.
I couldn't find how to turn it off though.
BTW... the project layout for your "Java Project" is more akin to a "Maven Project", which is a bit more powerful.
You should change into the Package Explorer by Window > show View. It will display all the referenced libraries in a Referenced Libraries folder.
Is it possible to import an existing Java project which is in my workspace, in an Android project which is also in my workspace? The Java project doesn't use stuff that is incompatible with Android. I could do it using a .JAR, but since I'm modifying the Java project a lot, I would like to import the whole source code and change it once in a while. Is it possible? Thanks
This is somewhat of a hack, but worked for my project:
Add both Android project and plain Java project to workspace
Go to properties for Android project -> Java Build Path -> Source
Click Link Source, in "Folder name", make sure to select the root directory of the plain Java project's src tree
Use a descriptive name for "Linked folder location", like "java_project_src".
Press Finish and compile
This setup will compile the plain-java code as Dalvik bytecode. In my case, I had pure java code with very limited dependencies, but wanted to share the pure java code with non-Android projects, instead of separately maintaining these files in every project.
I think you are talking about referencing other projects into the current project, if this is the case then you can do this by Right click on project, properties->Project Reference.
You can link another projects to your current project. Right click on your main project, choose Build Path -> Configure Build Path... In the dialog choose the Projects tab, then click Add.. button. Now choose the project you want to link and click OK. You'll now be able to use this project's sources inside your main project. Hope this helps.