How can I get Eclipse to recognize the most recent Hadoop libraries? - java

This question is more of an Eclipse question, but those who have worked with Hadoop may know the answer.
Last year, I wrote some Hadoop MapReduce jobs in Eclipse. To access the libraries and packages I needed to compile the code, I installed an Eclipse plug-in off the Apache website (http://wiki.apache.org/hadoop/EclipsePlugIn). Unfortunately, that plug-in isn’t compatible with the latest version of Hadoop (the 2.0.0-alpha version). I was wondering if anyone had done any work with writing Hadoop jobs within the past few months, and knows how I can get Eclipse to recognize the most recent Hadoop (2.0.0-alpha) packages.
The plug-in still works for Hadoop 0.20.203.0, but I was hoping to be able to use the newest version.
I'm running Eclipse in Windows. I tried right-clicking on the name of my project, going to Properties then to Java Build Path and finally selecting Add External JARs
I added all the JARs from the hadoop-2.0.0-alpha/share/hadoop directory and subdirectories. At first, I thought this had worked, but when I try to use methods and constructors unique to the Hadoop 2.0.0-alpha API, the code does not compile. The libraries it is recognizing are definitely more recent than those from Hadoop 0.20.203.0, but not as recent as the current alpha version of Hadoop.
Does anyone know how I can fix this problem?

Related

Eclipse not exporting latest version as runnable JAR

Simple as that - my eclipse (Mars Release (4.5.0) EDIT: Oxygen.2 Release (4.7.2)), when exporting a runnable JAR using the correct run configuration, keeps releasing a version of one of my classes as a version approximately 2 days old instead of the latest. I noticed as the functionality has changed rather drastically, yet the JAR keeps acting the same.
Yes I'm definitely overwriting the previous version.
Thanks for suggestions.
It appears this is a known bug, as reported on the Eclipse forums here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=525711
Here is the full answer:
The easiest workaround at the current moment is to use an older
version of the jdk for eclipse. This can be done by going into
Window->Preferences->Java->Install JREs and adding the older jdk
folder.
I've rolled back to jdk8 and the eclipse's export jar works fine, in
most cases.
If you really need to use Java9, then you're best bet is to manually
create the jar using javac or using another build system like Gradle.

Should I Uninstall Eclipse, or Just Install a New Version on Top?

To preface, I am a student and have limited experience with IDEs. My situation is that I currently have two versions of Eclipse on my machine (OSX El Capitan), one being a C/C++ IDE (Mars) and the other is a Java IDE (Mars.2). I am interested in upgrading to Eclipse Neon for my Java IDE.
Would it be a good idea to uninstall my current Mars.2 version, or just install Neon on top of what I have?
Or, is there a another simple way to upgrade?
If the solution involves uninstalling my Mars.2 version, what files/directories do I need to delete so that my C++ IDE remains functional?
I apologize for the newbie question, but I wanted to get an expert's take that I can bring into my (hopeful) career.
Thanks.
No need to uninstall existed Eclipse since it's allowed to let multi eclipse run on the same machine.
If no big change has been made from original eclipse, I suggest just download a new version eclipse and unzip it to a different folder from existed eclipse folder based on instructions from FAQ How do I upgrade Eclipse IDE?
We strongly recommend against unzipping over your existing Eclipse
version as unexpected side effects may occur, including (but not
limited to): nausea, vomitting, shortness of breath, corrupt
installation.
You can then point the new Eclipse version to your existing workspace(s) and it will load with all your projects and preferences intact.
If your you have added many plugins and preferences to current Eclipse, please follow Easiest way to upgrade eclipse 3.7 to 4.2 (Juno) to migrate the plugins and preferences. Although that's a bit of a dicey process, since many plugins would be incompatible or need to be updated themselves. Better to just install whatever third-party plugins you use into the new Eclipse installation.

Getting a java.lang.NoClassDefFoundError for every jar file

I have recently reinstalled my computer, installed latest version of Android SDK and Eclipse.
And now every project that I have, I'm getting a "java.lang.NoClassDefFoundError" for every jar file included in every project.
I am a Java beginner, I have spend the last week on forums, but cannot get to fix it.
Could someone please help me ?
Thank you
You were probably using an out-of-date version of ADT prior to reformatting. Post ADT 17, libraries either need to be copied to the libs folder of your project, or they need to be marked as exported on the build path. Otherwise, the libraries will not be packaged with the APK binary, thus you will get NoClassDefFoundError when using those libraries.

How can I add Java Template Project in Xcode 4?

I wanna know how can I add Java Template Project in Xcode 4.
I'm working with Eclipse and it's really fine but i want to write Java program in Xcode.
Thanks for helping. ;)
Java is not a first class citizen of Xcode anymore, so you should in my opinion stay with Eclipse.
I realise this question is 6 years old, but I have a similar problem and found what seems an easy solution. I have an old Java project (2008-9) which I maintain but has been dormant. As I prefer to keep it into Xcode I transferred the whole project (sources, project files and all paraphernalia) to a new development machine running el Capitan with Xcode 7.3.1. I opened the project (which was still in 3.1 version) with it, and tried to build it. It failed as Ant was missing. So I downloaded Ant (version 1.10.1) and copied its bin and lib directories under /usr/local/ant, then I changed the project external build tool configuration (under project, go to Info, and you'll see that parameter) which was set to /usr/bin/ant and set it to /usr/local/ant/bin/ant or wherever you put it. Build again and this time it worked.

How to fix bad version in eclipse plugin?

I am getting this bad version error as shown below. How to fix this. Do I need to have a separate jar file for each version of java?
(source: sourceforge.net)
How to fix this.
Is this a plugin that you created, or did you download it from somewhere?
I've never seen this myself, but I suspect that you are running Eclipse using an older version of Java (e.g. 1.5) and trying to use a plugin that was compiled for Java 1.6. Assuming that is the case you can:
upgrade the JDK used to run Eclipse to 1.6,
try to find a version of the plugin that was compiled for the Java 1.5 platform, or
download the plugin sources and build it for Java 1.5 yourself.
Do I need to have a separate jar file for each version of java?
No. A JAR file built for a Java 1.5 target platform should also work on a Java 1.6 platform. (Just not the other way around ...)
I got similar kind of error once and I was not able to fix it. And I ended up removing the plugin (EMF Plugin) and installing it on a new setup of Eclipse.
Now, I use Yoxos On-demand where you can create/add/remove Eclipse plugins with no effort. This is the best Eclipse customizer I have seen.
You are running on an older version of Java than the code was compiled for.

Categories

Resources