The MetaBot is a handy little app for creating P2P web app content, assembling content into an app, and publishing apps on the Newbound Network. It's not really meant to be a full fledged IDE, although it can be used as one. However, if your java is more than a few lines of code, you will probably want to develop your java library in your IDE of choice and just point it at the src directory in your app's working directory. You can add any JAR files your code depends on to the Newbound/lib directory. If you don't know where these folders are, check out the Architecture Tutorial for a full explanation.
This example assumes you want to build your app using an IDE and you just want to publish it using the MetaBot. If you don't want to build your app using a separate IDE, and you just want "drop your code in here", see our Building Apps with the MetaBot tutorial instead.
Step 1 - Publish your App
Launch the Newbound Network and open up the MetaBot, click on the "Libraries" tab and add a new Library named "mynewlib". Open your new library and add a control named "mynewapp". Click on the "Publish" tab and enter the following:
Click the "publish" button and the Metabot will automatically create and populate the Newbound/runtime/mynewapp directory for you.
Step 2 Configure your IDE
When you set up your IDE, you will need to add the Newbound/src directory as well as each app's src subdirectory to your IDE's build path. The class com.mycompany.Mynewapp has been automatically generated for you in the Newbound/runtime/mynewapp/src directory, and you can add commands to your App by overriding the handleCommand(String, Hashtable) method. You can add as many other java files as you like to the Newbound/runtime/mynewapp/src directory. Any files you drop in the Newbound/runtime/mynewapp/src/html/mynewapp folder will be served up by the web server. You can add any JAR files your code depends on to the Newbound/lib directory.
Step 3 Republish and restart
To test your app after making changes, click the "publish" button again and restart your instance of the Newbound Network. When your App Manager comes up, you'll have a new app on the menu! You'll also need to republish and restart each time you want to make additional changes available to other devices you are connected to over the Newbound Network.
Congratulations! You just successfully deployed an app with the MetaBot on the Newbound Network!
Related Links