[kepler-dev] Building Actors

Kenneth Evans evans at aps.anl.gov
Fri Oct 26 16:18:53 PDT 2007


Hi,

Ok.  I was able to put my .class file in the classpath and run it using
'Instantiate Component'.  I had to leave the URL blank.  I used <kepler>/lib
to avoid modifying a batch file.  This is _relatively_ easy.

I also made a KAR file and put the .class file in it.  I haven't had time to
make a JAR yet and I don't know if the downloaded beta3 version supports
this, anyway.  I couldn't get this to work.  It reads it but doesn't like
the LSID.  I didn't go through the procedure of finding the last-used LSID,
etc.  So, is there a way to make an LSID with a unique ID so the KAR file
can be put somewhere outside the Kepler installation and still work.  I am
having trouble finding documentation about making the XML file in general
and the LSID in particular.

Also when I tried experimenting with changing the LSID, Kepler continued to
say it can't find the first one I used.  This must mean it has stored it
somewhere and probably associated it with the class.  How do I fix this?

Thanks,

        -Ken

-----Original Message-----
From: Matthew Jones [mailto:jones at nceas.ucsb.edu] 
Sent: Friday, October 26, 2007 10:43 AM
To: Kenneth Evans
Cc: Kepler Developers
Subject: Re: [kepler-dev] Building Actors

Hi Ken,

Thank you for your comments.  We are aware of the issues you mention, 
but I still appreciate getting your comments.  We have specific plans to 
separate the Kepler kernel/core from the actors, and to make it far 
easier to develop and run actors by 3rd party users.  We have recently 
added a new feature that allows actors to include the jar files on which 
they depend in their actor archive (kar file), and Kepler can now load 
these actors dynamically at runtime.  Therefore, if you can package your 
actor as a KAR file (which is just a jar file with a Manifest that 
contains the MoML and jar files), you should be able to use the 'Import 
KAR' menu item to add it to your system.  Alternatively, if your Java 
code for your actor is on the classpath already (ie, via a modified 
batch file), then you should be able to use your actor by calling the 
'Instantiate Component' menu item and give it the fully qualified name 
of the actor class.  The former approach (via KAR) is preferred because 
it loads the actor into the tree on the left.

The line-ending issue you are having is definitely weird.  One of the 
developers at NCEAS that uses Eclipse has been trying to reproduce your 
issue, but alas without luck -- although he has run into several other 
issues.  The Kepler project supports the Ant build as the main build 
system for the project -- I'd like to know if the ant build works for 
you.  We will continue to try to determine why the Eclipse build is 
broken, but it would be helpful to know if ant works: "ant full-clean 
ptolemy buildkarlib run-dev" should build everything from scratch.

Please continue sending comments -- they help us tremendously.

Matt

Kenneth Evans wrote:
> Hi,
> 
>  
> 
> After working on it several hours again last night, I still can't build 
> Kepler.  I'm not complaining.  It is as good a way to learn the program 
> as any, and I am confident it will be fixed.
> 
>  
> 
> The problem is that I shouldn't have to be building it.  While 
> contributing as a developer may be feasible at some time, I only learned 
> about Kepler last week and I am presently not sufficiently knowledgeable 
> to contribute.  I would not like uniformed amateurs contributing to my 
> projects, and I would not do that to others.
> 
>  
> 
> All I want to do is implement an actor.  I wrote one in about 15 min. 
> (using the HelloWorld tutorial) two days ago.  I still can't run it.
> 
>  
> 
> I am aware of a program, JAS3, that is developed at Stanford and is used 
> by the high-energy physics community.  (You can Google it.)  This 
> program has plug-ins, which are similar to actors in that they [may] 
> consist of a relatively simple Java file.  They have a tree view with 
> the plug-in on the left, similar to what is in Kepler.  However, in 
> their GUI you can create, edit, and compile the Java program, and add it 
> to the tree or modify it while in the tree.  (You can also use it from 
> the tree, of course.)  This is actually not that hard to implement.
> 
>  
> 
> Perhaps I've missed something, but it seems very inconvenient to create 
> and debug actors in Kepler.  If I were running an experiment using the 
> Kepler workflow, I would like to be able to correct mistakes or change 
> things deeper than the flow diagram on the fly during a run.
> 
>  
> 
> (I realize it may not be wise to be critical when you are an uninformed 
> amateur, but hopefully this will be taken in the right spirit. ;-)
> 
>  
> 
>         -Ken
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at ecoinformatics.org
> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Matthew B. Jones
Director of Informatics Research and Development
National Center for Ecological Analysis and Synthesis (NCEAS)
UC Santa Barbara
jones at nceas.ucsb.edu                       Ph: 1-907-523-1960
http://www.nceas.ucsb.edu/ecoinfo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the Kepler-dev mailing list