nus-cs2030 / 2223-s1

MIT License
1 stars 0 forks source link

compiler issue in docker #78

Open felibunnyy opened 2 years ago

felibunnyy commented 2 years ago

I had this issue when trying to compile code under Docker environment? It seems to have issues only when i try compiling using docker but works okay without Docker in my normal terminal. Why are the compilers for both sides different though?

Screenshot 2022-09-15 at 4 03 30 AM

SungMatt commented 2 years ago

Docker is a containerisation platform, which you can (loosely speaking) think of like a Virtual Machine. It runs its own version of Java inside of it, which can be specified when the container was set up.

Running javac --version inside the Docker container, and outside of it (on your own machine) should give you a different reading!

danqiye1 commented 2 years ago

Hi, can you try removing all the .class files and recompile everything inside the docker container?