ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcljava-dev
tcljava-dev
[tcljava-dev] Please help in loading a class...
by Georgios Petasis other posts by this author
Mar 13 2007 12:20AM messages near this date
Re: [tcljava-dev] SubstCmd | Re: [tcljava-dev] Please help in loading a class...
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


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
tcljava-dev mailing list
tcljava-dev@[...].net
https://lists.sourceforge.net/lists/listinfo/tcljava-dev
Thread:
Georgios Petasis
Patrick Finnegan
Georgios Petasis
Mo DeJong

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved