I know there have been several questions in the past regarding things that compile in eclipse but not in command line, but I could not find an answer to my problem yet.
Separate compilers...The use of == forces a stricter compile time check, therefore in the CL it is enforcing type comparison and erroring. In Eclipse you can manage the settings for the compile time and loosen the restrictions so to speak.
You can try Enum.equals() and it may not enforce such strict compile time type comparison. just a thought.