Importing custom Java class

Importing custom Java class

de către Eddie Stenbacka-
Număr de răspunsuri: 3

Hi!


I am trying to import a custom Java class to a CodeRunner task.

I have put the Java file in Support files.


In the Answer box preload I simply import the custom class.


I tried to import the class in Customisation as well, beneath the {{ STUDENT_ANSWER }} section and above the public class __tester__.


I get the syntax error when testing the task: AD_4nXecNGRqPRDDjidzsYqSe0WEEAzGM4Ppxkil14dOhb3gHyg8VyuwU4sFEcdc6Vh1Htk-0iKnGeUtzwIJLAfVhef-g4Hev-0SfVNd0uoCvLzNGj4F2Gzm5nBf5MMyIctiT1gvvplN-g?key=8qZPO3mTY1ixMplCawrWtw


Is it possible to import classes like this at all?


Best regards,

Eddie Stenbacka

Ca răspuns la Eddie Stenbacka

Re: Importing custom Java class

de către Anton Dil-
Hi Eddie, I don't think that needs an import statement - I'm assuming it's not got a package statement (if it does you could remove it). If you had a jar in the support files area then you'd need an import statement.