Is emulate cloud security still on? I am not sure if eclipse also uses this function but my guess it not, then that might be the reason for the different outcomes.
On the other hand i would expect the modeller to give a security warning if your java action tries to run a piece of code that is not allowed by cloud security.
As Benny pointed out this is not the case.