According to PyDev's documentation:
PyDev requires Java 8 and Eclipse 4.6 (Neon) in order to run and only supports Python 2.6 onwards. [...]
The documentation states that the installation will silently fail if Java 8 is not installed. However, I have the more recent Java 9 installed.
Is PyDev compatible with Java 9? Or will I need to reinstall Java 8?
PyDev is currently only tested with Java 8, so, that's what's recommended.
Still, it should work with Java 9 too (as java is usually backward-compatible). If something doesn't work, please create a bug report (see: http://www.pydev.org/about.html for links).
Related
I'm new to Eclipse and Java. Whenever I run the Java program in Eclipse there is a major.minor 52 exception. I want to know which version of Java is supported by Eclipse Helios. My computer is Windows 7 32-bit OS. So I can't download any other version of Eclipse. Please help me with a favorable answer.
The class file major.minor version 52 error means that Java 8 or newer is required.
Eclipse Helios (3.6) is very old (10 years and 14 releases old). It probably doesn't understand anything above Java 6.
There are 32 bit version of Eclipse newer than this.
Eclipse 4.9 (2018-09) was the last 32 bit Eclipse - that supports Java 8.
OK. Lets start with some history.
Eclipse Helios (3.6) was released in 2010. It supported the latest version of Java that was available at the time; i.e. Java 7.
Eclipse Juna (4.4) was the first release of Eclipse to support Java 8 language features.
Java 7 has been end-of-life for a few years now.
Java 8 (the oldest available version of Java with free support) was released in 2014. This corresponds to the classfile version number (52) of the application that you are trying to run.
Java 8 is also that last version of Java for which you can get a Windows 32 bit version from Oracle.
So what can you do?
If you want to run a pre-built Java application which has classfile version 52, you will have to download and install Java 8.
If you are prepared to rebuild the application, then depending on the application you will probably still need to upgrade to Java 8 to do that. (It depends on whether the application uses Java 8 language constructs or library classes and methods that were introduced in Java 8. It is likely that one or both of those is true.)
If you are going to upgrade to Java 8, it would be advisable to Eclipse to (at least) Luna, but you could go all the way to the 2018-03 release ... which is the last version that supported 32bit Windows.
You could probably also run the application from the command line; i.e. without using any IDE at all. But that would apply to a tool that was designed to run as an Eclipse plugin, etc.
But my strongest advice is to get a machine that can run a 64 bit OS. You can probably get one for USD $300 or less. If your current hardware cannot run a 64bit OS, it must be pretty old, and I am surprised that it still works reliably.
Which version of Java is supported by Eclipse Helios?
Java 7 and earlier versions.
So I can't download any other version of Eclipse.
That is not true. But simply upgrading Eclipse won't solve the problem. You need to upgrade Java as well if you want to run that application.
I am having java JDK version 11 and JRE version 8, it will occur any problem in feature or not? is it mandatory to have same jdk version and jre version?
If your code is using features of Java 11, you will need the JRE 11 to run it. But as long as you develop your code against JRE 8, it doesn't matter which JDK you use to develop and compile with.
You can set your project in your IDE to a compatibility level of JRE 8 (like here). This prevents any usage of features newer than Java 8.
Example: Develop with JDK 11 but only use features from Java 8 -> code will run in JRE 8. See the older versions as subsets of the newer ones.
If you compile code targeting Java 8, and don't use any newer APIs, you can run it on either.
If you build for Java 11, but try to run on Java 8 it won't work.
The simplest thing to do is to use the JVM the software was built on (or a newer version)
No. Because you never use both of them at the same time.
JRE is Subset of JDK.
JDK includes the Java Runtime Environment (JRE), an interpreter/loader (java), a compiler (javac), an archiver (jar), a documentation generator (javadoc) and other tools needed in Java development.
If you Open your JDK folder (C:\Program Files\Java\jdk1.8.0_152) , you can find JRE there.
Coming to your Question; No it is not necessary to have both JDK and JRE of same version as we don't use both at the same time.
For a project I must use Java 6, so I set my eclipse compiler setting to 1.6 (JDK compliance level).
However, I included java.nio.file.Files which is a Java 7 library and I am not getting any complaints. I can ensure that my project specific setting is set to 1.6. I even changed my entire workspace to 1.6 and rebuilt, still no complaints. My colleagues are seeing the complaint on java.nio.files.
Is it becuase I have a jdk7 which is recognizing the java.nio.file.Files even when set to 1.6 spcs?
These are two different things:
the compliance level is about the syntax that you can use when writing Java code (respectively about the Java version number that gets put into compiled byte code)
but the libraries that are available to you depend on the JDK that your project is using!
In other words: if you truly want to restrict your project to Java 6 libraries, you will have to install a Java 6 JDK on your system, and point to that within your project setup ( most likely, your current project setup makes use of a newer-than-Java-6 JDK ).
And the usual disclaimer: Java 6 has had end of life many years ago. You should do whatever you can to upgrade your setup.
JDK compliance level is the level of the Java syntax, not the runtime libraries. It will just prevent you from using language features that were introduced in later versions like try-with-resources which was introduced in JDK 7.
If you want to develop for JDK6, you need to use JDK6.
Java 6 is able to interpret java.nio.file.Files because there is no special Java 7 syntax in contrast to Java 7 and Java 8 (lambda expressions etc.). So you are working on standard libraries. Uninstall Java 7 JDK and install Java 6 JDK and you will that java.nio.file.Files is not available anymore.
I'm doing some upgrade work now. From java 7 to java 8, and also upgrade some jar files. How do I know if the jar file is compatible with java 8? Is there any website telling that?
Classes that were compiled with Java 7 almost always run on Java 8. This is backward compatibility requirement. However, there are some incompatibilities that are documented here
If there is some issue with a particular library, you should look for this information on the library's website.
I am beginner in Java programming. Here is my question:
It says Java SDK 1.8. I am confused.
What is the relationship between Java SDK 1.8 and java version 6 or 8?
Here is a picture in intelliJ.
It says Java SDK 1.8. It prevents me using a try-with-resouese, which is available in Java 7.
How do I find out which Java version that IntelliJ is using in my current project?
Java 8 and 1.8 are the same. As several people pointed out in the comments. The difference is between marketing and developer version numbering. Take the "1." off the front to get the marketing version.
To enable the use of Java 7 and 8 features in IntelliJ open the project structure dialogue. (File > Project Structure...) In the project section there is a "Project Language Level" drop down. Select the one for 7 or 8 to enable the use of the try with resource feature.