learn java
The moose likes JSP and the fly likes read jar from c: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "read jar from c:" Watch "read jar from c:" New topic

read jar from c:

Gopi Rajesh

Joined: Dec 09, 2003
Posts: 6
Hi all,
I am new to jsp. I use jbuilder for my swing application. In Jbuilder, required libraries, I specified c:\program files\open office \ xx.jar.
Its working.
In jsp I want to read the .jar file from the path c:\program files\open office\ xx.jar. I dont know how to read jar from c:.

Please help me regarding this.

Thanks in advance

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 62317

In a web application you customarily place the jar files either in the servlet container's library folder (for jars that will be shared across multiple web apps) or the WEB-INF/lib folder of your web app.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Gopi Rajesh

Joined: Dec 09, 2003
Posts: 6
Hi Bear,

you are right. But my program will run when it reads jar files from c:\program files\open office\ xx.jar. I tried to put all my required open office jar in web-inf\lib folder.

I am getting the error like this

java.security.AccessControlException: access denied (java.util.PropertyPermission user.name read)

at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)

at java.lang.System.getProperty(Unknown Source)

at com.sun.star.beans.LocalOfficeConnection.<init>(LocalOfficeConnection.java:133)

at Document.OpenOfficeViewletPane.initialise_Office(OpenOfficeViewletPane.java:195)

at Document.OpenOfficeViewletPane.<init>(OpenOfficeViewletPane.java:59)

at Document.DocumentViewlet.createWriterBlankDoc(DocumentViewlet.java:411)

at Document.DocumentViewlet.displayDocument(DocumentViewlet.java:310)

at Document.DocumentViewlet.displayData(DocumentViewlet.java:261)

at Document.DocumentViewlet.displayViewlet(DocumentViewlet.java:252)

at Document.DocumentDesigner.createNestedComponent(DocumentDesigner.java:158)

at Document.DocumentDesigner.setNonVisualRecord(DocumentDesigner.java:57)

at GUI.Graph.NestedGraphlet.displaySimpleComponents(NestedGraphlet.java:307)

at GUI.Graphlet.uponRecordsRetreival(Graphlet.java:699)

at GUI.Graphlet.prodDataAvailable(Graphlet.java:651)

at GUI.Graph.NestedGraphlet.prodDataAvailable(NestedGraphlet.java:387)

at BL.GuiProDataAvailableNotifier.run(GuiProDataAvailableNotifier.java:99)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

This is my problem. Anyway Thanks a lot for your response.


Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823

That doesn't look like a problem with the JAR. It's telling you that you don't have permission to access the user.name system property. Is this at the client or server side? It's likely that a setting in your policy file is restricting access.

Gopi Rajesh

Joined: Dec 09, 2003
Posts: 6
Thanks for your response. This is my problem. How do I give permission to enable this option.

Thanks in advance

I agree. Here's the link: http://aspose.com/file-tools
subject: read jar from c: