[tcljava-dev] object instantiation failure
Brought to you by:
mdejong
|
From: <ver...@So...> - 2001-05-10 05:17:45
|
Hi,
I am new to tclblend, I am stuck while try to load my java class through
tcl code.
Below is my example code, please help. Thanks
---- Simple.java ----
public class Simple {
public Simple(String s) {
contents = s;
}
public String toString() {
return contents;
}
public String contents = "default value";
}
---- tcl code ---
[catch {
package require java
java::try {
# Loads an extension stored in /export/home/vyeo/tcljava/Simple.class
set load2 [java::load -classpath /export/home/vyeo/tcljava Simple]
} catch {TclException err} {
SET message "Error in callCreateAccount: $err"
} catch {ProcessingErrorException pe} {
SET message "Unexpected Processing Error: $pe"
} catch {Exception e} {
SET message "************** UNEXPECTED ERROR *****************"
}
} ww ]
[IF {[SHOW ww]!=""} {
ERROR: [SHOW ww]
}]z
<br>
message : [SHOW message]<br>
------------ end of tcl code -------------
------------- ERROR message --------------
0z
message : Error in callCreateAccount: load "Simple" failed: object
instantiation failure
connectionx :
******************************************************************************
visit http://www.solution6.com
visit http://www.eccountancy.com - everything for accountants
******************************************************************************
This email message (and attachments) may contain information that is confidential to Solution 6. If you are not the intended recipient you cannot use, distribute or copy the message or attachments. In such a case, please notify the sender by return email immediately and erase all copies of the message and attachments. Opinions, conclusions and other information in this message and attachments that do not relate to the official business of Solution 6 are neither given nor endorsed by it.
******************************************************************************
|