|
Re: Eclipse path errors
Quote:
Originally Posted by Poseidon1671
Theoretically, if you're importing edu.wpi.first.wpilibj.*, you are importing every single file from the wpi library. Possibly trying to import Subsystem throws an error because you've already imported it. Try removing the first one or the second one.
File Structure:
edu
wpi
first
wpilibj
...
...
command
Subsystem class
importing things with an asterisk automatically imports everything beneath it. Thus importing everything beneath wpilibj imports Subsystem in addition to many other things. Therefore, you would be importing Subsystem twice, which I think is a problem.
|
Actually, when you import a package in java, it does not import subpackages. Specifically, if you import edu.wpi.first.wpilibj.*, that will not import the command subpackage or the Subsystem class; it only imports the classes in the wpilibj package itself and nothing from a lower level package.
__________________
2014 Las Vegas (Winners with 987, 2478; Excellence in Engineering)
2014 San Diego (Finalists with 987, 3250; Quality Award)
2013 Inland Empire (Winners with 1538, 968; Excellence in Engineering Award)
2013 San Diego (Finalists with 2984, 4322; Creativity Award)
2012 Las Vegas (Finalists with 2034, 3187; Quality Award)
|