fahadhub
fahadhub

Reputation: 225

Unable to import an enum from another class in the same package

I have a a class QueueType:

package mypack;

public enum QueueType {
    SMTP, PUT, POST, ISF
}

I am trying to import this into another class in the same package but I get an error saying "can't find symbol QueueType". What am I doing wrong?

package mypack;

public class RawAsupFile {

    private QueueType queueType;
.
.
.

Upvotes: 0

Views: 61

Answers (1)

reegs20
reegs20

Reputation: 11

If your files are in the same folder and you want to compile everything together then you can use with option javac *.java from folder/package location

In case if you want to compile each file individually then you can try with the command javac -cp <path location> filename.java. Example javac -cp D:\mypack\* RawAsupFile.java in Windows

Upvotes: 1

Related Questions