Article View: borland.public.jbuilder.java.api
Article #615Java Security
From: John McGrath [TeamB]
Date: Fri, 23 May 2003 16:14
Date: Fri, 23 May 2003 16:14
24 lines
1885 bytes
1885 bytes
I am having a problem with security in Java 1.4. I have an application that is loaded from two different JAR files (Main and Library). Both load resources from within their own JAR file using the Class getResourceAsStream() method. If I do not install a SecurityManager, the resources load properly. But when I install an RMISecurityManager, the code in the Library JAR file fails to load the resources - getResourceAsStream() returns null. According to the "Java Security Architecture" (http://java.sun.com /j2se/1.3/docs/guide/security/spec/security-spec.doc3.html): code always automatically has permission to read files from its same (URL) location, and subdirectories of that location; it does not need explicit permission to do so. I thought this means code should always be able to load a resource from its own JAR file. Did I miss something here? -- Regards John McGrath [TeamB]
Technical Details
Message-ID:
<3ece48ee$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsfeed.news2me.com!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,462ca4d244c4f446,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2003-05-23 09:24:27 PST From: "John McGrath [TeamB]" <ng-b@JPMcGrath.net> Sender: "John McGrath [TeamB]" <ng-b@JPMcGrath.net> Reply-To: "John McGrath [TeamB]" <ng-b@JPMcGrath.net> Subject: Java Security Newsgroups: borland.public.jbuilder.java.api X-User-Info: 66.92.125.163 66.92.125.163 X-Forwarded-For: 172.16.0.165 NNTP-Posting-Host: 207.105.83.65 Message-ID: <3ece48ee$1@newsgroups.borland.com> Date: 23 May 2003 09:14:38 -0700 X-Trace: newsgroups.borland.com 1053706478 207.105.83.65 (23 May 2003 09:14:38 -0700) Lines: 25 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsfeed.news2me.com!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mail