Questions tagged [java-6]

Java SE version 6 was released in December 2006. Use this tag for questions specific to this version of Java.

Java SE 6 was an evolutionary change over the previous version. It did not include extensive language or JVM changes, however such changes were planned for Java SE 7 which was supposed to be released much sooner. (See here for what changed in Java 6).

As a stop-gap to the much delayed Java 7, Sun (since purchased by Oracle) introduced Java SE 6 Update 10, which despite its modest version numbering, represented extensive improvements to the GUI capabilities of Java in order to support JavaFX and Sun's renewed attempt to make Java successful in the GUI arena.

Internally, Java is numbered with a "1." before the number, so it will report itself as "1.6.0_" with an update number at the end. Starting with version 6, Sun dropped the ".0" from its marketed version number, so instead of 5.0 as previously done, it was Java 6.

Only use this tag if your question is specifically related to features of this version. Just because you are using this version, doesn't mean you need this tag. Use in addition to or instead of this tag.

See for more information.

1391 questions
16
votes
3 answers

WatchService for Java 6

Java 7 introduced WatchService for monitoring file systems continuously. Is there a backport for Java 6 ? Are there pure Java libraries with similar features ?
paradigmatic
  • 40,153
  • 18
  • 88
  • 147
16
votes
8 answers

@Override compile error, implementing an interface (eclipse jdk1.6.0_23 linux)

I am getting compile errors in eclipse when using the @Override annotation for a class that is implementing an interface. Compiler compliance level is set to Java 6.0. I am using the latest version of the 6.0 jdk. Error: "The method {methodname}…
jsoc
  • 301
  • 1
  • 4
  • 8
16
votes
6 answers

HttpURLConnection implementation

I have read that HttpURLConnection supports persistent connections, so that a connection can be reused for multiple requests. I tried it and the only way to send a second POST was by calling openConnection for a second time. Otherwise I got a…
Cratylus
  • 52,998
  • 69
  • 209
  • 339
16
votes
1 answer

JDK implementation of AbstractList::equals() does not check for list size equality first

Strangely the default JDK 6 implementation of AbstractList::equals() does not seems to check first if the two lists have the same size: public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof List)) …
Laurent Grégoire
  • 4,006
  • 29
  • 52
16
votes
1 answer

Why does this code compile in Java 1.6 but not in Java 1.7?

The following code compiles fine in Java 1.6 but fails to compile in Java 1.7. Why? The relevant part of the code is the reference to the private 'data' field. The reference is from within the same class in which the field is defined, and so seems…
Paul
  • 3,009
  • 16
  • 33
16
votes
2 answers

Why are we getting ClosedByInterruptException from FileChannel.map in Java 1.6?

A customer of ours complains that, sporadically, calls of ours to FileChannel.map fail with a ClosedByInterruptException. The Javadoc does not list this as a legitimate possibility. Does anyone know what might be going on here? Cause0:…
bmargulies
  • 97,814
  • 39
  • 186
  • 310
15
votes
4 answers

What use is Java 6 interface MultivaluedMap?

What use is Java 6 interface MultivaluedMap?
Malatesh
  • 1,944
  • 6
  • 26
  • 39
15
votes
2 answers

JDK 1.7 breaks backward compatibility? (generics)

I've found similar topics, but overly complicated and not quite the same. So the thing is. Here's the(minimal) code which is fine on 1.6, but doesn't compile with 1.7 javac. public class Test { private static class A{}; private static…
NeplatnyUdaj
  • 6,052
  • 6
  • 43
  • 76
15
votes
4 answers

Is it possible to compile java using Oracle JDK and run the code on OpenJDK?

So is it possible to do all the development of a Java daemon (Apache Daemon) on a Windows 7 machine, then install the service on Ubuntu server (still have to search how to do that) which has OpenJDK installed ? If yes, how can I identify the…
Muhammad Gelbana
  • 3,890
  • 3
  • 43
  • 81
14
votes
3 answers

Difference between server JRE and client JRE

I was going through server jre, when i extracted serverjre tar.gz , it gave me jdk folder. why does serverJRE gives JDK like folder. There is JRE folder inside serverJRE also. So which one to use, whole serverJRE or just JRE folder which is inside…
Kaustubh_Kharche
  • 725
  • 3
  • 13
  • 34
14
votes
7 answers

Java method works in 1.5 but not 1.6

I have an application which has been running happily under Java 1.5 for around a year. We've just had the boxes updated and had Java 1.6 installed. After deploying the app to the new server we've found the application is throwing an exception when…
James Camfield
  • 1,636
  • 3
  • 16
  • 24
13
votes
5 answers

How to (re)attach JDK sources for Eclipse on Snow Leopard?

After updating to the latest (and now deprecated, sniff...) update of Apple's JDK, Eclipse does not show the source code for JDK classes anymore. It asks me to attach the source location file or folder. Where can I find that?
Thilo
  • 257,207
  • 101
  • 511
  • 656
13
votes
3 answers

How to solve JDK issue unexpected at this time

I need your assistant in configuring the Jdeveloper 11.1.3 in my machine. I installed it and I installed the JDK. When I tried to ran a sample jsf file " Right Click-> Run", it generates the error: \Java\jdk1.6.0_45 was unexpected at this time. …
user3407440
  • 183
  • 1
  • 2
  • 15
13
votes
7 answers

Jboss Server Error:Server already running on localhost

I am working on web project where jboss application server is required. After configured the jboss server, I was running my application. It is showing error like:Server already running on local host.Web found a running server at URL…
user1835080
  • 269
  • 2
  • 3
  • 14
13
votes
4 answers

Complex Bean Mapping

I am trying to find the best solution for a problem I have with mapping a simple bean structure that is being sent to a browser-based JavaScript application. The current requirement is to manage most of the display control on the old Java backend.…
rock-fall
  • 438
  • 2
  • 11