Go to Post Once you try hex you'll never go back. - IndySam [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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 07-02-2013, 22:21
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Virtual cRIO (cRIO Emulator)

I have created a Virtual cRIO so you can test your robot code without having to wait for the mechanical and electrical teams to finish their jobs.

This is the first release so do not expect it to work flawlessly!

Download: http://www.mediafire.com/?wpwkpreo6hwjc16

Instructions:
- Download the jar file and place onto desktop
- Open netbeans (or other IDE)
- If using netbeans either create a new robot project or use an existing project
- Once your robot project is created right click on the project you just made and click properties
- Click on Libraries, and remove the classes.jar library and add the Virtual cRIO.jar
- Once the library is added make sure there are no errors with the class imports
- Now you have to create a new file in the src folder by right clicking the src folder and New -> Other -> Other -> Empty file, name it main.txt
- Now in that file put <PackageName>.<MainClass> but replace PackageName with the actual package name and the MainClass with the main class that extends SimpleRobot and then save the file
- Now all you have to do is click the build icon (the one that looks like a hammer)
- Now open Virtual cRIO.jar and click the Choose Jar button
- Find your built robot project which is usually in your documents folder under netbeansprojects/<Project Name>/dist
- And now you should be able to enable the cRIO!

If you are having any trouble or having any problems please be sure to leave a comment below so I may assist you!

Screenshot:

Last edited by Chiller : 08-02-2013 at 16:32.
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2013, 11:32
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Virtual cRIO (cRIO Emulator)

Where is "libraries" under the Project properties? I only have

General
Java Sources
Java Sources Classpath
Output
Build & Run
Formatting

(none that i can find contain classes.jar anywhere)
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2013, 12:21
DjMaddius's Avatar
DjMaddius DjMaddius is offline
Registered User
AKA: Matt Smith
FRC #2620 (Southgate Titans)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Southgate, Mi
Posts: 161
DjMaddius is an unknown quantity at this point
Re: Virtual cRIO (cRIO Emulator)

Awesome project! However, I'm running on ubuntu, java can't find the main class to execute the software. Secondly, same issue as above. Can't wait to use it once these issues are addressed!
Reply With Quote
  #4   Spotlight this post!  
Unread 08-02-2013, 15:53
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: Virtual cRIO (cRIO Emulator)

After build season, I'd like to help with one of these projects. It seems nobody accounts for the squawk libraries, which astonishes me. Although this library is impressive for what it is, there is a whole lot more that needs to be made. If you really need to test it on your computer, you are probably using more obscure libraries, which these kinds of things just don't do very well. Like I said, I'd love to help if its open source.
__________________
All opinions are my own.
Reply With Quote
  #5   Spotlight this post!  
Unread 08-02-2013, 16:25
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: Virtual cRIO (cRIO Emulator)

Quote:
Originally Posted by Arhowk View Post
Where is "libraries" under the Project properties? I only have

General
Java Sources
Java Sources Classpath
Output
Build & Run
Formatting

(none that i can find contain classes.jar anywhere)
Right click on your project and click on properties. Sorry for not clarifying that.
Reply With Quote
  #6   Spotlight this post!  
Unread 08-02-2013, 16:38
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: Virtual cRIO (cRIO Emulator)

Quote:
Originally Posted by DjMaddius View Post
Awesome project! However, I'm running on ubuntu, java can't find the main class to execute the software. Secondly, same issue as above. Can't wait to use it once these issues are addressed!
I think the error here is that i compiled it with JRE 1.7 and you probably have JRE 1.6. Is the error something like this: "java.lang.NoClassDefFoundError" If so that is most definitely the issue.
Reply With Quote
  #7   Spotlight this post!  
Unread 08-02-2013, 16:41
DjMaddius's Avatar
DjMaddius DjMaddius is offline
Registered User
AKA: Matt Smith
FRC #2620 (Southgate Titans)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Southgate, Mi
Posts: 161
DjMaddius is an unknown quantity at this point
Re: Virtual cRIO (cRIO Emulator)

Quote:
Originally Posted by Chiller View Post
I think the error here is that i compiled it with JRE 1.7 and you probably have JRE 1.6. Is the error something like this: "java.lang.NoClassDefFoundError" If so that is most definitely the issue.
Yep, running jre 1.6
Reply With Quote
  #8   Spotlight this post!  
Unread 08-02-2013, 20:21
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: Virtual cRIO (cRIO Emulator)

Quote:
Originally Posted by DjMaddius View Post
Yep, running jre 1.6
So im guessing now its working??
Reply With Quote
  #9   Spotlight this post!  
Unread 08-02-2013, 20:26
DjMaddius's Avatar
DjMaddius DjMaddius is offline
Registered User
AKA: Matt Smith
FRC #2620 (Southgate Titans)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Southgate, Mi
Posts: 161
DjMaddius is an unknown quantity at this point
Re: Virtual cRIO (cRIO Emulator)

Quote:
Originally Posted by Chiller View Post
So im guessing now its working??
Haven't installed jre 1.7 to try
Reply With Quote
  #10   Spotlight this post!  
Unread 09-02-2013, 18:26
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: Virtual cRIO (cRIO Emulator)

There will be network support in a later release and i might make it so the driver station will be able to connect to the virtual cRio!
Reply With Quote
  #11   Spotlight this post!  
Unread 09-02-2013, 20:43
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Virtual cRIO (cRIO Emulator)

Quote:
Originally Posted by Chiller View Post
Right click on your project and click on properties. Sorry for not clarifying that.
thats what i did?
Reply With Quote
  #12   Spotlight this post!  
Unread 09-02-2013, 21:25
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: Virtual cRIO (cRIO Emulator)

Quote:
Originally Posted by Arhowk View Post
thats what i did?
And you cant find a section thats named Libraries?
Reply With Quote
  #13   Spotlight this post!  
Unread 09-02-2013, 22:28
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Virtual cRIO (cRIO Emulator)

Quote:
Originally Posted by Chiller View Post
And you cant find a section thats named Libraries?
no. theres only
Quote:
Originally Posted by Arhowk View Post
General
Java Sources
Java Sources Classpath
Output
Build & Run
Formatting
and as far as i can tell, none of them contain a "libraries"
Reply With Quote
  #14   Spotlight this post!  
Unread 10-02-2013, 11:39
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: Virtual cRIO (cRIO Emulator)

Quote:
Originally Posted by Arhowk View Post
no. theres only

and as far as i can tell, none of them contain a "libraries"
Ok I have found the issue, you are using an older version of netbeans which looks like this:



And the version of netbeans we are using looks like this:



Now all you have to do differently is go to Java Sources Classpath and do what I say in my original post!
Reply With Quote
  #15   Spotlight this post!  
Unread 10-02-2013, 12:09
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Virtual cRIO (cRIO Emulator)

Quote:
Originally Posted by Chiller View Post
Ok I have found the issue, you are using an older version of netbeans which looks like this:


And the version of netbeans we are using looks like this:


Now all you have to do differently is go to Java Sources Classpath and do what I say in my original post!
Nope, im running JDK 1.7 and my "Java Sources Classpath" is much different than the one you have shown, it only contains 2 files for the wpilibj and networktables libraries.
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 11:47.

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