|
Quick Lists
|
|
Bug ID:
|
4391434
|
|
Votes
|
0
|
|
Synopsis
|
JCK: java.io.tmpdir system property value differs from solaris and windows value
|
|
Category
|
java:classes_io
|
|
Reported Against
|
merlin
, 1.4.2_02
, ladybird
|
|
Release Fixed
|
|
|
State
|
11-Closed,
Not a Defect,
bug
|
|
Priority:
|
2-High
|
|
Related Bugs
|
4394600
|
|
Submit Date
|
21-NOV-2000
|
|
Description
|
The system property 'java.io.tmpdir' gives the name of default temporary-file
directory. Under solaris (jdk1.3.1-b08, jdk1.4.0-b40) and windows
(jdk1.3.1-b08, jdk1.4.0-b40) value of this property ends with
system-dependent default name-separator character. But under linux
(jdk1.3.1-b08, jdk1.4.0-b40) the value does not contain trailing
name-separator.
JCK1.3a test api/java_io/File/OtherMethodsTests.html#createTempFile fails
due to this problem on:
* linux jdk1.3.1-b08
* linux jdk1.4.0-b40
The following sample code and output show the problem.
---------------------------- test.java -------------------------------
class test {
public static void main(String args[]) {
System.out.println(System.getProperty("java.io.tmpdir"));
}
}
--------------------------- linux output -----------------------------
$ java -version
java version "1.3.1beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1beta-b08)
Java HotSpot(TM) Client VM (build 1.3.1beta-b08, mixed mode)
$ java test
/tmp
-------------------------- solaris output ----------------------------
$ java -version
java version "1.3.1beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1beta-b08)
Java HotSpot(TM) Client VM (build 1.3.1beta-b08, mixed mode)
$ java test
/var/tmp/
-------------------------- windows output ----------------------------
$ java -version
java version "1.3.1beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1beta-b08)
Java HotSpot(TM) Client VM (build 1.3.1beta-b08, mixed mode)
$ java test
C:\TEMP----------------------------------------------------------------------
xxxxx@xxxxx 2003-10-23
Adding the Slash to /tmp/ under Linux doesn't do any harm, it allows however Solaris Java applications run unmodified under Linux. This is important for customer .
xxxxx@xxxxx 2003-10-23
|
|
Work Around
|
N/A
|
|
Evaluation
|
Not a bug. Nowhere is it specified that the value of the system property
java.io.tmpdir should or should not end with a pathname separator. As noted
in the specification of java.io.File.createTempFile, the value of this property
is system-dependent. The JCK should be testing the createTempFile method,
not the specific value of this property.
-- xxxxx@xxxxx 2000/11/22
This is still not a JCK-related bug. If a specific customer needs this to be
changed then please submit a separate RFE and escalate it.
Note that a workaround does exist: Simply set java.io.tmpdir on the command
line to whatever is required.
-- xxxxx@xxxxx 2003/10/23
|
|
Comments
|
Submitted On 11-JAN-2008
hello guys
i also got this problem and still hanging up with no solution. may b i have to change the way, my module is working . . .
and they say, Closed, not a bug : (
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |