Is there any possible to open a file using java code in eclipse,the file that are availabe in pc ? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 2

Is there any possible to open a file using java code in eclipse,the file that are availabe in pc ?

28th Dec 2016, 5:46 AM
Alaghusooriya EM
Alaghusooriya EM - avatar
2 Respuestas
+ 1
create a thread and inside that thread write this if (Desktop.isDesktopSupported()) { Desktop.getDesktop().open(file); }
28th Dec 2016, 9:07 AM
Uran Kajtazaj
Uran Kajtazaj - avatar
0
Not sure to understand what you want. But in Java 1.7 they change the implementation of the management of the file. You can do every thing with the NIO 2 library.
28th Dec 2016, 9:09 AM
Florian Castelain
Florian Castelain - avatar