The Artima Developer Community
Sponsored Link

Java Answers Forum
Exception while trying to read a file from applets

1 reply on 1 page. Most recent reply: Mar 19, 2002 9:08 PM by Elvia

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Elvia

Posts: 3
Nickname: helvia
Registered: Mar, 2002

Exception while trying to read a file from applets Posted: Mar 19, 2002 6:23 PM
Reply to this message Reply
Advertisement
Hi everybody

I'm programming a system with an applet. I need to read a text file from the applet and I have this exception:

Exception occurred during event dispatching:
com.ms.lang.VerifyErrorEx: controlador.Leer: recursive jsr
at controlador.validar
at interfaz.Validar
at interfaz.actionPerformed

Controlador is the class where I have the method Leer (reading the file from an URL).

This is the Method that I think it has problems:

public Vector Leer(String arch){
URL archivoP;
String registro;
InputStreamReader isr;
BufferedReader lector;
StringTokenizer tok;

Vector archivo = new Vector();

try{
archivoP = new URL("http://vigia.ens.uabc.mx/~al304371/proyectos/poo/" + arch);

isr = new InputStreamReader(archivoP.openStream());
lector = new BufferedReader(isr);
lector.readLine(); //Menu del archivo.
registro = lector.readLine();
archivo.addElement(registro);
lector.close();

}catch(Exception e){
System.out.println("Fallo en lectura :"+ e.toString());
}finally{
return(archivo);
}
}

If you know what's the problem I'll appreciate a lot your replies.

Thank you!

Elvia


Elvia

Posts: 3
Nickname: helvia
Registered: Mar, 2002

Re: Exception while trying to read a file from applets Posted: Mar 19, 2002 9:08 PM
Reply to this message Reply
Hi, This is me again.

My friend Julio who also is member of this Forum (jfonseca) and my CS classmate helped me to solve the problem :).

It was a problem caused by the security of the JVM of the first server where I implemented my applet.

So, we moved the applet to a different server and it worked. Then we realized that it was a server JVM's problem.

Thank you!

Elvia

Flat View: This topic has 1 reply on 1 page
Topic: Passing data in a program with GUI, HOW ? Previous Topic   Next Topic Topic: urgent help needed please

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use