nus-cs2113-AY2122S2 / forum

3 stars 2 forks source link

Packages not found during Text UI Testing #41

Closed tanweili closed 2 years ago

tanweili commented 2 years ago

I was trying to run the runtest.bat to try testing my current ip which has many packages. I tried updating the runtest.bat file according to the link provided but the test is unable to find my packages. May I know how do I update the .bat file correctly? SS

okkhoy commented 2 years ago

Your line 10 in runtest.bat is only compiling Duke.java. You are not compiling all other things. Update that accordingly, and it should work.

tanweili commented 2 years ago

So if my Duke.java is currently within a duke package, that line of code should be javac -cp ..\src\main\java\duke -Xlint:none -d ..\bin\duke ..\src\main\java\duke\Duke.java ? Is -cp ..\src\main\java\duke the path to the file I want to compile? I suppose ..\bin\duke is the output folder that I want to put the file at? -Xlint:none is this necessary? ..\src\main\java\duke\Duke.java this line of code references the file I want to compile itself? Also do I need to compile all my other packages first before compiling the main Duke.java?

okkhoy commented 2 years ago

Hmmm... I had covered all of this in the lecture when we did hands-on on packages. Did you get a chance to try it out then? Or view the recording later (Lecture 4; around 1hr 35 min mark)?

tanweili commented 2 years ago

I didn't try it out then. Will view the recording later!