Added the Add Bookmark toolbar item to the default toolbar. Refs #8772
[adiumx.git] / Source / JavaCocoaAdapter.java
blobc72ce3a1cf5f69c01b4e1bbdbd3035cad033f6a9
1 //
2 // JavaCocoaAdapter.java
3 // Adium
4 //
5 // Created by Andreas Monitzer on 2006-08-01.
6 // Copyright 2006 Andreas Monitzer. All rights reserved.
7 //
9 package net.adium;
11 import java.net.URLClassLoader;
12 import java.net.URL;
13 import java.util.Vector;
14 import java.io.File;
16 public class JavaCocoaAdapter {
17 public static ClassLoader classLoader(Vector jars, ClassLoader parent) { // Vector of String file paths
18 System.err.println(jars.toString());
20 // convert vector of strings to array of URLs
22 URL[] urls = new URL[jars.size()];
24 try {
25 int i;
26 for(i = 0; i < jars.size(); i++)
27 urls[i] = new File((String)jars.elementAt(i)).toURI().toURL();
28 } catch(java.net.MalformedURLException e) {
29 e.printStackTrace();
30 return null;
33 return URLClassLoader.newInstance(urls,(parent != null)?parent:ClassLoader.getSystemClassLoader());