A new comer needs your help

when I read 4.3.1 of Book of Vaadin(Vaadin 6.4),I created another java file,which included the function:init() and was put in the same package with the java code file in the book.when it run in Eclipse,problem came:

   javax.servlet.ServletException: Failed to load application class: com.example.windowopener.Windowopener
com.vaadin.terminal.gwt.server.ApplicationServlet.init(ApplicationServlet.java:71)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Thread.java:619)

Following are my source code :


Windowopener.java

package com.example.windowopener;

import com.vaadin.ui.*;
import com.vaadin.Application;

public class Windowopener extends Application
{
public void init()
{
Window main=new Window(“the main window”);
setMainWindow(main);
main.addComponent(new Subwindow(“window opner”,main));
}
}


Subwindow.java

package com.example.windowopener;

import com.vaadin.ui.*;
import com.vaadin.Application;

/** Component contains a button that allows opening a window. */
public class Subwindow extends CustomComponent
implements Window.CloseListener {
Window mainwindow; // Reference to main window
Window mywindow; // The window to be opened
Button openbutton; // Button for opening the window
Button closebutton; // A button in the window
Label explanation; // A descriptive text
public Subwindow(String label, Window main) {
mainwindow = main;
// The component contains a button that opens the window.
final VerticalLayout layout = new VerticalLayout();

    openbutton = new Button("Open Window", this,
                            "openButtonClick");
    explanation = new Label("Explanation");
    layout.addComponent(openbutton);
    layout.addComponent(explanation);
    
    setCompositionRoot(layout);
}
/** Handle the clicks for the two buttons. */
public void openButtonClick(Button.ClickEvent event) {
    /* Create a new window. */
    mywindow = new Window("My Dialog");
    mywindow.setPositionX(200);
    mywindow.setPositionY(100);
    /* Add the window inside the main window. */
    mainwindow.addWindow(mywindow);
    /* Listen for close events for the window. */
    mywindow.addListener(this);
    /* Add components in the window. */
    mywindow.addComponent(
            new Label("A text label in the window."));
    closebutton = new Button("Close", this, "closeButtonClick");
    mywindow.addComponent(closebutton);
    /* Allow opening only one window at a time. */
    openbutton.setEnabled(false);
    explanation.setValue("Window opened");
}
/** Handle Close button click and close the window. */
public void closeButtonClick(Button.ClickEvent event) {
    /* Windows are managed by the application object. */
    mainwindow.removeWindow(mywindow);
    /* Return to initial state. */
    openbutton.setEnabled(true);
    explanation.setValue("Closed with button");
}
/** In case the window is closed otherwise. */
public void windowClose(Window.CloseEvent e) {
    /* Return to initial state. */
    openbutton.setEnabled(true);
    explanation.setValue("Closed with window controls");
}

}

I need your help who can tell me how can I run the source code regarding with CustomComponent,not creat a vaadin customcomponent(composite) project.Thank you!