Extern library include

36 views
Skip to first unread message

Sascha Hoffmann

unread,
Nov 5, 2012, 2:48:02 AM11/5/12
to google-we...@googlegroups.com
Hello

I have a problem with an external library. I tried to include the library in my gwt project and I would like to use the methods from the library on my clientside.
I copied the library in my web-inf/lib and included it in my classpath. in my *.gwt.xml I added the line <source path='HWString/hwstring'/>
if I start the project I get the error:

Line 5: The import hwstring cannot resolved
Line 77: HWString cannot be resolved to a type

I don't get where the problem is. Can somebody help me?

Sascha

Sebastián Gurin

unread,
Nov 5, 2012, 6:47:26 PM11/5/12
to google-we...@googlegroups.com
You can use <script> and <stylesheet> like this in your module definition:

<script src='http://yui.yahooapis.com/3.7.3/build/yui/yui-min.js' />
<stylesheet src="https://cdnjs.cloudflare.com/ajax/libs/alloy-ui/1.0.1/aui-skin-classic/css/aui-skin-classic-all-min.css"/>

For putting your library's  .js file inside your project's module :
1) create a folder "myPublicFolder" at the same location as your gwt.xml file and copy yourLibrary.js inside
2) add <public path="myPublicFolder"></public> to your gwt.xml
3) add <script src="myPublicFolder/yourLibrary.js"></script> to your gwt.xml
Reply all
Reply to author
Forward
0 new messages