From 1fb5bff3ef44e015ac9cc2db89f58b7f42f1448e Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 20 Sep 2022 16:18:17 +0200 Subject: [PATCH] Actualizado el codigo para llamar al metodo y crear el fichero en windows con la ruta seleccionada --- bin/dam/daw/com/es/HolaFichero.class | Bin 1867 -> 1900 bytes src/dam/daw/com/es/HolaFichero.java | 9 +++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/dam/daw/com/es/HolaFichero.class b/bin/dam/daw/com/es/HolaFichero.class index c9bb328a9bac1252c0dc8a13ec40682a7565bd8b..cbc21d0ed95fb7a51ecda6fa4b3cd24bea2ff1e1 100644 GIT binary patch delta 1037 zcmZvZO;b`~6vzJ$7vzFhVjwgD5d{@QK<&j8-%-j$%1lwC7s8v~QgFDaY#P=rox5|U znRad3)PkI9`T(_R(+6nXM`*J1fSb~}bDy{KfBxrpp7YJ}%VPfe=i?UuW7s@2f44H2 zXUjQxx1<#Esu348CN%raU}%=mf=djh1!YN5OY%;ZK?nrnCOF|X!gYA!5Zd6;TA0`5 zMW+!R40f%9*$onW@N28Ap9Qp+taHeVUVao}a0HUivisTSb~e8mT`Coo{AMh;A|lLS zEU1xuc1JdoeN;j}2DG1Sm|fP~I#0!ms}inp2g5F1Dw%N|BSs7}SpWBv5W^@#LvAZu zoGLNs19QQ+h;fF-w36Q_9H`##xR)0=DPamCgDqZ^3kfB+B^L{)5)pAKJgMaO%3Q4- z>81q{^O{reRTdbeT2iGDO(@&4h}#U&_(*11m5XZTxxBCBGc$$U-j19vshP9pky4oo zNMccf5h1=>l5h{p1TB~8rPbOyuk%1!!YU6m<%)8)B&XzqL_;m*y7pN}u}4~?zJq18 zu-?aV+M@o*uY-+RtEcMhFwyEJbo2qzF&v}s(dw$AT{9TED_!WW2}KytKyr~co236< z|3N2u(#=>WV%GGiH91Beww@}2w!ULTQhYa9#g(v7#gOYY?EGMi4qUNgOuRu8-%r!t z9do`V9|01LBd}<%455mXy6DCv+AxiFG*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#o7U_-9TJpvF zk?~5rQH6M!?Eb{#r}6A-tYs%ou<;Xgem1w2cbi_NYd~hu2Xd1sZ;{GvLcT+&qZlC# z)vrL~Q3U;plj2i6V_5}`ZGVeljW+y96~!P$`0%BB<&2 OfZA;dDo>Ch6#fHW?1Se3 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(); }