Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help with applet

Status
Not open for further replies.

luciddream

Programmer
Nov 8, 2000
712
US
i have the following code:

import java.net.*;
import java.io.*;
import java.applet.*;
import java.awt.*;

public class IOStreamap extends Applet{
String inputLine;
public void Init(String[] args) throws Exception {
URL streamer = new URL(" BufferedReader in = new BufferedReader(
new InputStreamReader(
streamer.openStream()));

while ((inputLine = in.readLine()) != null)
inputLine += inputLine;

in.close();

}
public String getLine() {
return inputLine;
}
}


it worked fine before i turned it into an applet, but now it doesn't seem to work. if anyone sees anything wrong with it, it'd greatly appreciate the help.
 
Maybe an applet security violation. The (back) connection is enabled only with that server from the applet was downloaded.
Your applet should work fine if the applet's host is too.

Bye, Otto.
 
it resides in the same directory as the perl script, but when i call the getLine() method, it returns null.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top