Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Cannot access MIDlet (http://www.chiefdelphi.com/forums/showthread.php?t=110864)

Chris Heung 09-01-2013 20:03

Cannot access MIDlet
 
This is the second year that I am the lead programmer for my team. I have used Java last year as well with no such problem as I am about to describe.

I followed the basic tutorials and got the wpilibj.jar classpath and all the FRC plugins downloaded. I am running Netbeans 7.2.1 and JDK 1.7 on my code.

I created a blank file and tried to compile it and was given the error:

error: cannot access MIDlet
public class Main extends Iterative Robot
class file for javax.microedition.midlet.MIDlet not found
1 error

(insert ide-file-targets xml path): Compile failed; see the compiler error output for details.
BUILD FAILED


Code reference (not much to look at):

Code:

package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.*;

public class Main extends IterativeRobot //error refers to this line
{

}


Joe Ross 09-01-2013 20:07

Re: Cannot access MIDlet
 
Is there a reason you are starting with a blank file, rather then the IterativeRobotTemplate?

Chris Heung 09-01-2013 20:15

Re: Cannot access MIDlet
 
Actually, this is an IterativeRobotTemplateProject, I might have worded that poorly.

NotInControl 09-01-2013 21:45

Re: Cannot access MIDlet
 
This year you need to add three jars to your buildpath...

squawk.jar
wpilibj.jar
networktables-crio.jar

Can you confirm that all three are apart of your build path, and that they are the 2013 version, not the 2012 version?


Javax.microedition.midlet.mixlet lives in the squawk.jar file so if that is not apart of your build, then your linker wont be able to find it.


Hope this helps,
Kevin

Chris Heung 09-01-2013 21:59

Re: Cannot access MIDlet
 
Quote:

Originally Posted by NotInControl (Post 1211943)
This year you need to add three jars to your buildpath...

squawk.jar
wpilibj.jar
networktables-crio.jar

Can you confirm that all three are apart of your build path, and that they are the 2013 version, not the 2012 version?


Javax.microedition.midlet.mixlet lives in the squawk.jar file so if that is not apart of your build, then your linker wont be able to find it.


Hope this helps,
Kevin

Wow, you hit it right on the head. My Netbeans project automatically (or perhaps by result of me tinkering with settings) only had the wpilibj.jar and networktables-crio.jar included.

This issue is now resolved. For people who may have the same problem even after reading this, I went into Project Properties and added the squawk.jar under Java Sources Classpath. Then I edited ide-file-target.xml to look for squawk.jar in its classpath tag.

Thank you so much,
Christopher Heung

NotInControl 10-01-2013 12:52

Re: Cannot access MIDlet
 
Great... glad it worked

Happy Programming,
Kev


All times are GMT -5. The time now is 10:01.

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