harmmeijer
Programmer
I am behind a windows proxy that requires authentication.
When opening the following url and pressing "download now" I used to get the same 407 error since SUN did not support the MS authintication type used to authenticate the user (which our proxy requires and is a default setting for MS proxy).
Now version 1.4.2 (beta) does support this and after installing it I do get the dialog requesting me for the authentication info (user and password) so Yipeee.
I wrote an app that uses an URL where I get the 407 again and I don't know how to invoke the dialog asking me for the authentication info (I don't get this dialog).
Here is the code.
import java.util.*;
import java.net.*;
import java.io.*;
import java.applet.*;
import java.awt.*;
public class testURL {
public static void main(String[] args) {
//How I compile the app
//javac -verbose -bootclasspath "C:\Program Files\Java\j2re1.4.2\lib\rt.jar" testURL.java
//setting proxy when running the app
//java -DproxySet=true -DproxyHost=proxyname -DproxyPort=port testURL
URLConnection con;
int intChar = 0;
StringBuffer strbufAll = new StringBuffer();
String str = new String();
int i = 0;
java.net.URL uu;
try{
uu = new URL(" con = uu.openConnection();
con.setDoInput(true);
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
while((intChar = in.read())!=-1){
strbufAll.append((char) intChar);
}
}catch(Exception e){
e.printStackTrace();
}
System.out.print(strbufAll.toString());
}
}
Greetings, Harm Meijer
When opening the following url and pressing "download now" I used to get the same 407 error since SUN did not support the MS authintication type used to authenticate the user (which our proxy requires and is a default setting for MS proxy).
Now version 1.4.2 (beta) does support this and after installing it I do get the dialog requesting me for the authentication info (user and password) so Yipeee.
I wrote an app that uses an URL where I get the 407 again and I don't know how to invoke the dialog asking me for the authentication info (I don't get this dialog).
Here is the code.
import java.util.*;
import java.net.*;
import java.io.*;
import java.applet.*;
import java.awt.*;
public class testURL {
public static void main(String[] args) {
//How I compile the app
//javac -verbose -bootclasspath "C:\Program Files\Java\j2re1.4.2\lib\rt.jar" testURL.java
//setting proxy when running the app
//java -DproxySet=true -DproxyHost=proxyname -DproxyPort=port testURL
URLConnection con;
int intChar = 0;
StringBuffer strbufAll = new StringBuffer();
String str = new String();
int i = 0;
java.net.URL uu;
try{
uu = new URL(" con = uu.openConnection();
con.setDoInput(true);
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
while((intChar = in.read())!=-1){
strbufAll.append((char) intChar);
}
}catch(Exception e){
e.printStackTrace();
}
System.out.print(strbufAll.toString());
}
}
Greetings, Harm Meijer