MyEclipse's class file - myeclipse

I'm using MyEclipse and want to change to Eclipse directly, but I found that the .class file generated by MyEclipse and Eclipse are different. First, I found the JDK version are different (I reference http://en.wikipedia.org/wiki/Java_class_file to find offset 6-7). But after use same JDK the .class are still different.
I also use Java de-compiler for the 2 .class files, but get the same result, is there any suggestion for me? Because it's an old system, if the class files are different, I have no confidence to do migration.

The Java functionality in MyEclipse is the same as eclipse, at the relevant version. MyEclipse 2013 is based on eclipse 3.8.2 (though eclipse 3.8.2 is a bit more difficult to find than 4.2.2), MyEclipse 10 is based on eclipse 3.7.2. Eclipse will be using the Java compiler in the JRE specified for the project (which may be different from the default specified for the workspace). You should also check the Java compliance level for the project (or the workspace default, if there is no project specific level specified).

Related

Pydev plugin with eclipse IDE

I've installed Pydev plugin with eclipse c/c++ and it worked will but after two days something wrong happened and it shows this message
(No editor descriptor for id org.python.pydev.editor.PythonEditor)
I tried to install it once again but still the same problem
That message means that PyDev isn't really properly installed or its requisites are not properly matched.
The possible reasons are that you're using a different java vm from the one you had (PyDev requires java 8 onwards), it became corrupted (i.e.: could happen if you had some issue in your hard drive, but that's very rare compared with not running Eclipse using java 8) or you're using an older version of Eclipse with a newer version of PyDev (see the "Need to use older Eclipse/Java" section on http://www.pydev.org/download.html).

In Android Studio how can I configure my project to use Java 8

I recently started development with Android Studio 1.1.0 (bundle 135.1740770 for Windows) having JDK version "1.8.0_40" installed (64 Bit).
So far everything works fine, except I cannot import classes added with Java 8. I recognized it when trying to import java.util.Optional, but it's the same with e.g. java.util.stream.
May it be the case that my project somehow only uses a Java 7 subset of my JDK's standard library? And is it possible (recommended) to change that? I looked for a java version param in properties files, manifest and IDE settings. Didn't find anything like that.. anyone experienced something like that?
Btw. following the first comment in Is it possible to use Java 8 for Android development? it should be possible basically, but it seems to only cover Eclipse..
If you read further down in your linked comments, you will find the solution:
You may use JDK 6 or above for Android development. However, the compilation supports Java version 6 (and 7 in case of KitKat).
So yes, you may use JDK 8 for development, but you need to set the language level to JDK 6 or JDK 7. You cannot use any features that were added to JDK 8. To set the language level in Android Studio, go to:
File > Project Structure > Project > Select Project language level

jdk1.7's javac can't find javafx jar without -cp option

I've read several questions on this site and elsewhere that indicate that when Oracle JDK7 is installed, it should not be necessary to specify the classpath to jfxrt.jar when the JDK is installed correctly. Unfortunately, my installation does not seem to be correct, but I cannot figure out what is wrong.
I used the correct RPM for my Red Hat Enterprise Linux 6.2 Server and I'm able to build JavaFX apps in Eclipse when I added the jfxrt.jar to the External Jars. But when trying to compile and run from the command line, it does not find JavaFX classes unless I specify the -cp option to javac and java. The server was originally using openjdk-1.6, but I used alternatives to configure javac and java to point to the newly installed JDK. It looks like that is working fine, except for this issue.
I found that the same problem plagued me when trying to run the JavaFX Exporter. I was trying to export a project that runs fine in Eclipse. But it could not find the JavaFX classes when trying to run. And I haven't worked out how to tell the exporter where the jfxrt.jar file is located.
For reference, the jfxrt.jar is located at /usr/java/jdk1.7.0_21/jre/lib/jfxtr.jar on my system.
when Oracle JDK7 is installed, it should not be necessary to specify the classpath to jfxrt.jar when the JDK is installed correctly.
That is not true.
If you want to compile and run a JavaFX application in Java 7 (u21) and you are not using the JavaFX packaging tools, you need to add jfxrt.jar to your classpath.
See Compile code using JavaFX 2.0 (using command line) for samples of setting the JavaFX classpath for compiling (with javac) and running (with java) a JavaFX 2 application from the command line.
Some IDEs or IDE extensions are aware of this and will automatically add jfxrt.jar to your classpath (e.g. the e(fx)clipse plugin or the NetBeans JavaFX project type).
Some 3rd party tools such as the JavaFX Maven Plugin or the JavaFX Gradle Plugin also package JavaFX applications so that you don't need to add jfxrt.jar to your classpath.
For Eclipse development, use of the e(fx)clipse plugin is recommended, as it takes care of classpath issues (as well as providing other useful capabilities for JavaFX developers).
For Java 8, jfxrt.jar is on the default classpath, so you don't need to explicitly set your classpath to use JavaFX with tools like javac.exe or java.exe for that Java version.
OpenJdk7 does not include jfxrt.jar. Use Oracle Jdk7 instead will help.

Can a groovy code be compiled to run in JRE?

I am new to groovy and I cannot understand, if it is possible to compile a groovy program, so it runs at all computers, were the JRE is installed.
The application I am developing has to run on any computer with JRE 1.5. Is it possible to start using groovy and maintain this flexibility? With JRE 1.6?
I have heard about the library groovy-all-VERSION.jar. Is this the one required library to be shipped with my application?
The answer is yes. In fact, all groovy code compiles down to Java classes that run on the JRE. All you need is JRE 1.4 or higher and the groovy-all-*.jar on the classpath of your application.
Since you are looking to support JRE 1.5 or higher, make sure your source compatibility is set on your compiler to this level.
There are a few options for compiling your groovy code. Groovyc (Ant Task), GMaven (Maven) and Gradle are all options.
Another option you have is to 'not' compile your groovy code. The groovy distribution only requires the JRE to be installed. You can ship your application as a set of scripts that can simply be run using the groovy install. It depends on how sensitive your source code is.
The short answer is yes. How you do this depends on your build system. I do all my development in eclipse, right click my project, select export, select runnable jar file, and all the required librarys are exported in the jar file. I can then run this file on a machine with out Groovy installed. I know build systems like Maven support Groovy but don't know the details on how they do it or how good there support is. According to this question Java 1.4 or above is fine. When looking at the "Setting up your Java environment" section of the initial tutorial it looks like you need Java 1.5 installed.

Easy way of installing Eclipse plugins on Ubuntu

I'm running Eclipse (versions 3.6 and 3.5) on Ubuntu and I'm having trouble installing Eclipse plugins.
There is an easy way to install eclipse plugins in Eclipse, but this doesn't work for me on Ubuntu! This way only works properly under Windows and Mac OSX.
Just like in the tutorial, I create a folder inside my eclipse SDK folder that is named Links.
In this folder, I create a file eclipse-cpp-helios-linux-gtk.lnk or eclipse-cpp-helios-linux-gtk.link that contains this line:
path=/home/taher/opt/eclipse/Third-party-eclipse-links/eclipse-cpp-helios-linux-gtk
and save it, but when I start Eclipse doesn't recognize the plugin!
How can I resolve this problem?
With Eclipse Galileo (3.5) or Helios (3.6), I would rather recommend an external directory called 'mydropins' (for instance), which you can reference from your eclipse.ini, with the option:
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=C:/Prog/Java/eclipse_addons
This is called a shared dropins folder.
See in this SO answer an example of plugin deployment in this shared dropins folder.
(Your link refers to the previous provisioning mechanism, pre-p2.
P2 is the new provisioning system introduced late in Eclipse3.4, refined (debugged?) in eclipse 3.5 and 3.6.
See the supported dropins formats to check how you can organize your own personal dropins folder (that you can reuse between several eclipse installations)
You said you are using:
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/home/taher/opt/eclipse/Third-party-eclipse-links
That means, under /home/taher/opt/eclipse/Third-party-eclipse-links, you:
won't have any .link file
will copy:
eclipse-cpp-helios-linux-gtk
eclipse
features
plugins
Note: the structure within eclipse-cpp-helios-linux-gtk should be the one describe above, for p2 to pick it up.

Resources