CBCJVM - Downloading a program

8 replies [Last post]
axyjo
Title: NooBot+
Joined: 03/28/2010
Posts:
BotPoints: 9
User offline. Last seen 12 years 20 weeks ago.

Okay, so I've gotten CBCJVM (10.3, as tagged on GitHub) installed on my CBC v2. Now, I would like to know how I can download the program with a flash drive to my CBC. I've configured Eclipse to create different directories for the source files and the class files, but the CBC won't run it unless there's a .c file. I copied and pasted the .c file located in one of the examples so that it matches with my project directory name. However, after compiling the program, I need to have the USB drive plugged in for it to work. Is there a way to copy my java files to the CBC's flash memory? What path would I need to copy it to?

Thanks!

PiPeep
PiPeep's picture
Title: RocketBot
Joined: 07/19/2009
Posts:
BotPoints: 170
User offline. Last seen 8 years 23 weeks ago.

W00T! A new CBCJVM user!

To download via usb-flashdrive:
I assume you already have the CBCJVM install_data and CBCJVMInstaller.c on your flash-drive. Go into install_data/code/CodeInstall, and copy CodeInstall.c to the top-level directory of your flash-drive (not necessary, but it will save you time later). Then copy your code into the install_data/code directory (following the format of the other examples, not all of which are working right now, *sorry*), and modify your .c based launcher to operate like the HelloWorld launcher (changing names and such where necessary of course). Now you can run CodeInstall.c on the device via the flashdrive, which will copy just the code folder to the CBC (this will replace any existing code you have on your CBC's internal storage, just like the CBCJVMInstaller does). Now that it is on the internal storage, you should be able to launch the program without the flash-drive.

If you have any more questions feel free to ask. Also, if you have a usb-to-ethernet adapter or usb-wifi device that will work with the Chumby, Braden has made an Eclipse plug-in for network-based downloads (which you may have already seen). However, you will need a router (easiest, but extra hardware), or a DHCP server on your computer (on the mac, "internet sharing", on linux "dhcp3-server", and I don't know about it on Windowz). Networked downloads are the fastest (and wifi is a very nice feature), but not quite as easy (or cheap in certain circumstances) to set up as a flashdrive-install system. According to Braden, usb-cable downloading should be an option soon.

Shall I add you to this list: http://wiki.github.com/catron/CBCJVM/teams-using-cbcjvm ?

catron
catron's picture
Title: ZoomBot
Joined: 06/02/2009
Posts:
BotPoints: 98
User offline. Last seen 10 years 25 weeks ago.

Hey,

If you are using eclipse and the CBCJVM eclipse plugin, click the flash drive icon and select the root of your flash drive as the install directory. The CBCJVM plugin jar can be found in in The 10.3 Release zip under the eclipse subdirectory. Once you have that jar copied to your eclipse/plugins directory, (re)start eclipse and you should see icons and a menu on your eclipse toolbar.

Best of luck,
Braden McDorman

"When you do things right, people won't know you've done anything at all."

axyjo
Title: NooBot+
Joined: 03/28/2010
Posts:
BotPoints: 9
User offline. Last seen 12 years 20 weeks ago.

Wow! Thanks for the quick replies. I expected to wait around a week. I was doing something similar to that, but for some reason, it's not detecting changes in the Java code. I'll try it out tomorrow when I'm more awake.

Unfortunately, I've got everything but the USB-wireless adapter. I have an extra RTL8187 wifi USB card, but it looks like the CBC's kernel doesn't support it yet (AFAIR, kernels greater than 2.6.32 support it out of the box).

I've gone ahead and added myself. I've also forked a copy on GitHub, and I plan on contributing heavily in the documentation area. I'll submit a pull request once I've got something significant.

PiPeep
PiPeep's picture
Title: RocketBot
Joined: 07/19/2009
Posts:
BotPoints: 170
User offline. Last seen 8 years 23 weeks ago.

That's great! We could defiantly use some more help, especially with documentation, as it is our weak spot. Braden might be able to give you commit access to the main branch. *wink, wink, nudge, nudge, shove, shove, push, push*

Our next release should be in a few days, 10.4, most likely a small release. (We do monthly releases, the first number, 10 is based on the year, 2010, and the last digit is based on the month, the 4th month. Each release comes out at the beginning of each month)

axyjo
Title: NooBot+
Joined: 03/28/2010
Posts:
BotPoints: 9
User offline. Last seen 12 years 20 weeks ago.

That's neat. Do you guys have an upgrade path between versions?

PiPeep
PiPeep's picture
Title: RocketBot
Joined: 07/19/2009
Posts:
BotPoints: 170
User offline. Last seen 8 years 23 weeks ago.

No, but considering that the only changes you should be making are in that code folder, and because CBCJVM is pretty small, we see no point in making an update system.

Just simply running the installer will delete the old install, and reinstall the entire CBCJVM release, and in a worst-case scenario, you can always run userhook0 again (may I suggest this one: http://community.botball.org/forum/technical/programming/nhs-patchset ), which will reformat your CBC and set it back to "factory conditions".

catron
catron's picture
Title: ZoomBot
Joined: 06/02/2009
Posts:
BotPoints: 98
User offline. Last seen 10 years 25 weeks ago.

Do you have an instant messenger? We usually do most of our developer communication through gtalk.

Thanks,
Braden McDorman

"When you do things right, people won't know you've done anything at all."

PiPeep
PiPeep's picture
Title: RocketBot
Joined: 07/19/2009
Posts:
BotPoints: 170
User offline. Last seen 8 years 23 weeks ago.

axyjo: We also use IRC a lot. You can click on the "Botballer's Chat" tab at the top of this page, or go to #botball on irc.mintirc.net with your irc client of choice. If you would like to use GTalk or another IM protocol, and don't feel comfortable giving out your IM details on this public forum, you can post your IM details on the IRC, where there is a much more limited crowd.