• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java compiling multiple source files  RSS feed

 
siva subramaniam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two java source files.

Layout.java and Board.java

I have used some static variables in Layout class and used it in Board.java

I have instantiated Board in Layout class.

Now i'm facing a problem that i cant be able to compile any of the files. javac comes up with the error "Cannot find symbol" . How to fix this???

 
Tim Moores
Saloon Keeper
Posts: 4034
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javac *.java
 
siva subramaniam
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:javac *.java


It doesn't work.. I get the same error!!
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is your code small enough that you can post it here? If it isn't small, can you shrink it down to the smallest size that still shows your problem?
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
siva subramaniam wrote: javac comes up with the error "Cannot find symbol" . How to fix this???



It's also telling you what symbol it can't find and where you're trying to use that symbol that doesn't exist in that context.

Error message are your friends. You need to pay close attention to them.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!