-2

Can't find symbol issue Main.java is in the same package and directory as Database and RestrictedSQLActiveWriter but intelliji can find them on compile. they are all in DBMS/RDBMS. I have DBMS as the source folder. partner can compile on their computer so I know it is a configuration issue.

package RDBMS;

...


public class Main {
     public static void main(String[] args) throws Exception
 {

     System.out.print("Enter Query: ");
     ANTLRInputStream input = new ANTLRInputStream( System.in); //control D
     System.out.println();

     ...


     RestrictedSQLActiveVisitor visitor = new RestrictedSQLActiveVisitor(new Database());
     queryTree.accept(visitor);
 }

Error

Error:(58, 18) java: cannot find symbol
 symbol:   class Database
 location: class RDBMS.Main
Error:(58, 38) java: cannot find symbol
 symbol:   class Database
 location: class RDBMS.Main
Error:(66, 18) java: cannot find symbol
symbol:   class RestrictedSQLActiveVisitor
location: class RDBMS.Main
Error:(66, 59) java: cannot find symbol
symbol:   class RestrictedSQLActiveVisitor
location: class RDBMS.Main
Error:(66, 90) java: cannot find symbol
symbol:   class Database
location: class RDBMS.Main
user3676491
  • 31
  • 1
  • 5
  • I'd recommend setting up your directory structure following the Maven arrangement and marking the source folder appropriately. IntelliJ knows how to do this properly. https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html – duffymo Apr 24 '21 at 22:36
  • I rearranged it to that style but to the same effect. – user3676491 Apr 24 '21 at 22:49

1 Answers1

-1

Files weren't .java for some reason

user3676491
  • 31
  • 1
  • 5