🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.api
3 messages
3 total messages Started by John McGrath [TeamB] Fri, 23 May 2003 16:14
Java Security
#615
Author: John McGrath [TeamB]
Date: Fri, 23 May 2003 16:14
24 lines
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]
Re: Java Security
#616
Author: Rich Wilkman
Date: Fri, 23 May 2003 17:52
32 lines
2259 bytes
John:

Does it work if you've got those resources naked?  I remember having 
problems with URL handling with an HTTPS app -- it just didn't like the 
special format indicating that the data came from a jar file.

-Rich

John McGrath [TeamB] wrote:

>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?
>
>  
>
Re: Java Security
#623
Author: John McGrath TeamB
Date: Wed, 28 May 2003 00:56
18 lines
1545 bytes
On Fri, 23 May 2003 10:52:39 -0700, Rich Wilkman wrote:

> Does it work if you've got those resources naked?  I remember 
> having problems with URL handling with an HTTPS app -- it just
> didn't like the special format indicating that the data came
> from a jar file.

No.  It did not matter whether I was loading the resource from a JAR 
file or from a directory tree.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads