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-user
tcljava-user
Re: [tcljava-user] CLASSPATH using tclBlend
by Scott Serr other posts by this author
Mar 9 2006 8:13AM messages near this date
[tcljava-user] CLASSPATH using tclBlend | RE: Re: [tcljava-user] CLASSPATH using tclBlend
What I do, and I think this is the only way to give Tcl/TclBlend your 
CLASSPATH is set it before you run TCL.

I do in bash (just like I would setup Java, I don't use the -classpath 
option):
    export CLASSPATH=/projects/foo.jar
Where you will want to do something similar on DOS.

Then you can do:
    java:import com.foo.Bar
or
    set mytclhandletojavaobject [java:new Test1]

Read http://tcljava.sourceforge.net/docs/website/getstart.html (Interact 
with a Java Object in Tcl) and the manual.

-Scott

Mike Price wrote:

>  I have successfully set up tcl and tclBlend and run the 'package 
>  require java' statement which returns the version number.  I want to 
>  be able to run a method in my separate JAVA program I have stored at 
>  C:\Projects\Test and have a single class in the project called Test1.  
>  When I try to invoke the method it is returning that it cannot find 
>  the package.  I do not know how to set the classpath up, I have tried:
> 
>   
> 
>  % java -classpath C:/Project/Test Test1
> 
>   
> 
>  I don't think I have used the correct syntax though.  Could anyone 
>  tell me how I reference the java package using the classpath? Also, is 
>  there anything else I will need to do (importing or referencing for 
>  example) in order to get my project running?
> 
>   
> 
>  Thanks for your time, Michael
> 
> 
>  ------------------------------------------------------------------------
>  Express yourself instantly with MSN Messenger! MSN Messenger 
>  <http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
tcljava-user mailing list
tcljava-user@[...].net
https://lists.sourceforge.net/lists/listinfo/tcljava-user
Thread:
Mike Price
Scott Serr
Mike Price
Mo DeJong

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved