#I moved my Java files to my Mac, but now I can't compile?

1 messages · Page 1 of 1 (latest)

stiff notch
#

Good morning,

  • I'm completing some Java homework.
  • It's just a CLI tool, so I've just been using VSCode for my assignments (might be pertinent, idk)
  • It's made up of two files, the main file JoshuaLee.java and a helper class CaesarCypher.java
  • They compile/run just fine on my windows machine. But this morning when I zipped the files up and sent them to my mac, I'm getting the following error.

TLDR: Somehow, Java was about to detect that I was using a class from another file on my windows machine, but when I moved my files to my Mac, I get the following error

Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
        CaesarCipher cannot be resolved to a type
        CaesarCipher cannot be resolved to a type

        at HW3.JoshuaLee.main(JoshuaLee.java:20)
turbid pulsarBOT
#

Helper please have a look, thanks.

stiff notch
#

So my issue was resolved by added import HW3.CaesarCipher;, which is weird because I didn't need that line on my Windows machine.

fast zenith
#

probably there was a CaesarCipher.class file in the same directory as you were running other stuff

#

from a previous time you compiled stuff

cinder jay