1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
/*
// $Id: //open/util/resgen/example/source/JarTest.java#1 $
// package org.eigenbase.resgen is an i18n resource generator
// Copyright (C) 2008-2008 The Eigenbase Project
// Copyright (C) 2008-2008 Disruptive Tech
// Copyright (C) 2008-2008 LucidEra, Inc.
// All Rights Reserved.
//
// This library is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2.1 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
// License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this library; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
//
// ResGen test code.
*/
import java.lang.reflect.*;
import java.net.*;
public class JarTest {
public static void main(String [] args) throws Exception {
URL [] urls = new URL[1];
urls[0] = new URL(args[0]);
URLClassLoader classLoader = new URLClassLoader(urls);
Class c = classLoader.loadClass("Birthday");
Method m = c.getMethod("runTest", new Class[0]);
m.invoke(null, new Object[0]);
}
}
// End JarTest.java
|