Re: Reading the manifest file

2010-05-03 Thread Laurent PETIT
Ralph, Using the Class.forName alone will not suffice, you'll also have to AOT compile your code, I guess. OSGi environments like Eclipse or other OSGi containers will more and more separate things into "bundle" class loaders, and in this context using JVM wide utilities or the context classloade

Re: Reading the manifest file

2010-05-03 Thread Stuart Sierra
On May 3, 11:16 am, Ralph wrote: > Yes, but I don't believe that it guarantees that you will get the > manifest for the enclosing JAR file if you have more than one. I don't think that's possible in the general sense. Application containers like OSGI may provide this functionality. -S -- You r

Re: Reading the manifest file

2010-05-03 Thread Ralph
Yes, but I don't believe that it guarantees that you will get the manifest for the enclosing JAR file if you have more than one. On May 3, 10:28 am, Nurullah Akkaya wrote: > (let [url (ClassLoader/getSystemResource "META-INF/MANIFEST.MF") >       manifest (java.util.jar.Manifest. (.openStream url

Re: Reading the manifest file

2010-05-03 Thread Nurullah Akkaya
(let [url (ClassLoader/getSystemResource "META-INF/MANIFEST.MF") manifest (java.util.jar.Manifest. (.openStream url))] (println (.entrySet (.getMainAttributes manifest ClassLoader/getSystemResource does allow you to get rid of Class/forName... -- Nurullah Akkaya http://nakkaya.com

Reading the manifest file

2010-05-03 Thread Ralph
Crossposted to StackoverFlow. How can a Clojure program find its own MANIFEST.MF (assuming it is packaged in a JAR file). I am trying to do this from my "-main" function, but I can't find a class to use in the following code: (.getValue (.. (java.util.jar.Manifest. (.openStre