-
In the current release 0.96 the methods
MainClass.getPackage().getImplementationTitle()
MainClass.getPackage().getImplementationVendor()
MainClass.getPackage().getImplementationVersion()
etc. do not return the information from main/main.jar correctly. Also all other jars loaded from lib do not correctly return the information contained in the jar file.
I have attached a patched version from...
2009-11-07 13:15:47 UTC by nklose08
-
Problem is in JarClassLoader, it's "protected void loadByteCode(InputStream is, String jar, String tmp, Manifest man) throws IOException" method ignore directories, which Spring's component scan tries to find via call to "public Enumeration findResources(String name) throws IOException".
2009-10-22 12:47:57 UTC by sslavic
-
I found the solution - the class was in the classpath twice - what else could it have been. :-)
This happens when you are debugging projects from colleagues...
Eddie.
2009-09-22 09:54:35 UTC by eddie07
-
Hi,
I am trying to use one-jar for a new project (this is not the first time I am using it).
After packaging everything I am able to start my application but I get the exception:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at...
2009-09-21 15:50:20 UTC by eddie07
-
+1.
2009-09-08 14:08:41 UTC by sslavic
-
Some elements of context: we here have a project packaged with one-jar, in which we want to be able to find external resources (on the filesystem), using either ClassLoader.getResource() or .getResourceAsStream(). The system property 'one-jar.class.path' is exactly what you needed... except that it was working for jars only, not for resources located in directories on the fs: for example, if...
2009-08-27 15:16:59 UTC by sbigaret
-
Hi again,
Hmm...was not possible for me to add a file when commenting. I have created a new tracker with id 2845432.
Regards,
Stig Kleppe-Jørgensen.
2009-08-27 08:28:28 UTC by stigj
-
Hi,
We add build information to the MANIFEST.MF (vcs id, build date, etc), so we can easily find out what code is running at a site at a given time.
To make it easy to ascertain this information, and not have to open up the jar to see it, we would like to output the content of the manifest at startup. So we made a simple class that loads all manifests like this...
2009-08-27 08:24:52 UTC by stigj
-
Hi,
I have attached a patch that will make getResources("META-INF/MANIFEST.MF") return the manifests of all jar-files in the classpath; also the ones inside the one-jar.
Regards,
Stig Kleppe-Jørgensen.
2009-08-27 07:47:40 UTC by stigj
-
Hi,
A little hack would be to do a regexp on the URL you got from getLocation(). It should have the name of the outer-jar file.
Regards,
Stig Kleppe-Jørgensen.
2009-08-26 12:36:10 UTC by stigj