• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

can't able to compile javabean file

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am having two javabean files dog.java and person.java inside tomcat/webapps/jsp7/web-inf/classes/foo


----------------------------------------------------------
code of dog.java
----------------------------------------------------------
package foo;

public class Dog {
String name;

public void setName(String name) {
this.name = name;
}

public String getName() {
return name;
}
}

---------------------------------------------------------------------------------
code of person.java
-------------------------------------------------------------------------------
package foo;

public class Person {
String name;
Dog dog;

public void setDog(Dog dog) {
this.dog = dog;
}
public void setName(String name) {
this.name = name;
}

public Dog getDog() {
return dog;
}

public String getName() {
return name;
}
}

The problem is : dog.java files compiles very well, but person.java is not able to compile it shows an error : cannot find symbol Dog
 
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
javac -d . *.java
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on JSP.

For more information, please read this.

This post has been moved to a more appropriate forum.

 
You can't have everything. Where would you put it?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic