• Post Reply Bookmark Topic Watch Topic
  • New Topic

File permissions and Process.exec()

 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've got a batch processing task running on a timer as part of my J2EE application on WebLogic 8.1 and I'm experiencing problems with invoking Process#exec().

To be more accurate, this is what I'm trying to do:


Now, this piece of code works perfectly when run manually ("java Move foo.txt bar.txt") but when it's run within the J2EE application -- as the same user as in the manual case -- the file's won't get moved anywhere.

I suppose it's a permission/policy issue. If that's the case, how should I edit the policy file?

I already tried to add the following lines to weblogic.policy:

...but that didn't seem to help at all.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FYI, the problem went away once I read the stderr and stdout streams from the Process. Any idea why this works?
 
Guy Belpa
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lasse Koskela wrote:FYI, the problem went away once I read the stderr and stdout streams from the Process. Any idea why this works?


how did you do that?
please explain. Thanks in advance.
 
Do not set lab on fire. Or this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!