[x3d-public] Idea for X3dToJava.xslt
John Carlson
yottzumm at gmail.com
Sun Apr 22 22:27:06 PDT 2018
Looks like this works for a single class, and probably some kind of RMI. Good luck if you decide to do something like this.
John
import java.net.*;
import java.lang.reflect.*;
public class LocalMUDClient extends URLClassLoader {
static public void main(String args[]) {
try {
String nick = "John";
if (args.length > 0) {
nick = args[0];
}
String room = "rmi://localhost/Generic_Room";
if (args.length > 1) {
room = args[1];
}
String url = "jar:http://localhost/webstart/chat/icbmc.jar!/";
if (args.length > 2) {
url = args[2];
}
String args2[] = new String[1];
// String args2[] = new String[2];
args2[0] = nick;
// args2[1] = room;
URL urls[] = new URL[1];
urls[0] = new URL(url);
LocalMUDClient j = new LocalMUDClient(urls);
Class c = j.findClass("icbm.MUDClient");
System.err.println(c.getName());
Class params[] = new Class[1];
params[0] = args2.getClass();
Constructor cons = c.getConstructor(params);
Object objs[] = new Object[1];
objs[0] = args2;
cons.newInstance(objs);
} catch (Exception e) {
e.printStackTrace();
}
}
public LocalMUDClient(URL urls[]) {
super(urls);
}
}
Sent from Mail for Windows 10
From: John Carlson
Sent: Monday, April 23, 2018 1:09 AM
To: Don Brutzman; x3d-public at web3d.org
Subject: Idea for X3dToJava.xslt
Perhaps the Java program could download the X3DJSAIL*.jar from over the network, so one is always up to date? I’ve got some examples of that.
Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180423/31e4368a/attachment.html>
More information about the x3d-public
mailing list