Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Uncaught exception (http://www.chiefdelphi.com/forums/showthread.php?t=82050)

Patrick Chiang 06-02-2010 17:22

Uncaught exception
 
Code:

[cRIO] Uncaught exception in Thread.run():
[cRIO]    on thread edu.wpi.first.wpilibj.templates.RobotTemplate - main
[cRIO] java.lang.IllegalArgumentException: MIDlet class specified, edu.wpi.first.wpilibj.templates.RobotTemplate, was not found
[cRIO]    at java.lang.Throwable.<init>(88)
[cRIO]    at java.lang.Throwable.<init>(102)
[cRIO]    at java.lang.Exception.<init>(53)
[cRIO]    at java.lang.RuntimeException.<init>(58)
[cRIO]    at java.lang.IllegalArgumentException.<init>(54)
[cRIO]    at com.sun.squawk.imp.MIDletMainWrapper.main(94)
[cRIO]    in virtual method #95 of com.sun.squawk.Klass(bci=25)
[cRIO]    at com.sun.squawk.Isolate.run(1554)
[cRIO]    at java.lang.Thread.run(231)
[cRIO]    in virtual method #47 of com.sun.squawk.VMThread(bci=42)
[cRIO]    in static method #3 of com.sun.squawk.VM(bci=6)

We don't really know how this happened, but it broke sometime around when we tried to change the package name of the default code. Is there a way to get around this? How would we modify the midlet configurations in the Manifest file?

ygd 06-02-2010 18:54

Re: Uncaught exception
 
In Netbeans go to Tools -> Plugins and click the Settings tab.

Select FRC Java or whatever you named it and make sure the update site is:

If it isn't, uninstall the FRC Plugins and change the update site and reinstall.

MattD 06-02-2010 19:15

Re: Uncaught exception
 
You'll see this behavior if you change your package name after creating your project. Edit the file in ./resources/META-INF/MANIFEST.MF so that it uses your package and class name.

The default file will look something like this:
Code:

MIDlet-Name: RobotTemplate
MIDlet-Version: 1.0.0
MIDlet-Vendor: FIRST
MIDlet-1: RobotTemplate, , edu.wpi.first.wpilibj.templates.RobotTemplate
MicroEdition-Profile: IMP-1.0
MicroEdition-Configuration: CLDC-1.1

Replace 'RobotTemplate' with the name of your robot class, and 'edu.wpi.first.wpilibj.templates' with your package name.

phencer42 06-02-2010 19:27

Re: Uncaught exception
 
Thanks MattD :)

We've been confused for a bit and were starting to get worried. We tried what you said and it worked perfectly. Team 1517 thanks you.

Patrick Chiang 08-02-2010 22:13

Re: Uncaught exception
 
Looks like it worked for us too. Thanks for your time and help!

synth3tk 08-02-2010 22:40

Re: Uncaught exception
 
I gave up on changing our default code name since week 1, so this is very helpful. Thanks a lot, Matt! :)


All times are GMT -5. The time now is 09:08.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi