[tcljava-user] Problems instantiating my own class with java::new
Brought to you by:
mdejong
From: Brian T. <bri...@gm...> - 2005-06-16 11:50:08
|
Does anyone have a simple example using jacl of instantiating a class you've written using the java::new command? Or do you know what I'm doing wrong below? I'm using precompiled jar files that I downloaded from swank (http://www.onemoonscientific.com/swank/index.html). Contents of c:\temp\HelloWorldApp.java: /**=20 * The HelloWorldApp class implements an application that * simply displays "Hello World!" to the standard output. */ class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); //Display the string. } } Transcript from the command-line: C:\temp>javac HelloWorldApp.java C:\temp>java HelloWorldApp Hello World! C:\temp>java -classpath c:\temp HelloWorldApp Hello World! C:\temp>java -classpath c:\temp;jacl.jar;tcljava.jar;swank.jar tcl.lang.Swk= Shell % java::new HelloWorldApp Class "HelloWorldApp" is not accessible % java::new BogusClass unknown class "BogusClass" % java::new java.lang.String hello java0x2 % exit I'm trying to figure out why I'm getting the "is not accessible" error above. Anyone see what I'm doing wrong? If it was a classpath issue, then I would expect to get the "unknown class" error. Thanks, Brian Theado |