Runtime.getRuntime().exec() problem

Hi all,

I am facing a unique problem using Runtime. I am using j2sdk1.4.2 , Win XP.

In my Java application, using exec(), I am executing an executable file to genrate an output in a text file.

With user login who has admin rights.

If I execute the executable file from my Java application, the file is generated and also if I manually double click the executable file the text file is generated.

But the problem arises when I login to XP system , with different username and different access level.

From my Java application, the text file is blank when the executable file is executed. But if I manually double click the executable file the text file is generated.

So what could be the problem ? Is there any permission problem ?

The major problem is that, it is part of my project I am doing and the clinet is facing the problem. One more thing :- My application runs for the client only when the system login name is "administrator". He is not able to run the application with different username who are in admin group . Weird !!!

But when I did the testing in my system, I tried with different login name, different access levels..

I did'nt come across this type of situation.

How can I resolve this problem ? Is JRE needs some permissions to execute the exe file in client's system?

Help is greatly appreciated..

Thanks in advance...

Regards,

Jay.

[1453 byte] By [jay786] at [2007-9-30 18:48:56]
# 1

Hi Jay,

Are you using a Java application or an Applet? If applet, you need to provide the permissions in the Java policy. You can use the policytool to set the permissions.

If you are using it as an application, then the only problem could be with permissions. The user should be in Administrator group or Super user. I am not aware of any other permission levels that can be given.

Regards,

Chandra

bschandramohan at 2007-7-6 21:06:07 > top of Java-index,Administration Tools,Sun Connection...
# 2

Hi,

Thanks a lot for the reply.

I am using an Java application. Actually mine is an Java application that uses USB Flash drive. The problem was USB drive not getting detected when there are mapped network drives.. That was the problem the client was having.. So the problem was that when in administrator login, there were no Mapped Drives and the application was running. Came to know about it latter..

Any how thanks for the reply..

Regards,

Jay.

jay786 at 2007-7-6 21:06:07 > top of Java-index,Administration Tools,Sun Connection...