只需要在服务器端将外部库添加到GWT项目中 [英] Need to add external libraries to GWT project on the server side only

查看:109
本文介绍了只需要在服务器端将外部库添加到GWT项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找将一些外部java库(jar文件)整合到GWT项目中。请注意,我不需要它们编译为JavaScript,因为它们仅在服务器端被调用。我已将这些文件复制到web-inf / lib中,但eclipse似乎无法识别它们。我需要调用函数只从服务器端这些jar文件。


解决方案

要包括在Eclipse的GWT项目外部罐子你必须执行2个步骤:


  • 将文件放在WEB-INF / lib目录中,就像您已经做过的那样

  • 在Eclipse中的Java Build Path中包含jar。您可以在Project - > Properties - > Java Build Path中找到它。



如果您将jar放在WEB-INF中,它的方法只从服务器端,你会没事的。


I am looking to integrate a bunch of external java libraries (jar files) into a GWT project. Note that I do not need them to compile into javascript because they are being called only on the server side. I've copied the files into web-inf/lib but eclipse does not seem to recognize them. I need to call functions in these jar files from the server side only.

解决方案

To include external jars in an Eclipse's GWT project you must perform 2 steps:

  • Put the files in the WEB-INF/lib directory as you already did
  • Include the jars in your Java Build Path in Eclipse. You will find it in Project -> Properties -> Java Build Path

If you put the jars in the WEB-INF and you call its methods only from the server side, you'll be fine.

这篇关于只需要在服务器端将外部库添加到GWT项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆