ya this is the ONLY java based solution you could get. Writing JNI for this small functionality is not going to be production considering the fact that JNI is prone to a lot of errors. --Shankar
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 02, 2002 8:31 AM To: JDJList Subject: [jdjlist] Re: getting file permissions using Java I would suppose you can execute the "ls -l install_dir/bin/sqlplus" command through the Runtime (which returns you a Process object) and scrape the permissions from the Process InputStream. Not very elegant, but should work. Stan -----Original Message----- From: Jenny Dang [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 7:13 PM To: JDJList Subject: [jdjlist] Re: getting file permissions using Java Hi RamaKrishna, Since this is OS specific, I would suggest you use JNI for that matter (ie, write some C code and interface it to Java) Just my 2 cents. Maybe others have better suggestion. Jenny --- Ramakrishna Kuppa <[EMAIL PROTECTED]> wrote: > Is there anyway for me to get the permissions for a > file using Java? The OS > is Solaris. > > For instance, say, you have installed the complete > Oracle DB on your Solaris > 2.8 OS system. We know then, that there is this > sqlplus executable file > under install_dir/bin directory. Now, I would like > to get the file > permissions (read, write and execute) for the user, > group AND others for > that file. How can I get that info. (in total 9 > pieces) using Java? > > Thanks > > > > To change your membership options, refer to: > http://www.sys-con.com/java/list.cfm > __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com To change your membership options, refer to: http://www.sys-con.com/java/list.cfm To change your membership options, refer to: http://www.sys-con.com/java/list.cfm To change your membership options, refer to: http://www.sys-con.com/java/list.cfm
