[tcljava-dev] Please help in loading a class...
Brought to you by:
mdejong
From: Georgios P. <pet...@ya...> - 2007-03-13 07:20:19
|
Hi all, I am using tclblend 1.4.0 to load JVM from Tcl. However, when I try to load a specific class I got an error: java::call {enrichment.EnrichmentManager$Test3} main Class "enrichment.EnrichmentManager.Test3" is not accessible The same happens with java::new: java::new {enrichment.EnrichmentManager$Test3} Class "enrichment.EnrichmentManager.Test3" is not accessible I also tried: set dir $creole_BOEMIE_CoordinationDemo_home/Enrichment/enrichment set fd [open "$dir/EnrichmentManager\$Test3.class" r] fconfigure $fd -translation binary set data [read $fd] close $fd set class [java::defineclass $data] set object [$class newInstance] java.lang.IllegalAccessException: Class tcl.lang.reflect.PkgInvoker can not access a member of class enrichment.EnrichmentManager$Test3 with modifiers "" The class I try to load looks like: static class EnrichmentManager$Test3 { public static void main(String args[]) { ... } EnrichmentManager$Test3() { } } Is this due to the constructor that is not public? Any help will be welcomed, as my Java knowledge is limited :-) Regards, George |