String Array

70 views
Skip to first unread message

p....@gmx.de

unread,
May 13, 2012, 2:01:09 PM5/13/12
to Xtend Programming Language
Hello,

I want to run a java method (e. g. Runtime::runtime.exec(String[] cmd,
String[] envp)) which needs String Arrays as parameters. How can I run
such method in xtend?

Sebastian Zarnekow

unread,
May 13, 2012, 3:22:35 PM5/13/12
to xtend...@googlegroups.com
Hi,

lists will be coerced to arrays transparently. Something like

Runtime::runtime.exec(newArrayList('cmds') as String[], newArrayList('envp') as String[])

should do the trick,

Regards,
Sebastian
signature.asc
Reply all
Reply to author
Forward
0 new messages