Skip to main content
Question

How to read and write files in Groovy/java ?


Hi Team,

I am not able to read and write flies in groovy scripter and groovy evaluator as opening local files in java/groovy when being run in a browser is forbidden. which processor allows me to read/write files? 

Can anyone help me through this please.

Pradeep
StreamSets Employee
Forum|alt.badge.img+1
  • StreamSets Employee
  • July 21, 2022

Hi @priya,

What exactly do you mean by opening local files in java/groovy when being run in a browser is forbidden? Did you try reading locally hosted files using groovy processor? Are you facing any error? You might also want to look at processing using jython processor.


  • Fan
  • July 21, 2022

Yes, i tried reading locally hosted files using groovy processor and i am getting error as  (java.security.AccessControlException:access denied(“java.io.FilePermission”) .

My requirement is to read and join the files in groovy processor. 


wilsonshamim
StreamSets Employee
Forum|alt.badge.img+1

Reply