0

I have a simple file system, in which all the files being used by the main program are in the same folder. The main program is also in the same system. It was actually a jar file by my friend and then I unzipped it using winrar, the class files are running well, but only when i amended something and tried to compile the program i am getting this error of cannot find symbol for one of the class being used, and its right there in the same folder. How can i resolve this please?

Thanks in advance

4
  • 1
    Are there any package declarations in your source files? Commented Sep 28, 2011 at 17:31
  • @Howard yes there are but, I just want to compile it first.And all the files including main program comes under package next; Commented Sep 28, 2011 at 17:32
  • 1
    It's going to be tough for us to help you without any actual code. Commented Sep 28, 2011 at 17:33
  • 2
    Then first put your source files in appropriate subfolders (with the same name as your packages, in this case next). Then compile from the root using javac next/*.java. Commented Sep 28, 2011 at 17:35

1 Answer 1

2

You have to place your source files into appropriate subfolders. The name of the folder corresponds to your package name, in this case next.

next/Pretty.java next/Tree.java ... 

Then you can compile using command

javac next/*.java 

from the base directory.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.