Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add external Jar file into GWT project

Tags:

gwt

I am going to use jacob.jar. But the problem is the jacob jar file don't have xxx.gwt.xml file. So I not able to inherit it into my project xml file.

How to resolve this problem? or GWT not allow us to add external JAR file?

like image 818
guaz Avatar asked Mar 03 '10 02:03

guaz


People also ask

How do I add a jar file to a Lib folder?

After you create a Java project, create a new folder by going to File > New > Folder. Call it “lib”. Then import the JAR file into the lib folder by going to File > Import > General > File. Alternatively, you could just copy the JAR file manually into that folder by navigating to it in your workspace.

Why can I not add external JARs in eclipse?

You have selected the JRE System Library in the panel. Un-select that and you will be able to add external jars. You can click on the Classpath or Modulepath to move the control away. Please download the jars from here.


1 Answers

I not solved the problem. Because I found another GWT lib can fulfill my requirement. But I got one suggestion from GWT Forum. I hope it can help u! Please See Below :

Blockquote The library you are trying to use is intended for running in a java VM, not a browser's javascript engine. You need either a javascript library to wrap with JSNI, or a java library that meets the requirements below. Google openid gwt and you'll see how people have been able to use openid with gwt.

Blockquote The GWT java->javascript compiler used to create client browser code does not translate any arbitrary Java library for you. For one, it is limited to emulating a subset of the java JRE, so any library may only use that subset of java JRE functionality. For two, it works on the java source code, so any library you expect to use on the client side must be packaged to include its source. There are plenty of libraries people have packaged for use on the GWT client side, but they are packaged using GWT's packaging standard with an xml description file, must include the source, and use the restricted subset of the JRE. http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsCompatibility.html

like image 86
guaz Avatar answered Sep 28 '22 08:09

guaz