M
Matt
I need to know how to get the path of current Java file directory.
I have the Java servlet to produce text file, and it produces to C:\hello.txt,
but I want to output in the current directory as the Java File:
i.e. C:\jakarta-tomcat-4.1.30\webapps\proj1\WEB-INF\classes
try
{
PrintWriter out = new PrintWriter(new FileWriter("hello.txt"));
out.println("HELLO");
out.close();
}
catch(IOException e)
{
}
any ideas?? Thanks!!
I have the Java servlet to produce text file, and it produces to C:\hello.txt,
but I want to output in the current directory as the Java File:
i.e. C:\jakarta-tomcat-4.1.30\webapps\proj1\WEB-INF\classes
try
{
PrintWriter out = new PrintWriter(new FileWriter("hello.txt"));
out.println("HELLO");
out.close();
}
catch(IOException e)
{
}
any ideas?? Thanks!!