在jar中修改GWT库的最佳方法是什么? [英] What's the best way to modify a GWT library in a jar?

查看:91
本文介绍了在jar中修改GWT库的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想改变gwt-log的工作方式。我有它的所有源代码的jar文件,我使用的是eclipse。我怎样才能改变源代码,重新编译它,并将它作为一个jar文件导出,我可以将它们交换到我的项目中去?

解决方案

您可以在Eclipse中检出Google SVN存储库中的来源,这些来源将为您创建项目。另一种方法是在Eclipse中简单地创建一个空的Java项目,并将源文件从jar转储到src文件夹中。



为了制作jar,通常你需要一个ant build文件,因为Eclipse不会为你制作jar。因此,项目根文件夹中的这些行:

 <?xml version =1.0encoding =UTF-8 >?; 
< project name =GWTLog.makejardefault =makejarbasedir =。>
< target name =makejardescription =为GWTLog项目创建一个jar>
< jar jarfile =gwt-log-custom-3.0.4.jarincludes =*。classbasedir =bin/>
< / target>
< / project>


I want to change the way gwt-log works. I have the jar file with all of the source in it, and I'm using eclipse. How can I make a change to the source, recompile it, and export it as a jar file that I can just swap into my project?

解决方案

You can checkout the sources from Google SVN repository in Eclipse which will create the project for you.

Another way is to simple create an empty Java project in Eclipse and dump the source files from the jar into the src folder.

To make the jar, typically you'll need an ant build file, as Eclipse doesn't make the jar for you. So something along these lines in the project root folder:

<?xml version="1.0" encoding="UTF-8"?>
  <project name="GWTLog.makejar" default="makejar" basedir=".">
  <target name ="makejar" description="Create a jar for the GWTLog project">
    <jar jarfile="gwt-log-custom-3.0.4.jar" includes="*.class" basedir="bin"/>
  </target>
  </project>

这篇关于在jar中修改GWT库的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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