0

appletviewer show correctly if within a class in jar file there is the following expression:

File objectFile = new File("configurationfile.dat");

Running with a browser there is an error. I changed to

File objectFile = new File("\\\\mypc:8080/mymavenapp","configurationfile.dat");

and success the same. Running with appletviewer DOS windows show the following message:

\\mypc:8080\mymavenapp\configurationfile.dat (No se ha encontrado la ruta de acceso de la red)
Roman C
  • 49,761
  • 33
  • 66
  • 176
Juanjo Conti
  • 28,823
  • 42
  • 111
  • 133

1 Answers1

1

I put the file at the same package of the class and changed the following:

objectFile = new File((new URI("file:C:/users/user/documents/NetBeansProjects/mavenHMI2/archivConfHMI.dat")));
                    fileInputStream = new FileInputStream(objectFile);
            objectInputStream = new ObjectInputStream(fileInputStream);

by:

InputStream is = getClass().getResourceAsStream("archivConfHMI.dat"); 
                    objectInputStream = new ObjectInputStream(is);          
Julius Vainora
  • 47,421
  • 9
  • 90
  • 102