Runtime.exec() question...
John Schultz <[email protected]> Mon, 22 Jul 2002 16:05:50 -0500
| Newsgroups | gmane.comp.windows.devel.java.general |
|---|---|
| Message-ID | <[email protected]> |
I'm doing something like:
Runtime.getRuntime().exec( "java -Dwhatever=\"xyz\" com.abc.AClass"
);
where com.abc.AClass reads a file. When run from the command line
or an IDE it works OK but when run from exec() I get:
java.security.AccessControlException: access denied
(java.io.FilePermission D:\DATAIO\ow\props.txt read)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java
:270)
at
java.security.AccessController.checkPermission(AccessController.java:401)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
at
java.lang.SecurityManager.checkRead(SecurityManager.java:887)
at java.io.FileInputStream.<init>(FileInputStream.java:100)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at
com.lgc.infra.middle.server.AppStatePersistenceImpl.init(AppStatePersistence
Impl.java:41)
at
com.lgc.infra.middle.server.SessionManagerImpl.<init>(SessionManagerImpl.jav
a:88)
at
com.lgc.im.dataio.db.objectserver.ResourceImpl.open(ResourceImpl.java:79)
at
com.lgc.im.dataio.core.JunctionFactoryImpl.getInputResource(JunctionFactoryI
mpl.java:146)
at
com.lgc.im.dataio.core.JunctionFactoryImpl.makeDataSelectionContents(Junctio
nFactoryImpl.java:
111)
at
com.lgc.im.dataio.core.IOJobManager.getReader(IOJobManager.java:151)
at
com.lgc.im.dataio.core.IOJobManager.runIOJob(IOJobManager.java:70)
at com.lgc.im.dataio.core.IOJobMain.main(IOJobMain.java:29)
Exception in thread "main"
_______________________________________________
John Schultz
True blue ISFJ
Systems Architect
Phone: 713-839-3034
Office: BMC 4.654A
You can read messages from the JAVA archive, unsubscribe from JAVA,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.