Create distributable package

1 view
Skip to first unread message

Chad Bourque

unread,
Sep 11, 2006, 9:18:26 PM9/11/06
to Google Web Toolkit
Hi all,

This should be an EASY one, but what's the best way to go about creating a project in Eclipse for the sole purpose of writing a class (that is dependent on some of the gwt classes/interfaces) that can then be added to my other (or others) projects as a jar file? I've tried just creating a new project in the same workspace. I created a jar from the two classes I initially built, but I was unable to use the jar in my other project in the workspace. I put the classpathenty in the .classpath, but still had problems with it. Should I just create a clean workspace for it? Is there anything special I need to do besides the export to jar from Eclipse?

TIA,
Chad

IamRobe...@gmail.com

unread,
Sep 12, 2006, 6:48:36 AM9/12/06
to Google Web Toolkit
I would start here, then ask if you have any questions:
http://roberthanson.blogspot.com/2006/05/how-to-package-gwt-components.html

> I created a jar from the two classes I initially built, but
> I was unable to use the jar in my other project

The typical problem is that you didn't include the .java sources in the
jar. Double check that.

GWT uses the Java source for client-side code, not the compiled
bytecode, so even when refering to another project in Eclipse you need
to reference the src directory of any referenced project.

Rob

> ------=_Part_135995_22410160.1158023906523
> Content-Type: text/html; charset=ISO-8859-1
> X-Google-AttachSize: 693
>
> Hi all,<br><br>This should be an EASY one, but what's the best way to go about creating a project in Eclipse for the sole purpose of writing a class (that is dependent on some of the gwt classes/interfaces) that can then be added to my other (or others) projects as a jar file? I've tried just creating a new project in the same workspace. I created a jar from the two classes I initially built, but I was unable to use the jar in my other project in the workspace. I put the classpathenty in the .classpath, but still had problems with it. Should I just create a clean workspace for it? Is there anything special I need to do besides the export to jar from Eclipse?
> <br><br>TIA,<br>Chad<br>
>
> ------=_Part_135995_22410160.1158023906523--

Chad Bourque

unread,
Sep 12, 2006, 9:56:22 AM9/12/06
to Google-We...@googlegroups.com
Rob,

Thanks for the link and the info. I'll play around with this today, but I'm sure I'll be able to make it work using the instructions from your blog.

Chad
Reply all
Reply to author
Forward
0 new messages