Running javac from a servlet

I'm using a servlet to collect information from a user via the web, and then putting that data into a .java file. The files are stored in /webapps/root/temp.

The files get written properly, but when I use Runtime.exec to call javac to compile the files that are in the temp folder, I get an error:

error: cannot read: /nfs/home/l/g/blah/cscie259/projectF-7.0/webapps/ROOT/temp/*.java

1 error

I have tried all combinations of permissions for the temp folder - it's currently set to rwx for ugo, as are all the *.java files inside the directory, but that hasn't made a difference.

When I navigate into the /temp directory I can run

javac *.java

without any problems. Does anyone have any ideas as to why I can't compile from the servlet?

The servlet worked fine on a WindowsXP box; the above problems are happening on a Unix box.

Thanks,

Louise

[915 byte] By [weezeegeea] at [2007-11-27 7:28:48]
# 1
most likely tomcat is running as a different user than you are. You have the rights to make changes to that directory, but tomcat does not.
gimbal2a at 2007-7-12 19:08:56 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...