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
7
votes
2 answers

Can I specify the JDK path to compile against within an Ant build.xml?

I would like to use JDK 1.6 for a branch of a project while others keep using JDK 1.5. Developers want to occasionally switch between those. So what is the best way to tell Ant's javac which JDK to use? By best, I mean a robust, transparent, low…
inger
  • 19,574
  • 9
  • 49
  • 54
7
votes
2 answers

What is "Java 6 steady state"

I know nothing about Java. There is Java 6 steady state at benchmark http://shootout.alioth.debian.org/u64q/which-programming-languages-are-fastest.php which Java 6 steady state is the fastest among all other Java. I've searched and no good result…
Sinama
  • 171
  • 1
  • 1
  • 3
7
votes
1 answer

SimpleDateFormat.parse returns errorIndex as 0

Using jdk1.7.0_55, I'm getting parseposition.errorIndex as 0 in case of timezone is not standard one. But using jdk1.6.0_38 I'm getting parseposition.errorIndex as 21 for the same wrong timezone format Below is the sample: String date = "13 Jan 2005…
Roshan
  • 2,019
  • 8
  • 36
  • 56
7
votes
8 answers

unable to place breakpoints in eclipse

I am using eclipse europa (3.5) on windows vista home premium 64-bit using JDK 1.6.0_18 (32 BIT). Normally, I am able to put breakpoints just fine; However, for a particular class which is NOT part of the project (this class is inside a .JAR file…
anjanb
  • 12,999
  • 18
  • 77
  • 106
7
votes
2 answers

How to lock down (or sandbox) JDK's built-in Javascript interpreter to run untrusted scripts

we have a Java application and would like to run untrusted code using the built in Javascript interpreter (javax.script.*) However by default the interpreter allows access to any java class. For example "java.lang.System.exit(0)" in the script will…
7
votes
5 answers

Eclipse: export to .jar AND include resource files (ANT)

Our project in eclipse approximately shows the following folders: application - src - JRE System Library [1.6] - Referenced Libraries - lib - rsc In our project, we would like to use File > Export... > Executable JAR Well that…
Atmocreations
  • 9,923
  • 15
  • 67
  • 102
7
votes
1 answer

Young garbage collection longer pause with java 7 vs java 6

I noticed that each young garbage collection with java 7 takes on average 10 more milliseconds than with java 6. I'm using 1.6.0_31 and 1.7.0_21. The configuration hasn't changed, neither has the hardware, JVM arguments are: -server…
punx120
  • 124
  • 4
7
votes
1 answer

@SafeVarargs and Java 6 interoperability

I have a method with a generic varargs parameter in my API. I want my API to be Java 6 source and binary compatible, but it would be nice if Java 7 API consumers wouldn't suffer from unnecessary "varargs" warnings. A trick that I can think of is to…
Lukas Eder
  • 211,314
  • 129
  • 689
  • 1,509
7
votes
5 answers

Should I use StringBuilder or StringBuffer for webapps?

I a writing a webapp in Java 1.6 and running it in tomcat. While I am not doing any explicit threading, I wonder about what is going on behind the scenes with Spring and Tomcat. Would I run into any issues using StringBuilder instead of…
Bob Roberts
  • 539
  • 8
  • 22
6
votes
4 answers

Running Two Versions of Java JDK

I primarily use JDeveloper 10 with JDK 1.4.2 on Vista. I would like to install Eclipse and have it run the latest JDK 6. Is this possible without conflict? Ideally I would like to just use JDeveloper and switch back/forth between JDK versions. Is…
user77826
  • 99
  • 1
  • 2
6
votes
2 answers

Not able to properly set up the path of java in Windows 7 , 64 bit

I have installed java 1.6 in my computer and I have also set the path, using the advanced variable settings. At a command prompt when I tried to execute java I got this error: Error: could not open `C:\Program…
NewCodeLearner
  • 738
  • 3
  • 14
  • 38
6
votes
3 answers

Any issues migrating from JDK6 to JDK7 with Spring & Tomcat?

I'd like to take advantage of some JDK7 features. What issues might I run into given that I use Apache Tomcat 7.0.x (latest) and Spring 3.1 (latest)?
at.
  • 50,922
  • 104
  • 292
  • 461
6
votes
5 answers

Can I add classes to sun's rt.jar file?

I downloaded the Javax.mail package. I have jdk1.6.0_11. Problem is...I cannot get javac or java to find those classes! I can get apps to compile using JCreator LE ( by adding the mail jar to its search list ) but, when I try to run the app in a…
javaphild
  • 1,511
  • 3
  • 12
  • 6
6
votes
2 answers

List.sort() NoSuchMethodException 1.6 vs 1.8

So i'm a little confused about a change in Java 8 - List.sort - bear with me as the confusion will become apparent. I have Java 8 JDK installed and running Eclipse with the Project in question set to compile in 1.6 (Windows environment). Throughout…
Steve
  • 178
  • 2
  • 12
6
votes
4 answers

Is there a way to do a live heap dump with ibm-jdk for linux?

I know that it's possible to dump heap when an OutOfMemoryException is occuring on this JVM but is it possible to ask a live dump with tools like jmap or jconsole?
Opty
  • 504
  • 5
  • 10