On Mar 28, 7:46 pm, Rich <rvdown...@gmail.com> wrote:
> On Mar 28, 1:11 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
>
> > It's Java, so putting a class with the very same fully-qualified name
> > earlier in the classpath is enough to do an "override"; without even
> > modifying the JAR.
> > Or you can also modify the JAR (hint: a JAR is hardly different from a
> > ZIP), no need to recompile as GWT needs the source (*.java) file, not
> > the compiled (*.class) one (except in DevMode, but again, it's Java:
> > you can compile a single java->class, you don't have to compile the
> > "whole project")
>
> Not sure how to use the same fully-qualified name without the file
> being in the same place as the one it is intending to replace.

Not at all. Think "class path".

> If it
> is in the same place, then it seems I have to remove the old one from
> the jar and put the new .java file in the jar and then recompile.  I
> haven't compiled a file using java (as opposed to an IDE) in many
> years.   I wouldn't know how to set up a project to compile one lonely
> java source file.

Assuming you're using Eclipse:
1. Open (double-click) the file from the JAR, Eclipse should show you
the source (as it lives within the JAR). Copy.
2. Create a new class in your project with the same package and class
name. Paste (replacing everything else in the file).
3. Make your change
4. in your project's "build path", in the "order and export" tab, make
sure your source folder comes before the gwt-user.jar (i.e. earlier in
the classpath)

That's it!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to