6 Replies Latest reply on Oct 25, 2007 10:42 PM by Kauê Felipe

    Application path

    Kauê Felipe Newbie

      I´m trying to save one file in my app.

      I do this:


      How can i get the real

      File arq = new File("test.txt");
      FileWriter writer;
      try {
       writer = new FileWriter(arq, true);
       PrintWriter saida = new PrintWriter(writer, true);
       saida.println(texto);
       saida.close();
       writer.close();
      } catch (IOException e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
      }
      


      But this code save my file under .\rhdevstudio\jboss-eap\jboss-as\bin\test.txt

      What do i have to do to save this under my app root?
      This is the root of app:
      rhdevstudio\jboss-eap\jboss-as\server\default\deploy\FolcloreBrasileiro.ear\ (folder)