Reputation: 17486
I am very new to Java.
I would like to use some features from package called daj
The tutorial code has the following lines.
import daj.*;
import java.util.*;
import java.lang.Math;
import Msg;
But first and fourth lines produce red underscore such that program cannot compiles.
How can I resolve this problem?
Upvotes: 2
Views: 1353
Reputation: 24885
You have to add the packages to the classpath. If you are using an IDE as Eclipse or Netbeans, go to the project options and find the "Add library/jar" and they will take care of you.
You will need to add these libraries to the classpath both to compile and to run your program.
Also, the usual way of ordering imports is:
Upvotes: 4
Reputation: 13676
That daj package or jar file should be in your package or current directory or in classpath.
Upvotes: 0