Java 7 Questions & Answers

Updated 8/18 Please use a real email when commenting; some of your questions are not of general interest and will not be posted but I can often respond privately.

This blog entry will be used to host commonly asked questions related to Java 7. I have pre-seeded it with a few that have come up since the July 28 release. If you have additional questions, feel free to post as a comment to the blog. I will not respond to them in the comments, but will instead aggregate and update the blog entry. Only questions of general interest to the community will be answered here. Fire away!

Q: Where can I download Java 7?
A: From java.oracle.com, where you can find the JDK 7 download page.

Q: When will JRockit be available for Java 7?
A: It won't. As we explained last year we are merging JRockit and HotSpot into one single JVM. JDK 7 contains the first release of this converged JVM, where one of the first steps was to start removing the PermGen concept. Future JDK 7 updates will complete the PermGen removal, as well as add more visible features from JRockit.

Added 8/18
Q: I have created an application in Java 7, but when my users try to run it they get an Unsupported major.minor version 51.0 error. What does this mean and what can I do about it?
A: If you compile an application using javac in Java 7, the resulting classfiles will have the 51.0 version number. Versions of Java prior to 7 do not recogize this number, so your users will have to upgrade to Java 7 prior to running your application. If you are not using any Java 7 APIs you can try to compile your application using javac -target 1.6 to create a 1.6-compatible classfile. If your application is deployed using webstart you can specify the minimum version required. For more information, see the docs on Java Web Start and JNLP here. This issue will go away once we trigger autoupdate to Java 7 for end-users currently having Java 6 on their desktops. The timeline for this is not yet determined, we want to give developers time to work out any issues between their code and JDK 7 first.

Added 8/17
Q: Will the converged JVM get the feature that allows JRockit to allocate more heap on Windows?
A: For reference, the feature you are asking about is described here. Adding this to HotSpot turns out to be quite complex due to how the JVM is architected. Our current plans for convergence do not include this feature. We recommend using a 64-bit JVM instead, which does not run into this Windows limitation.

Q: Where can I find the source code?
A: The source code for the Java SE 7 Reference Implementation is available from the JDK 7 Project in the OpenJDK Community.

Added 8/17
Q: What is the difference between the source code found in the OpenJDK repository, and the code you use to build the Oracle JDK?
A: It is very close - our build process for Oracle JDK releases builds on OpenJDK 7 by adding just a couple of pieces, like the deployment code, which includes Oracle's implementation of the Java Plugin and Java WebStart, as well as some closed source third party components like a graphics rasterizer, some open source third party components, like Rhino, and a few bits and pieces here and there, like additional documentation or third party fonts. Moving forward, our intent is to open source all pieces of the Oracle JDK except those that we consider commercial features such as JRockit Mission Control (not yet available in Oracle JDK), and replace encumbered third party components with open source alternatives to achieve closer parity between the code bases.

Added 8/18
Q: How much more in JDK 7 is open source compared to JDK 6?
A: All new JDK 7 features are open source, as is the Java SE 7 Reference Implementation. Also, the majority of the features that are ported from JRockit are open source (or will be once they are in the JDK 7 code base).

Updated 8/17
Q: Why isn't Java 7 available on java.com yet?
A: The site java.com is used for end-user downloads. As with previous major versions of Java, JDK 7 is first made available to developers so that they can ensure that their Java programs work with the new JRE version before it gets rolled out to millions of end-users. There is a unobtrusive link from the website that takes you to developer downloads on java.oracle.com.

Q: Where can I find API documentation?
A: Javadocs are available here.

Q: What is the status of the port of Java 7 to the Mac?
A: Feature development is still going on in the OpenJDK Mac OS X Port 7 Project. You can see the detailed status here. Once that Project has made sufficient progress - say a couple of months from now or so - we plan to build and make a developer preview available from the main JDK download site. We will then work with Apple and others in the Mac OS X Port Project to finalize remaining feature work such as installers and plugin/webstart, and then go through the usual steps of one or more beta releases and/or release candidates before we get to GA. If you are anxious to get started, there are a number of third parties that provide binary builds from the OpenJDK code. Just use your favorite search engine and you'll find several.

Q: I have read about issues with Apache Lucene running on JDK 7, what is that about?
A: The Lucene project has reported that running Lucene triggers a JIT bug that causes a JVM crash. It can be worked around by disabling the broken optimizations with command line options, see the bug reports for details. The three bugs that Lucene reported have been fixed in the OpenJDK code, in addition to a fourth bug impacting Lucene that Oracle found (7070134, 7068051, 7044738, 7077439), and are included in current builds of JDK 7 Update 1 (and will remain included unless the fixes cause regressions). For more information on how Oracle prioritizes and works with external bug reports see this blog by Dalibor Topic. And while I'm at it - many thanks to all those of you who have tested JDK 7 and reported issues!

Q: I read the JDK 7 license. It mentions something about Commercial Features, what does that mean?
A: Sun versioned the end user license together with the binary, which made it clear what terms applied for a particular release. However, it also meant that a Java user would have to re-review the license for every new release (including update release), which lead to uncertainty around future licensing conditions. Oracle's approach is to minimize the number of licenses used for Java - ideally getting it down to only one. This means a more predictable and stable licensing situation, at the cost of a slightly more complex license text since it needs to be able to cover more scenarios. When we made JRockit free we modified the Binary Code License to make it cover all versions of Java, as well as JRockit. This was announced in one of my previous blog posts. The "Commercial Features" clause is there to allow us to port over value-add features from JRockit to the converged Hotspot/JRockit JVM starting with JDK 7. Full details on what features are non-free can be found in the product documentation. In the standard JDK 7 GA binaries, there are no commercial features so there is no risk that you use them by mistake. As we move such features to JDK 7 in a future update, our plan is to require an explicit flag to enable them. Note that these features are only restricted "for any commercial or production purpose" so individual developers need not worry. For full information, read the license text itself.

Comments:

very nice

Posted by guest on August 26, 2011 at 07:26 PM PDT #

WHEN IS OCPJP(PREVIOUS SCJP) 1.7 GETTING STARTED.I AM WAITING FOR IT. COULD YOU PLEASE UPDATE ME ON THIS.

Posted by JAYASIMHA on September 10, 2011 at 12:58 AM PDT #

hi ;
I hav downloaded the JDK1.7 .
I am using Windows command promt to compile and using the eclipse IDE .
Whn I tried with the statement
import java.until.Scanner;
Its says
java.until does not exist .
How can I install the packages ??

Posted by guest on September 11, 2011 at 06:39 AM PDT #

Is the java 7 documentation available for download? If yes, where can I download it?

Posted by guest on September 11, 2011 at 12:29 PM PDT #

java is platform independent object oriented programing language.

Posted by rabbani on September 12, 2011 at 11:25 PM PDT #

So basically what are the "Commercial" features in the JVM that you want "$$$" license for? And isn't this deviating from the previous Java everything is open and free spirit?

Posted by TJ on September 14, 2011 at 10:47 PM PDT #

I have a new computer,have installed pogo.com on it for the games. I keep getting a "fatal error" on runtime. caqn anyone tell why and how doI correct this without buying software costing ov er $100, which I don't have. Thanks much.

Posted by Don Roberts on September 23, 2011 at 05:23 AM PDT #

When will JRE 7 update 1 be released?

Posted by Hans on September 26, 2011 at 05:13 AM PDT #

While and for loops cause problems with mutable objects.

Posted by guest on September 30, 2011 at 04:36 PM PDT #

Ia using the jkd7 version this very independent and acrobeting plateform providing version. so i think this is very useful to us so i request you and all jaa users. jkd7 use the evrytime because this very comfortable and easily providing output.

Posted by pankaj kumar on October 02, 2011 at 10:44 PM PDT #

I think jvm is very difficult language but it is very fast providing the output. so i think this is very usefulto us.so try it.

Posted by pankaj kumar on October 02, 2011 at 10:48 PM PDT #

I am looking again at:
Q: Where can I find API documentation?
A: Javadocs are available here.

My question is simple: why is the API documentation nearly useless?
For example, suppose I wanted to find out how to use "ActionListener
". The API provides nearly no information on how to use this. I am looking at it right now, and I am completely confused on where and when to use it, how to apply it, and so on. Sure, there are texts that describe the whole process, but the API is sooooo useless, i don't even know why you bother.

Posted by Baruch Atta on October 05, 2011 at 06:30 AM PDT #

My question concerns running Java 6 and Java 7 together on the same machine. I need to have Java 6 running on my workstation to support the software that uses Java. However, I would like to test Java 7.
Is this possible?

Posted by Baruch Atta on October 05, 2011 at 06:34 AM PDT #

My third comment concerns the incompatability between releases. We support a Java commercial software package, and we find that some Java releases are compatable, and some just break our software. This is so irrational. Can you insure that there is backwards compatability from Java 7 to Java 6?

Posted by Baruch Atta on October 05, 2011 at 06:38 AM PDT #

Very nice Oracle!

Posted by guest on October 07, 2011 at 02:09 AM PDT #

Q: Where can I find API documentation?
A: Javadocs are available here.

But where can I find the API documentation as a zip or tar ?

I don't stop programming when the Oracle site is not available (e.g. internet connection is down).

Also checked older documentation, but the links do not work, anymore.
See http://download.oracle.com/javase/1.5.0/docs/
"Download this JDK documentation" in upper left corner and on the bottom left.

Posted by guest on October 12, 2011 at 11:43 PM PDT #

Will JRockit & JDK merge going to make Oracle JDK to perform better on Intel platform (as good as JRockit)? The earlier JDK versions (6 and below) were highly optimized for AMD platforms and not for Intel whereas JRockit addressed optimizations for Intel platforms.

If yes, when this is going to happen and in what version?

Regards,
Prakash

Posted by Prakash C Rao on December 08, 2011 at 12:39 AM PST #

Post a Comment:
Comments are closed for this entry.
About

Henrik Stahl is VP of Product Management in the Java Platform Group at Oracle, and is responsible for product strategy for Java ME and SE.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today