FAQ

From BUG Wiki

Jump to: navigation, search

Contents

How technical do I need to be to use a BUG?

At present, it is our strong recommendation that only Java programmers, or those familiar with developing Linux applications purchase the BUG. As our developer community builds useful gadgets with the initial units, we anticipate the entire system getting easier and easier for less technically inclined people to pick up and use the BUG.

I already have Eclipse installed. Can I use it with Dragonfly?

You can run Dragonfly using Eclipse version 3.3 or greater. More info.

Where is all the source code?

Source code for the Bug Labs website, Dragonfly SDK, and Virtual BUG reside at svn://bugblade.com/trunk.

Source code for Concierge and jSLP, the OSGi runtime that we use, is available at http://Concierge.sourceforge.net.

Source code for Eclipse, the tooling platform on which we build, is available from http://eclipse.org.

[ Instructions for installing Subclipse, the Eclipse Subversion Client, can be found here: http://subclipse.tigris.org/install.html ]

What type of Web services are supported with the BUG?

By default, the BUG exposes information via RESTful Web services. That is, each resource or entity is accessed via a simple URL such as http://<mybug>/services/Camera. The HTTP operations GET, PUT, POST, and DELETE are used to manipulate Web service resources. The BUG supports a simple service discovery mechanism via the base URL: http://<mybug>/services

When I create a BUG application I see Activator.java. What's that?

The BUG utilizes a runtime environment and service model known as OSGi. This allows applications to be managed in a context of dynamic services. Additionally it enforces a component model and service access pattern that applications use to safely share hardware-based services. The specific OSGi implementation we use is called Concierge.

An introduction to OSGi can be found here.

What version of Java runs on the BUG?

The Virtual BUG relies on the Java Virtual Machine (JVM) that is installed on your desktop PC. The class libraries are limited to CDC/Personal Basis. Sun has a good article on explaining this.

Where is the Javadoc for the Virtual BUG?

Glad you asked. It's here: http://bugcommunity.com/development/javadoc/

How do I prevent a BUG application in my workspace from launching in the Virtual BUG?

Currently you will need to close the project. The SDK will attempt to launch the Virtual BUG with any BUG projects in your workspace.

How do I add (SQL, XML, SOAP, Jini, etc.) functionality to the Virtual BUG?

First have a look at places that host OSGi bundle repositories such as osgi.org. OSGi bundles are a great way of extending a BUG runtime because they can be shared among BUGs easily and multiple bundles can use their services. Once you have a bundle you're interested in adding, put it in the Virtual BUG "kernel" directory. Most likely this is in your Eclipse installation in the com.buglabs.dragonfly.kernel plugin. Mine is here: ~/dev/apps/eclipse32-test/plugins/com.buglabs.dragonfly.bug.kernel_1.0.0.226/kernel.

Now if you restart your Virtual BUG you should see the new bundle has loaded. You can type "bundles" at the Concierge prompt to see your bundle.

Actually, these steps are over-simplified and I will work on a more robust HOWTO shortly.


Java is a registered trademark of Sun Microsystems.

I get an exception when I run a Bundle on the BUG

Terminated
java.lang.NoClassDefFoundError: java.lang.StringBuilder
        at com.buglabs.bug.base.MenuAdapter.createChildren(Unknown Source)
        at com.buglabs.bug.base.MenuAdapter.getChildren(Unknown Source)
        at com.buglabs.bug.menu.MenuStateMachine.buttonPress(Unknown Source)
        at com.buglabs.bug.menu.Menu.buttonEvent(Unknown Source)
        at com.buglabs.bug.base.BaseButtonEventProvider.run(Unknown Source)
        at java.lang.Thread.startup(Unknown Source)


This happens because the Java compiler is set to 5.0. The compiler needs to build for 1.4.

Personal tools