Go to Post Dear CNN, We're not from indiana. Love, Wildstang - AlecMataloni [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-01-2013, 20:03
Chris Heung Chris Heung is offline
Registered User
FRC #3992
 
Join Date: Jan 2013
Location: Florida
Posts: 3
Chris Heung is an unknown quantity at this point
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
{

}
Reply With Quote
  #2   Spotlight this post!  
Unread 09-01-2013, 20:07
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,561
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Cannot access MIDlet

Is there a reason you are starting with a blank file, rather then the IterativeRobotTemplate?
Reply With Quote
  #3   Spotlight this post!  
Unread 09-01-2013, 20:15
Chris Heung Chris Heung is offline
Registered User
FRC #3992
 
Join Date: Jan 2013
Location: Florida
Posts: 3
Chris Heung is an unknown quantity at this point
Re: Cannot access MIDlet

Actually, this is an IterativeRobotTemplateProject, I might have worded that poorly.
Reply With Quote
  #4   Spotlight this post!  
Unread 09-01-2013, 21:45
NotInControl NotInControl is offline
Controls Engineer
AKA: Kevin
FRC #2168 (Aluminum Falcons)
Team Role: Engineer
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Groton, CT
Posts: 261
NotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond repute
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
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner
Reply With Quote
  #5   Spotlight this post!  
Unread 09-01-2013, 21:59
Chris Heung Chris Heung is offline
Registered User
FRC #3992
 
Join Date: Jan 2013
Location: Florida
Posts: 3
Chris Heung is an unknown quantity at this point
Re: Cannot access MIDlet

Quote:
Originally Posted by NotInControl View Post
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
Reply With Quote
  #6   Spotlight this post!  
Unread 10-01-2013, 12:52
NotInControl NotInControl is offline
Controls Engineer
AKA: Kevin
FRC #2168 (Aluminum Falcons)
Team Role: Engineer
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Groton, CT
Posts: 261
NotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond repute
Re: Cannot access MIDlet

Great... glad it worked

Happy Programming,
Kev
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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