Plinzelplein
Plinzelplein

Reputation: 1

Java import from other file

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!

Upvotes: 0

Views: 77

Answers (1)

ringadingding
ringadingding

Reputation: 475

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.

Upvotes: 1

Related Questions