backgroud找不到 看看classes中有没有 或者 将其路径放到环境变量的classpath中

解决方案 »

  1.   

    如果background是个package的话,用import background.*
      

  2.   

    没有找到包,所以你得把这个包包括到类路径classpath里面
      

  3.   

    没有找到这个包,看看文件下的WEB-INF/classes/有没有background这个包
      

  4.   

    是不是要把background.java编译成一个background.class放在那里呀?但是现在background.java编译有问题,过不了!请看
    //=====background.java
    public class background{
    private String backgroundColor="";
    private String textColor="";
    private int size=1;
    public background(){
    public void setBackgroundColor(String backgroundColor){
    this.backgroundColor=backgroundColor;
    }
    public String getBackgroundColor(){
    return this.backgroundColor;
    }
    public void setTextColor(String textColor){
    this.textColor=textColor;
    }
    public String getTextColor(){
    return this.textColor;
    }
    public void setSizse(int size){
    this.size=size;
    }
    public int getSize(){
    return this.size;
    }
    }
    提示:
    public void setBackgroundColor(String backgroundColor){
    ^
    background.java:23 ';' expectedbackground.java:24 '}' expected
      

  5.   

    下面这个还是有问题:提示illegal start of expression
    public class background{
    private String backgroundColor="";
    private String textColor="";
    private int size=1;
    public background(){
    public void setbackgroundColor(String backgroundColor){
    this.backgroundColor=backgroundColor;
    }
    public String getBackgroundColor(){
    return this.backgroundColor;
    }
    public void setTextColor(String textColor){
    this.textColor=textColor;
    }
    public String getTextColor(){
    return this.textColor;
    }
    public void setSizse(int size){
    this.size=size;
    }
    public int getSize(){
    return this.size;
    };
    }
    }