Hi again,
Now i m getting a little problem with the applet. Again, the code is
simple, just a way to figure out how to work from now on with jacl:
----
import tcl.lang.*;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class mytest extends Applet {
private Interp _interp;
public void init () {
try {
_interp = new Interp();
_interp.eval("clock seconds");
TclObject result = _interp.getResult();
System.out.println("And the result is: " + result.toString());
} catch (Exception e) {
System.out.println("mytest: init() " + e);
e.printStackTrace();
}
}
}
----
And this is trowing me this error:
mytest: init() java.lang.NullPointerException
java.lang.NullPointerException
at tcl.lang.CharPointer.<init>(CharPointer.java:88)
at tcl.lang.Interp.eval(Interp.java:2220)
at tcl.lang.Interp.evalResource(Interp.java:2777)
at tcl.lang.Interp.<init>(Interp.java:429)
at mytest.init(mytest.java:10)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
By googling, i found an old version of jacl.jar and tcljava.jar, those works
without problem, but has not all functions in it (specially "clock"). The
thing is now with an applet, b'cause when i do an app, it compiles and runs
fine.
Is there something i m missing?
Regards,
-=Raul=-
--
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.0/352 - Release Date: 5/30/2006
|