Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Created by: null on 21-12-2005 07:42:45 PM In a custom Audium action I'm trying to execute the following code in order to get an InputStream from a file that I've placed in the java/application/classes folder:
No matter what I seem to do I'm getting a null exception when I try to access that InputStream. Am I grabbing the right classloader from my app?
Subject: RE: ClassLoader Issues? Replied by: Vance Vagell on 21-12-2005 10:52:57 PM Hi Rich,
The Audium Java API includes a mechanism by which to resolve the path of files such as your XML file, without having to hard-code a path. We recommend that you use the getApplicationDirectory() method of the APIBase class, which will return your application's actual path, such as:
/usr/local/Audium/applications/MyApp/
Using this approach, you could store your XML file in the data/misc folder, which is the intended location for such assets. For additional information about this method, please refer to the Audium Java API Javadocs.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: