Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   JFrame As Secondary GUI Possibility (http://www.chiefdelphi.com/forums/showthread.php?t=141501)

iSpotix 11-01-2016 19:41

JFrame As Secondary GUI Possibility
 
I created a JFrame with a list output and radio buttons for different autonomous modes in the off season and finally had a chance to run it on the robot, but it throws a NoClassDefFoundError. Is it even possible to run a JFrame on the roborio? I'm not super experienced with how the roborio and driverstation interact but I'm fairly fluent in java. I have the JFrame class and then the robot class in one package so that I can just call JFrameClass.addSomething("") from the robot class. I don't have the code with me, but it seems like more of a compiling error than actual code.

JesseK 11-01-2016 21:17

Re: JFrame As Secondary GUI Possibility
 
Quote:

Originally Posted by iSpotix (Post 1521544)
I don't have the code with me, but it seems like more of a compiling error than actual code.

This particular error means the classpath at runtime cannot find a class. It doesn't have anything to do with compiling. It's more to do with how you deploy to your environment.

JFrame itself is a GUI-based class that will initialize a display environment under the covers. Unrelated to robotics, a 'headless' server is one that doesn't have a video card output at all. Running a class that initializes a JFrame on a headless server throws a runtime error, though I don't remember the specifics.

If you're running the java.swing.JFrame class on the RobotRIO, then I suspect that's the source of your error. The JFrame class is meant to be launched from your driver's station laptop, and the control code should connect to the RoboRIO's IP/ports where your RoboRIO code is publishing data.

Jared 11-01-2016 21:18

Re: JFrame As Secondary GUI Possibility
 
The roborio doesn't have a screen or possible video output, so you can't use a JFrame or any type of UI on it. I also would imagine that these classes aren't on the roborio because they cannot be used.

iSpotix 11-01-2016 22:31

Re: JFrame As Secondary GUI Possibility
 
Thank you both. I forgot to mention this as a possibility as well. I think the 2016 has solved everything I was trying to do anyway but I just needed some closure.


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

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