Using my own external jars

22 views
Skip to first unread message

Juan M.M.M.

unread,
Jan 19, 2010, 9:16:46 AM1/19/10
to Google Web Toolkit
hi ppl!
This is the question. I want to use an external jar but i would like
to use them without modify the .jar file. Is that possible? I know
that I have to create a file ".gwt.xml" to set the inherit dependences
of the files. But I would to know if there is another possibility to
use the external jars. Is possible to have the ".gwt.xml" out off the
jar file?


Thanks!!

Thomas Broyer

unread,
Jan 19, 2010, 10:39:07 AM1/19/10
to Google Web Toolkit

Of course!

The gwt.xml needs be in the appropriate package, but in Java it
doesn't matter whether it's on the same folder or JAR, only that it
can be found on the classpath.

Juan M.M.M.

unread,
Jan 19, 2010, 11:14:46 AM1/19/10
to Google Web Toolkit
Ok. I'm developing my web application in eclipse. If I have my
example.jar library already referenced (Referenced libraries section)
in the project. Can I create the Example.gwt.xml file into the
com.my.project.client section?


Thanks for the answer

jfagh

unread,
Jan 19, 2010, 3:59:22 PM1/19/10
to Google Web Toolkit
Juan,
Also, you need to include both .java and .class files in your JAR. And
the .java files must not reference any unsupported libraries (i.e.
those that cannot be translated from java to js by GWT)
James

Juan M.M.M.

unread,
Jan 20, 2010, 6:14:01 AM1/20/10
to Google Web Toolkit
Ok. This is what I've done at the moment.
-I've added the external JARS.
-I've added the source code to this JARS.
...
And what about the gwt.xml file where I have to put it?

Alexander

unread,
Jan 20, 2010, 6:39:35 AM1/20/10
to google-we...@googlegroups.com
Place where you like but remeber that GWT compiler will look for client code in 'client' subpackage where xml is situated.

2010/1/20 Juan M.M.M. <knn0...@gmail.com>
--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.






--
Regards,
Alexander

Juan M.M.M.

unread,
Jan 20, 2010, 9:46:41 AM1/20/10
to Google Web Toolkit
Ok. I'm going crazy with this problem. http://www.flickr.com/photos/46306186@N05/4290746026/sizes/o/
<--- There u can see my project structure and the error log when I try
to join in the web application with firefox. I'm going crazy because I
have allready done this for another .jar (commos-fileupload-1.2.jar)
library but I can't do it with xmlutils2.0.jar and
intimeclient1.0.jar. That's what I've tried:

-Copying the .jar files into a lib folder created into the project IRn
folder. Once the libraries are there click with the right button and
then build path -> add to build path. And then these .jar files
automatically get into Referenced libraries section.

-I've tried to the same than above point but before I've included the
PATH of boths .jar into the CLASSPATH of bashrc file.

-Also, I've tried to the same and after do this I've linked the source
code of these libraries.

What else can I try?

Do you know any tutorial or manual about this?

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Juan M.M.M.

unread,
Jan 20, 2010, 10:56:02 AM1/20/10
to Google Web Toolkit
http://www.flickr.com/photos/46306186@N05/4290882114/sizes/o/ <-----
Here there is more info about the structure of the project and .jar
files that I want to use (intimeclien1.0.jar and xmlutils2.0.jar).
Also I've created the XMLUtils.gwt.xml with this content:

**************
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='es.upv.xmlutils'>
<inherits name='com.google.gwt.user.User' />
<inherits name="com.google.gwt.xml.XML" />
</module>
*****************

And Intimeclient.gwt.xml with this content:

******************
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='es.ua.jpm'>
<inherits name='com.google.gwt.user.User' />
</module>
******************
Is there any wrong sentece?. I'm renaming the modules (xxx.gwt.xml
files) because they are not into .jar package.

What's going on?


thanks!

Eric

unread,
Jan 20, 2010, 11:32:19 AM1/20/10
to Google Web Toolkit

On Jan 19, 4:59 pm, jfagh <jfa...@gmail.com> wrote:
> Juan,
> Also, you need to include both .java and .class files in your JAR. And
> the .java files must not reference any unsupported libraries (i.e.
> those that cannot be translated from java to js by GWT)
> James

He doesn't need to include the source files in the same jar. It is
perfectly
valid to build more than one file, presumably through Ant or Maven:

module.jar
module-src.jar
module-javadoc.jar

I would include module.gwt.xml in the source jar. But if he's trying
to
include third-party libraries without source code in his GWT
compilation,
he'll have problems. They should stay on the server.

Respectfully,
Eric Jablow

Juan M.M.M.

unread,
Jan 21, 2010, 5:12:48 AM1/21/10
to Google Web Toolkit
And what about RPC? Is this the solution, right?
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages