BUG Community

Welcome! Log In

Forums Recent Posts

Subscribe to Recent Posts 12,499 posts found

Oct 18, 2007 6:03pm
Medium kgilmer 215 posts

Topic: Applications / LCD Module Still Hangs

We’ve got a working solution and hope to release it to you very soon.

Oct 18, 2007 5:51pm
Medium kgilmer 215 posts

Topic: Applications / How do applications get started?

Oh and the latest SDK build has a Virtual BUG with two LCD lines.

Oct 18, 2007 5:45pm
Medium kgilmer 215 posts

Topic: BUG SDK / SDK installation

As a related item, the latest SDK build explicitly lists PDE as a required feature, so it will only install if PDE is installed.

Oct 18, 2007 5:44pm
Medium kgilmer 215 posts

Topic: BUG SDK / SDK Under Linux?


Nice work! Is there a RH forum thread or something we could point other fedora users to if they have the same issue?

Oct 18, 2007 4:07pm
Medium bballantine 56 posts

Topic: Applications / How do applications get started?


I’m primarily a web developer here at Bug, so I’m a bit of an SDK n00b myself, but I’ll take a swing at your question.

Using the Activator and ServiceTracker, your application is sorta always running, waiting for its service dependencies. Once its service dependencies are there, it will kick off doStart and do it’s thing.

If you wanted an app that wasn’t running all the time, then you are correct—your Activator could register a menu item or listen for hotkey events. I hope that helps. Def. let me know if it’s still unclear.


Oct 18, 2007 3:32pm
Medium bballantine 56 posts

Topic: Suggestion Box / Suggestions Wanted!

Hello All,

I began a new thread to address the topic of "Scripting the BUG". Check it out here: http://bugbeta.com/forums/viewtopic.php?t=73
Oct 18, 2007 3:29pm
Medium bballantine 56 posts

Topic: Applications / Scripting the BUG

I've been working on using Jython to write BUG apps and I've had some success. Once I go over what I've done with Ken and clean it up a little, I'll post a Hello World-type app on buglabs.net and a tutorial.

In the meantime I'll outline my approach (there are certainly other approaches, and probably better approaches, but so far what I've done is working):

  • In your bug app, add the Jython jar, and add it to your bundle manifest's "Bundle-ClassPath".
  • Create a Python interface to "wrap" your Jython class.
  • Create a Jython script
  • (.py file), implementing your wrapper interface.
  • To use the class, create an in instance of org.python.util.PythonInterpreter
  • There's some tricky code you have to add after you have your interpreter initialized that adds the bundle packages to the packages your jython script can see:

Bundle thisBundle = context.getBundle();
Dictionary bundleHeaders = thisBundle.getHeaders();
String importPackages = (String)bundleHeaders.get("Import-Package");
String[] result = StringUtil.split(importPackages, ",");
for(int x=0; x<result.length; x++){
String pkg = result[x].trim();
// this package -- so my Jython script can access my local classes

  • Run the script
  • (.py) file via PythonInterpreter.execfile()
  • Create an instance of your Jython class within the script context
  • Pull out the object and cast it as your wrapper class.
  • Use it like you would a java class. See the code snippet below:

// execute my script, making the class available within the interpreter context
// create an instance of my class within the interpreter context
interp.exec("jython_service_listener = JythonServiceListener()");
// create a java object from the PyObject and cast as my wrapper interface
IJythonServiceListener serviceListener = (IJythonServiceListener) interp.get("jython_service_listener", IJythonServiceListener.class);
// use it
context.addServiceListener(serviceListener, myFilter);

If you're interested and still confused, wait a couple of days and I'll have a good sample app on buglabs.net for you to pull apart.
Oct 18, 2007 3:26pm
Medium bballantine 56 posts

Topic: Applications / Scripting the BUG


I've been thinking about Scripting on the BUG, or perhaps more accurately, writing BUG apps in a scripting language instead of Java. I'm starting this thread to continue this discussion which started here: http://bugbeta.com/forums/viewtopic.php?t=46

Also, Ken sent me an interesting related thread on the Java Community News forums: http://www.artima.com/forums/flat.jsp?forum=276&thread=216815
Oct 18, 2007 12:25pm
daryll 11 posts

Topic: BUG SDK / SDK Under Linux?

Once I realized that the PDE wasn’t initializing correctly, I worked with the Red Hat guys.

I ended up removing every package related to java. Then installed it all again. Now everything is coming up cleanly.

The other good news is that F8 seems to have everything you need for bug. Java-1.7-icedtea, eclipse eudora, packages for PDE and GEF. All those can be installed as RPMs, then the bug SDK installs just as you listed.

So I’m up and running, and will get started on some projects now!

Oct 18, 2007 12:01pm
hzaida 38 posts

Topic: BUG SDK / SDK installation


Were you able to get everything up and running?

Please let us know if you need further assistance.

Thanks, Heather

Powered by Community Engine