[libinline-java-perl] 213/398: ok
Jonas Smedegaard
dr at jones.dk
Thu Feb 26 11:43:04 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.55
in repository libinline-java-perl.
commit 285aa41f2f654003bd4d06e24d63cb7bf0f4abe9
Author: patrick_leb <>
Date: Mon Feb 24 15:58:12 2003 +0000
ok
---
Java/ClassLoader.pm | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/Java/ClassLoader.pm b/Java/ClassLoader.pm
new file mode 100644
index 0000000..27101b8
--- /dev/null
+++ b/Java/ClassLoader.pm
@@ -0,0 +1,66 @@
+package Inline::Java::ClassLoader ;
+
+
+use strict ;
+
+$Inline::Java::ClassLoader::VERSION = '0.35' ;
+
+
+use Carp ;
+
+
+1 ;
+
+
+__DATA__
+
+
+public class InlineJavaClassLoader extends URLClassLoader {
+ private static InlineJavaClassLoader instance = null ;
+ private HashMap urls = new HashMap() ;
+
+
+ InlineJavaClassLoader(URL u){
+ super(new URL [] {u}) ;
+ instance = this ;
+ }
+
+
+ public static void AddPath(URL u){
+ if (instance.urls.get(u) != null){
+ instance.urls.put(u, "1") ;
+ instance.addURL(u) ;
+ }
+ }
+
+
+ public static void main(String[] argv) {
+ String path = argv[0] ;
+ File p = new File(path) ;
+
+ try {
+ InlineJavaClassLoader cl =
+ new InlineJavaClassLoader(p.toURL()) ;
+ Class sc = Class.forName("InlineJavaServer", true, cl) ;
+ Constructor c = sc.getConstructor(
+ new Class [] {argv.getClass()}) ;
+ c.newInstance(new Object [] {argv}) ;
+ }
+ catch (MalformedURLException me){
+ System.err.println("Invalid classpath entry '" + path + "': " +
+ me.getMessage()) ;
+ System.err.flush() ;
+ }
+ catch (Exception e){
+ System.err.println("Problem (" + e.getClass().getName() +
+ ") loading InlineJavaServer class: " +
+ e.getMessage()) ;
+ System.err.flush() ;
+ }
+ }
+
+
+ public static InlineJavaServer jni_main(int debug) {
+ return new InlineJavaServer(debug) ;
+ }
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libinline-java-perl.git
More information about the Pkg-perl-cvs-commits
mailing list