0

I'm a bit of a beginner in Java and I have an aissgnment to do and was given a code to edit. Problem seems to be that there is an error in including the created packages. The import looks like this:

package de.cogmod.anns.exercisesheet01;

import java.util.Random;

import de.cogmod.anns.exercisesheet01.misc.LearningListener;
import de.cogmod.anns.exercisesheet01.misc.Tools;

with the folder structure being as the import statements declare it. However the following error message is shown when i try to compile it with javac on windows.

package de.cogmod.anns.exercisesheet01.misc does not exist

I guess there is a very simple solution to this but I just can't figure it out. Thank you very much!

  • 1
    Possible duplicate of [How to use 3rd party packages in Java](https://stackoverflow.com/questions/6374161/how-to-use-3rd-party-packages-in-java) – azurefrog Nov 02 '18 at 14:37

1 Answers1

1

I will not give you clear answer since this is an assignment. But here are some pointers.

  1. javac works on a single class if not instructed to run recursively.
  2. classpath is very important during compile time and runtime.
ringadingding
  • 475
  • 5
  • 14
  • Ok, thank you. The assignment is in fact not to find that out (this is just because I'm not experienced in Java) but rather a necessary part which is assumed to be clear to everyone :D But thank you, now I know at least where to begin. – Plinzelplein Nov 02 '18 at 15:14