datsun$ cat url4.java
import java.net.*;
public class url4 {
public static void main(String args[]) {
try {
URL u = new URL(new URL(args[0]), args[1]);
System.out.println("URL: " + u.toString());
} catch (Exception e) {
System.out.println(e);
}
}
}
datsun$ /usr/local/java/jdk1.2/solaris/bin/java url4 file:/x/y/z a
URL: file:/x/y/a
datsun$ /usr/local/java/jdk1.1.6/solaris/bin/java url4 file:/x/y/z a
URL: file:/x/y/a
datsun$ /usr/local/java/jdk1.2/solaris/bin/java url4 file:/x/y/z ../../a
URL: file:/x/y//a
datsun$ /usr/local/java/jdk1.1.6/solaris/bin/java url4 file:/x/y/z ../../a
URL: file:/a
datsun$ /usr/local/java/jdk1.2/solaris/bin/java url4 file:/x/y/z ../a
URL: file:/x/y/../a
datsun$ /usr/local/java/jdk1.1.6/solaris/bin/java url4 file:/x/y/z ../a
URL: file:/x/a
Note how all the cases involving .. are handled quite differently from 1.1.6.
This is preventing HotJava Views from working on JDK 1.2.
import java.net.*;
public class url4 {
public static void main(String args[]) {
try {
URL u = new URL(new URL(args[0]), args[1]);
System.out.println("URL: " + u.toString());
} catch (Exception e) {
System.out.println(e);
}
}
}
datsun$ /usr/local/java/jdk1.2/solaris/bin/java url4 file:/x/y/z a
URL: file:/x/y/a
datsun$ /usr/local/java/jdk1.1.6/solaris/bin/java url4 file:/x/y/z a
URL: file:/x/y/a
datsun$ /usr/local/java/jdk1.2/solaris/bin/java url4 file:/x/y/z ../../a
URL: file:/x/y//a
datsun$ /usr/local/java/jdk1.1.6/solaris/bin/java url4 file:/x/y/z ../../a
URL: file:/a
datsun$ /usr/local/java/jdk1.2/solaris/bin/java url4 file:/x/y/z ../a
URL: file:/x/y/../a
datsun$ /usr/local/java/jdk1.1.6/solaris/bin/java url4 file:/x/y/z ../a
URL: file:/x/a
Note how all the cases involving .. are handled quite differently from 1.1.6.
This is preventing HotJava Views from working on JDK 1.2.
- duplicates
-
JDK-4134229 Downloaded extensions unable to access "Main-Class" attribute in manifest file.
-
- Closed
-
-
JDK-4134639 java -jar T3.jar does not find classes listed in Class-Path manifest attribute
-
- Closed
-