come stai provando ad accedere al testo!? posta il codice.
Per esempio, questo è un sistema che funziona:
codice:
import java.net.*;
import java.io.*;
import java.awt.*;
import java.applet.*;
public class readFileApplet extends Applet {
public TextArea showFile;
public void init() {
try {
InputStream in = (new URL(this.getCodeBase().toString() +
"/commands.txt")).openStream();
int c;
//String name ="";
byte[] b= new byte[in.available()];
in.read(b);
String name = new String(b);
showFile = new TextArea(name, 40, 40);
this.add(showFile);
showFile.setVisible(true);
}
catch (Exception e) {System.out.println(e.toString());
}
}
}
può non essere il massimo in quanto a prestazioni, però svolge il suo lavoro.