What's the best way to modify a GWT library in

2019-08-26 03:12发布

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?

标签: java gwt jar
2条回答
Anthone
2楼-- · 2019-08-26 03:30

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>
查看更多
相关推荐>>
3楼-- · 2019-08-26 03:37

You can do it by adding its path(desired class which you want to change) to your source path, packages should be the same with jar's path, but it should be created in your src.

查看更多
登录 后发表回答