nus-cs2113-AY1920S2 / forum

4 stars 0 forks source link

Linkage Error when running text-ui-test #91

Closed SibingWu closed 4 years ago

SibingWu commented 4 years ago

when running the text-ui-test, such error occurs. Such error never happens before, my JDK is set to be 11.

image

damithc commented 4 years ago

Looks like another Java version is being used somewhere along the way. If possible, remove all other java versions from your computer.

SibingWu commented 4 years ago

Looks like another Java version is being used somewhere along the way. If possible, remove all other java versions from your computer.

just curious why this never happens before?

damithc commented 4 years ago

Well, something must have changed somewhere. Perhaps an automatic update?

SibingWu commented 4 years ago

Well, something must have changed somewhere. Perhaps an automatic update?

I fix it by changing the computer environment path from jdk11 back to jdk 12... seems that I need to remove all the .class files generated when my computer was still jdk 12

SibingWu commented 4 years ago

Well, something must have changed somewhere. Perhaps an automatic update?

no use if I just delete the .class files from out directory; I have to change back to jdk12...

damithc commented 4 years ago

Keep in mind that using JDK 12 might appear to solve the problem in your computer but you should be using JDK 11 for all PE work and the jar file your team releases must be produced using JDK 11. If your jar file doesn't work on JDK 11, you are going to lose a lot of marks as your product will be completely unusable in the target execution environment.

SibingWu commented 4 years ago

Keep in mind that using JDK 12 might appear to solve the problem in your computer but you should be using JDK 11 for all PE work and the jar file your team releases must be produced using JDK 11. If your jar file doesn't work on JDK 11, you are going to lose a lot of marks as your product will be completely unusable in the target execution environment.

notice with thx!