A voir également:
- Classe java pour ouvrir un fichier texte
- Comment ouvrir un fichier epub ? - Guide
- Comment ouvrir un fichier bin ? - Guide
- Ouvrir un fichier .dat - Guide
- Comment ouvrir un fichier docx ? - Guide
- Waptrick java football - Télécharger - Jeux vidéo
5 réponses
package java.io
tu peux voir
ici
http://www.liafa.jussieu.fr/~yunes/Java/es/
ou ici
https://anisfrikha.developpez.com/tutoriel/java-io/
tu peux voir
ici
http://www.liafa.jussieu.fr/~yunes/Java/es/
ou ici
https://anisfrikha.developpez.com/tutoriel/java-io/
merci slim mais le code devrait me permettre d'ouvrir un fichier à partir d'un répertoire non pas d'afficher son continu par exemple en lui indiquant c:\fichier.txt le fichier texte fichier.txt s'ouvre
tu peux essayer cela
Process p = Runtime.getRuntime().exec("notepad.exe c:\\temp\\test.txt");//mon fichier s'appelle test.txt
@+
Process p = Runtime.getRuntime().exec("notepad.exe c:\\temp\\test.txt");//mon fichier s'appelle test.txt
@+
salut,
import java.io.IOException;
public class Main {
public static void main(String[]args) throws IOException{
Ouvrir ov=new Ouvrir("notepad.exe","c:\\temp\\test.txt");
ov.launchExe();
}
}
class Ouvrir
{
String path;
String Exe;
public Ouvrir(String Exe,String Path)
{
this.path=Path;
this.Exe=Exe;
}
public void launchExe() throws IOException
{
Runtime.getRuntime().exec(Exe+" "+path);
}
}
J'espere ca pourra t'aider!!
@+
import java.io.IOException;
public class Main {
public static void main(String[]args) throws IOException{
Ouvrir ov=new Ouvrir("notepad.exe","c:\\temp\\test.txt");
ov.launchExe();
}
}
class Ouvrir
{
String path;
String Exe;
public Ouvrir(String Exe,String Path)
{
this.path=Path;
this.Exe=Exe;
}
public void launchExe() throws IOException
{
Runtime.getRuntime().exec(Exe+" "+path);
}
}
J'espere ca pourra t'aider!!
@+
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question