-
1. Re: lib/*.jar sort issue exploded.ear vs compiled.ear on Linux not OSX
jaikiran Jun 21, 2010 7:16 AM (in response to pucky)Which version of JBoss AS is this? And which version/vendor of Java?
-
2. Re: lib/*.jar sort issue exploded.ear vs compiled.ear on Linux not OSX
pucky Jun 21, 2010 3:27 PM (in response to jaikiran)sorry about that, totally forgot to mention the versions.
LINUX: (CENTOS 5.4 FINAL)
JBoss 4.2.2.GA
Sun JDK 1.6.0_20
OSX: (OSX 10.6.3)
Apple's JDK 1.6.0_20
exact same JBoss instance JBoss 4.2.2.GA
it's very interesting, I've done some searching and haven't found anything regarding this kind of issue.
Cheers,
Pucky
-
3. Re: lib/*.jar sort issue exploded.ear vs compiled.ear on Linux not OSX
pucky Jun 21, 2010 9:10 PM (in response to jaikiran)I've run the following on OSX and Linux.
When run on the linux system it's output matches the order of the RepositoryClassLoader "add url" in the -exploded.ear deployment scenario. There for it looks like this is related to the File.list() implementation on each OS and therefore The RepositoryClassLoader should implement a specific Comparator so that the it would work the same on each OS. Do you agree?
public class DirectoryListing { public static void main(String[] args){ if(args.length == 1) { File directory = new File(args[0]); String[] fileNameArray = directory.list(); if(fileNameArray != null){ for(int i = 0; i < fileNameArray.length; i++){ String fileName = fileNameArray[i]; System.out.println(fileName); } } } else { System.out.println("you need to pass the directory path to list."); } } }