Questions tagged [jdk1.4]

For issues relating to setting up or using the Java Development Kit (JDK), version 1.4.

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

Note: this was End of Life'd in October 2008.

73 questions
28
votes
4 answers

When was Javac StringBuilder/StringBuffer optimization introduced?

I know that Javac compiler is able to transform String concatenation + using StringBuilder/StringBuffer, and I'm curious to know starting from which version this change was introduced? I'm using this sample code: public class Main { public static…
Nicolas C
  • 1,584
  • 2
  • 17
  • 33
15
votes
1 answer

Which PDF Generation API (Java) supports Gujarati Font?

I have tried iText, PDFBox & Oracle Forms. And I also succed in case of iText to generate Gujarati PDF Document. But, unfortunately it is not generating proper Font in Gujarati (UTF-8) language. I have my project in jdk 1.4 & that is mandatory to…
Sarang
  • 339
  • 2
  • 6
  • 16
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
6 answers

How to run a task daily from Java?

How can I run a task daily at a specified time (say 11:00 am) using java.util.Timer? I'm using JDK 1.4.2, I know it's old, but it's what the project requires.
Jaime Garcia
  • 6,744
  • 7
  • 49
  • 61
8
votes
4 answers

data type to represent a big decimal in java

Which data type is apt to represent a decimal number like "10364055.81". If tried using double: double d = 10364055.81; But when I try to print the number, its displaying as "1.036405581E7", which I don't want. Should I use BigDecimal? But its…
jai
  • 21,519
  • 31
  • 89
  • 120
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
5 answers

Is it possible to put java 1.4 on 64 bit Ubuntu?

I need to set up a legacy app that uses Tomcat 4 and runs using the 1.4 JDK. I tried to install the linux JDK 1.4 from the sun download site on Ubuntu 9.04 but it wouldnt install. Is it possible to install JDK 1.4 on the 64 bit version of…
Craig Angus
  • 22,784
  • 18
  • 55
  • 63
6
votes
4 answers

What is the difference between a = a.trim() and a.trim()?

I've ran into a bit of a confusion. I know that String objects are immutable. This means that if I call a method from the String class, like replace() then the original contents of the String are not altered. Instead, a new String is returned based…
Hungry Blue Dev
  • 1,313
  • 16
  • 30
5
votes
5 answers

Is it possible to use generics in lists in Java 1.4?

I have to use Java 1.4 and am using arraylist structures. Now I need to do some re-factoring and it would help if I can use Generics. Currently I have code like this ArrayList rows = new ArrayList(); Which is a straightforward ArrayList. But now…
angryITguy
  • 9,332
  • 8
  • 54
  • 82
4
votes
4 answers

Java conditional compilation to support 1.4/1.6 simultaneously

I'm working on a large legacy codebase that currently only compiles with java 1.4. One of the things that I need to do is to get it working with 1.6 (well probably 1.7 now). The head build doesn't currently compile with 1.6. This is for lots of…
phatmanace
  • 4,671
  • 3
  • 24
  • 29
4
votes
1 answer

What is the latest version of Groovy supporting JDK 1.4

I need to run Groovy on an embedded 1.4-compatible VM. The current Groovy version requires at least JDK 1.5. Some version in the past did support JDK 1.4, but the current version does not.
Duncan McGregor
  • 17,665
  • 12
  • 64
  • 118
3
votes
3 answers

How to add an xml element in Java 1.4

I am trying to add a "title" element but am getting a NO_MODIFICATION_ALLOWED_ERR error... private static void saveDoc(String f) throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db =…
joe
  • 16,988
  • 36
  • 94
  • 131
3
votes
1 answer

How to mock construction of new objects under JDK 1.4?

I'll looking about mocking of constructor calls in tested method. Something like http://code.google.com/p/powermock/wiki/MockConstructor The problem is that I'm working under JDK 1.4 (this is requirement of customer). I tried to use Retrotranslator…
DixonD
  • 6,557
  • 5
  • 31
  • 52
3
votes
3 answers

Where to download jdk 1.4.2 for Windows

From where can I download Sun JDK 1.4.2 for Windows. I have checked Sun's website and since they have stopped the support to this version it is no longer available for download.
kantvx
  • 33
  • 1
  • 1
  • 5
3
votes
2 answers

Suppressing warnings for JDK1.4 project

Is it possible to suppress warnings in Eclipse for JDK1.4 project? EDIT: Longer version. There is a project which requires JDK1.4 (no annotations). Only way of suppressing warnings I know is using annotation @SuppressWarnings - no can do in JDK1.4.…
rafau
  • 33
  • 5
1
2 3 4 5