This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes  error in opening zip file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark " error in opening zip file" Watch " error in opening zip file" New topic
Author

error in opening zip file

Amirtharaj Chinnaraj
Ranch Hand

Joined: Sep 28, 2006
Posts: 236
hi guys

i tried to load a properties file form

classpath using classloader

by using the following code


import java.net.URI;

class prop
{
public static void main(String as[])
{

try{

ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
URI path= (classLoader.getResource("test.properties").toURI());
System.out.println( " path: " + path );
}

catch(Exception ex)
{
System.out.println("erro " +ex) ;

}

}


}

but i end up in error
like. i have set the classapath properly
error: error reading D:\properties\test.properties; error in opening zip file

regards
amir
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error in opening zip file
 
Similar Threads
Trying to add key-value dynamically by using Properties Object
accessing a file from a servlet
How to set the location of the property file in the class path
How to read properties file?
Including property file in the jar