diff --git a/bin/dam/daw/com/es/HolaFichero.class b/bin/dam/daw/com/es/HolaFichero.class index c9bb328..cbc21d0 100644 Binary files a/bin/dam/daw/com/es/HolaFichero.class and b/bin/dam/daw/com/es/HolaFichero.class differ diff --git a/src/dam/daw/com/es/HolaFichero.java b/src/dam/daw/com/es/HolaFichero.java index a3f10a2..265b794 100644 --- a/src/dam/daw/com/es/HolaFichero.java +++ b/src/dam/daw/com/es/HolaFichero.java @@ -6,13 +6,13 @@ public class HolaFichero { static char Sistema; - public static void main(String args[]) { + public static void main(String args[]) throws IOException { char Sistema=MiSistema(); System.out.println(Sistema); } - static char MiSistema() { + static char MiSistema() throws IOException { char Sis='?'; char Windows='W'; char Linux='L'; @@ -22,6 +22,7 @@ public class HolaFichero { if (so.charAt(0)==Windows) { System.out.print("Windows -> "); Sis=Windows; + CreoFicheroWindows(); } else { System.out.print("Linux -> "); @@ -30,9 +31,9 @@ public class HolaFichero { return Sis; } - public void CreoFicheroWindows() throws IOException { + public static void CreoFicheroWindows() throws IOException { System.out.println("Creando fichero en Windows ..."); - File fwindows = new File("G:\\ADA\\T1.Ficheros\\CreoFicheroWindows.txt"); + File fwindows = new File("C:\\Users\\kevin\\Documents\\CreoFicheroWindows.txt"); if (!fwindows.exists()) { fwindows.createNewFile(); }