We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › open() with arguments does not work under windows
Page Index Toggle Pages: 1
open() with arguments does not work under windows? (Read 572 times)
open() with arguments does not work under windows?
Jul 23rd, 2009, 1:30am
 
I seem to have a hard time using open().

the reference is very vague..
it has example for mac and linux, but nothing for windows.

I tried..

Code:
String[] params = { "notepad.exe" };
open(params);

for testing, and that works. However, as soon as I use another one with arguments, it doesnt work.

Code:
String[] params = { "ccrypt.exe","-e -K 'password' -f 'filetoencrypt.txt' };
open(params);


I know the arguments and everything is good because I test it in command-prompt before putting it in the code.

When I do that, nothing happens. Is there an alternative way to either:
a) open an external program or..
b) AES encrypt a .txt file?

thank you.
Re: open() with arguments does not work under windows?
Reply #1 - Jul 23rd, 2009, 1:38am
 
Should be:
Code:
String[] params = { "ccrypt.exe", "-e",  "-K",  "'password'", "-f", "'filetoencrypt.txt'" };
open(params);

Each parameter is an array entry.
AES encryption: there is surely a Java library (or more) for that... I would look, for example, in the BouncyCastle.org site.
Page Index Toggle Pages: 1