Questions tagged [jdk1.5]

For questions relating to using the Java Development Kit (JDK), version 1.5.

JDK or Java Development Kit is a set of tools that Oracle, formerly Sun Microsystems, provides for developing Java applications.

Note: JDK 1.5 was End of Life'd in October 2009.

155 questions
854
votes
32 answers

How do I join two lists in Java?

Conditions: do not modify the original lists; JDK only, no external libraries. Bonus points for a one-liner or a JDK 1.3 version. Is there a simpler way than: List newList = new…
Robert Atkins
  • 20,676
  • 14
  • 60
  • 92
170
votes
21 answers

Why do people still use primitive types in Java?

Since Java 5, we've had boxing/unboxing of primitive types so that int is wrapped to be java.lang.Integer, and so and and so forth. I see a lot of new Java projects lately (that definitely require a JRE of at least version 5, if not 6) that are…
Naftuli Kay
  • 75,812
  • 80
  • 244
  • 374
145
votes
8 answers

How to set a JVM TimeZone Properly

I am trying to run a Java program, but it is taking a default GMT timezone instead of an OS defined timezone. My JDK version is 1.5 and the OS is Windows Server Enterprise (2007) Windows has a Central timezone specified, but when I run the following…
Kushal Paudyal
  • 3,033
  • 4
  • 20
  • 30
69
votes
4 answers

How to redirect verbose garbage collection output to a file?

How do I redirect verbose garbage collection output to a file? Sun’s website shows an example for Unix but it doesn't work for Windows.
djangofan
  • 25,461
  • 54
  • 171
  • 262
32
votes
1 answer

What are the 37 Java API packages possibly encumbered by the May 2014 Oracle v Google decision?

What are the 37 Java API packages possibly encumbered by the May 2014 Oracle v Google decision? What are the 3 packages that the Appellate Court decided were essential to the language? How can I avoid using the encumbered APIs in my Java code? If…
Karl the Pagan
  • 1,885
  • 17
  • 17
20
votes
4 answers

JAXB unmarshalling ignoring namespace turns element attributes into null

I'm trying to use JAXB to unmarshal an xml file into objects but have come across a few difficulties. The actual project has a few thousand lines in the xml file so i've reproduced the error on a smaller scale as follows: The XML file:
user227614
  • 203
  • 1
  • 2
  • 4
19
votes
3 answers

Did we always have to register to download the Java 5 JDK, or is this new Oracle fun?

I could swear that just a couple of months ago I downloaded a copy of the Java 1.5 SE JDK and I did not have to give them information on my first born. Today, I had to go through the register-and-we-will-send-you-a-link-someday dance. I have not…
Ukko
  • 2,206
  • 2
  • 21
  • 33
17
votes
3 answers

TimeZone.setDefault changes in JDK6

I just noticed that JDK 6 has a different approach to setting a default TimeZone than JDK5. Previously the new default would be stored in a thread-local variable. With JDK6 (I just reviewed 1.6.0.18) the implementation has changed, so that if the…
Tom
  • 1,739
  • 2
  • 21
  • 31
16
votes
9 answers

SEVERE: A message body writer for Java class java.util.ArrayList and MIME media type application/json was not found

I am testing RESTful services and when I execute I am getting exceptions although I have the following jars in my class path(WEB-INF/lib), I am not using Maven and my JDK version is 1.5. Other questions regarding this issue didn't help to resolve…
Jacob
  • 13,463
  • 58
  • 188
  • 302
13
votes
2 answers

Invalid maximum heap size

I have copied a jdk directory from another location. Since then, I get the following error message. Your environment has been set. java version "1.5.0_22" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03) Java HotSpot(TM) Client…
AlwaysALearner
  • 5,329
  • 14
  • 37
  • 52
12
votes
5 answers

Maven - Use JDK 7 to Compile for JVM 5

I've been trying to get this to work for a while now but no luck yet. I want to run with JAVA_HOME pointing to JDK7 but I want to compile a project for JVM 5. I've read through documentation, I've found similar posts on SO, but none of them seem to…
Alex Ciminian
  • 10,837
  • 14
  • 57
  • 92
11
votes
8 answers

Cross-platform way to open a file using Java 1.5

I'm using Java 1.5 and I'd like to launch the associated application to open the file. I know that Java 1.6 introduced the Desktop API, but I need a solution for Java 1.5. So far I found a way to do it in Windows: Runtime.getRuntime().exec(new…
asalamon74
  • 5,930
  • 9
  • 43
  • 59
11
votes
4 answers

Why the output is different between JDK 1.4 and 1.5?

I'm running this code with JDK 1.4 and 1.5 and get different results. Why is it the case? String str = ""; int test = 3; str = String.valueOf(test); System.out.println("str[" + str + "]\nequals result[" + (str == "3") + "]"); if (str == "3") { …
omgeeeee
  • 131
  • 6
10
votes
2 answers

How Can I Tell Eclipse to Compile and Build a Project with a Different JRE Version than it Normally Does?

I'm not sure if this question has been answered in full or if my title is descriptive enough given my situation, but I've been asked to convert a project from being built with Ant to Maven. That part isn't too bad, but I've been told that this…
Kris Schouw
  • 352
  • 1
  • 5
  • 20
9
votes
3 answers

Extracting information from a a java core dump with jmap(1.5)

Long story short, some coworkers are running a pretty old setup(oc4j jdk1.5.6 in x86_64) with an application which happens to be mission critical. They recently have tried to deploy a new version of the application, but as soon as they do the java…
Samuel
  • 2,270
  • 2
  • 17
  • 20
1
2 3
10 11