You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kimberly Begley <ki...@gmail.com> on 2008/03/05 01:58:23 UTC
problem compiling HelloWorldTest.java
Hello,
I'm going through the struts2 bootstrap/HelloWorld tutorial and am having
some problems.
When I compile HelloWorld. java I get the this warning:
javac -d . HelloWorld.java
----------
1. WARNING in HelloWorld.java (at line 3)
public class HelloWorld extends ActionSupport {
^^^^^^^^^^
The serializable class HelloWorld does not declare a static final
serialVersionUID field of type long
and then when I compile HelloWorldTest.java I get these errors:
javac -d . HelloWorldTest.java
----------
1. ERROR in HelloWorldTest.java (at line 9)
HelloWorld hello_world = new HelloWorld();
^^^^^^^^^^
HelloWorld cannot be resolved to a type
----------
2. ERROR in HelloWorldTest.java (at line 9)
HelloWorld hello_world = new HelloWorld();
^^^^^^^^^^
HelloWorld cannot be resolved to a type
----------
3. ERROR in HelloWorldTest.java (at line 16)
HelloWorld.MESSAGE.equals(hello_world.getMessage()));
^^^^^^^^^^
HelloWorld cannot be resolved
----------
3 problems (3 errors)
I'm not sure if the errors are related to the warning I got about
HelloWorld.java - any suggestions?
Thanks
--
Re: problem compiling HelloWorldTest.java
Posted by Kimberly Begley <ki...@gmail.com>.
Thanks!
On Wed, Mar 5, 2008 at 11:19 AM, Dave Newton <ne...@yahoo.com> wrote:
> --- Kimberly Begley <ki...@gmail.com> wrote:
> > javac -d . HelloWorldTest.java
> > ----------
> > 1. ERROR in HelloWorldTest.java (at line 9)
> > HelloWorld hello_world = new HelloWorld();
> > ^^^^^^^^^^
> > HelloWorld cannot be resolved to a type
> > ----------
> > 2. ERROR in HelloWorldTest.java (at line 9)
> > HelloWorld hello_world = new HelloWorld();
> > ^^^^^^^^^^
> > HelloWorld cannot be resolved to a type
> > ----------
> > 3. ERROR in HelloWorldTest.java (at line 16)
> > HelloWorld.MESSAGE.equals(hello_world.getMessage()));
> > ^^^^^^^^^^
> > HelloWorld cannot be resolved
> > ----------
> > 3 problems (3 errors)
> >
> > I'm not sure if the errors are related to the warning I got about
> > HelloWorld.java - any suggestions?
>
> HelloWorld is not on your classpath when you're compiling HelloWorldTest.
> The
> serialization warning is not related to that compilation problem.
>
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Kimberly Begley
Re: problem compiling HelloWorldTest.java
Posted by Dave Newton <ne...@yahoo.com>.
--- Kimberly Begley <ki...@gmail.com> wrote:
> javac -d . HelloWorldTest.java
> ----------
> 1. ERROR in HelloWorldTest.java (at line 9)
> HelloWorld hello_world = new HelloWorld();
> ^^^^^^^^^^
> HelloWorld cannot be resolved to a type
> ----------
> 2. ERROR in HelloWorldTest.java (at line 9)
> HelloWorld hello_world = new HelloWorld();
> ^^^^^^^^^^
> HelloWorld cannot be resolved to a type
> ----------
> 3. ERROR in HelloWorldTest.java (at line 16)
> HelloWorld.MESSAGE.equals(hello_world.getMessage()));
> ^^^^^^^^^^
> HelloWorld cannot be resolved
> ----------
> 3 problems (3 errors)
>
> I'm not sure if the errors are related to the warning I got about
> HelloWorld.java - any suggestions?
HelloWorld is not on your classpath when you're compiling HelloWorldTest. The
serialization warning is not related to that compilation problem.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org