|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Parallelism in Java
I am trying to move our team into a team that doesn't use the labview crutch anymore, and because i know OOP in java, it should be easy to mentor the younger teammates. I am recoding the robot from this year and it has a parallel periodic task. Do i create a new class and start a run method which would be created in the robotInit, or do i do something else.
On a side note, why does Netbeans 6.8 not have the FRC logo in the toolbar, while 6.7 does? |
|
#2
|
|||
|
|||
|
Re: Parallelism in Java
Create a class that implements interface Runnable, like this:
Code:
public class MyTask implements Runnable {
public void run () {
// Do stuff in here
}
}
Code:
public Thread myThread = new Thread(new MyTask()); Code:
myThread.start(); // Will call MyTask.run() in a separate task |
|
#3
|
|||||
|
|||||
|
Re: Parallelism in Java
You should also look at the documentation for a TimerTask in the JavaDocs.
|
|
#4
|
||||
|
||||
|
Re: Parallelism in Java
Quote:
|
|
#5
|
||||
|
||||
|
Re: Parallelism in Java
Yes, that is what i was initially thinking, minus the "implements Runable" part. Thank you.
As for the netbeans 6.8 not showing the FRC logo, it says that there is no jar file found. Is that jar file found in something else besides the 5 primary modules, and could manually installing these modules one at a time create an issue with this? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Java Tutorial...? | tomy | Java | 2 | 11-02-2010 21:15 |
| Java Questions | andrewmerrill | Java | 6 | 14-12-2009 11:08 |
| Java | team1512 | Java | 2 | 21-10-2009 06:36 |
| Java vs. C++ | nickmagus | Programming | 3 | 05-09-2009 19:23 |
| **FIRST EMAIL**/Java and Orbit Balls *****JAVA DISCUSSION*** | Pjohn1959 | Programming | 37 | 31-08-2009 15:55 |