diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-08-12 12:23:02 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-08-12 12:23:02 +0000 |
commit | 70c28e23becea744c43ba07e2d1b68f2e5382ef0 (patch) | |
tree | 40bf55e945f60218c84ec1b6c8c65f86879aafd6 /javaunohelper/com/sun/star/comp | |
parent | ce35cc05020021dabbd887549e09772ee6e7d4aa (diff) |
INTEGRATION: CWS tbe12 (1.3.2); FILE MERGED
2004/07/30 15:05:02 tbe 1.3.2.1: #i32348# empty component context in bootstrap function
Diffstat (limited to 'javaunohelper/com/sun/star/comp')
-rw-r--r-- | javaunohelper/com/sun/star/comp/helper/UnoInfo.java | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/javaunohelper/com/sun/star/comp/helper/UnoInfo.java b/javaunohelper/com/sun/star/comp/helper/UnoInfo.java index a9b693303..8140ea284 100644 --- a/javaunohelper/com/sun/star/comp/helper/UnoInfo.java +++ b/javaunohelper/com/sun/star/comp/helper/UnoInfo.java @@ -2,9 +2,9 @@ * * $RCSfile: UnoInfo.java,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: rt $ $Date: 2004-07-23 15:15:51 $ + * last change: $Author: obo $ $Date: 2004-08-12 13:23:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,33 +81,35 @@ public final class UnoInfo { * @return the UNO jar files */ public static URL[] getJars() { - - final String JUHJAR = "juh.jar"; + + final String JUHJAR = "/juh.jar"; String[] jarFileNames = new String[] { "jurt.jar", "unoil.jar", "ridl.jar", - "juh.jar", - "unoinfo.jar" }; + "juh.jar" }; URL[] jars = new URL[jarFileNames.length]; URLClassLoader cl = (URLClassLoader) UnoInfo.class.getClassLoader(); URL[] urls = cl.getURLs(); for ( int i = 0; i < urls.length; i++ ) { String url = urls[i].toString(); - int index = url.indexOf( JUHJAR ); - if ( index >= 0 ) { - String base = url.substring( 0, index ); - for ( int j = 0; j < jarFileNames.length; j++ ) { - try { - jars[j] = new URL( base + jarFileNames[j] ); - } catch ( MalformedURLException e ) { - return null; - } + if ( url.endsWith( JUHJAR ) ) + { + int index = url.lastIndexOf( JUHJAR ); + if ( index >= 0 ) { + String base = url.substring( 0, index + 1 ); + for ( int j = 0; j < jarFileNames.length; j++ ) { + try { + jars[j] = new URL( base + jarFileNames[j] ); + } catch ( MalformedURLException e ) { + return null; + } + } + break; } - break; - } + } } return jars; |