Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 93869 invoked from network); 5 Feb 2006 22:17:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Feb 2006 22:17:39 -0000 Received: (qmail 42097 invoked by uid 500); 5 Feb 2006 22:17:36 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 42038 invoked by uid 500); 5 Feb 2006 22:17:36 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 42027 invoked by uid 99); 5 Feb 2006 22:17:36 -0000 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=MAILTO_TO_SPAM_ADDR,NO_REAL_NAME,UPPERCASE_25_50 X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Feb 2006 14:17:36 -0800 Received: by ajax.apache.org (Postfix, from userid 99) id 56DCFCB; Sun, 5 Feb 2006 23:17:14 +0100 (CET) From: bugzilla@apache.org To: commons-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 38523] New: - Find file in classpath Message-ID: X-Bugzilla-Reason: AssignedTo Date: Sun, 5 Feb 2006 23:17:14 +0100 (CET) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=38523 Summary: Find file in classpath Product: Commons Version: 1.1 Final Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: IO AssignedTo: commons-dev@jakarta.apache.org ReportedBy: achepati67@yahoo.es Just to suggest adding a method like this: public File findFileInClasspath(String fileName) throws FileNotFoundException { URL url = getClass().getClassLoader().getResource(fileName); if (url == null){ throw new FileNotFoundException(fileName); } return new File(url.getFile()); } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org