我能救评论在我的JAR文件(使用Ant生成)的信息? [英] Can i save comment info in my Jar file(generated by Ant)?

查看:215
本文介绍了我能救评论在我的JAR文件(使用Ant生成)的信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我建立我的项目使用Ant JAR文件,我生成Javadoc同一时间。

When I build my project to a Jar file with Ant, I generate javadoc the same time.

于是,我就加上在位置路径的javadoc位置的Javadoc文件'我的新项目的性质,这是行不通的,即使Eclipse的告诉我位置可能是有效的。

So I tried to add the javadoc files' location path in 'javadoc Location' of Properties of my new Project,it doesn't work, even if Eclipse tell me the 'Location is likely valid'.

当我在浏览器中打开它,网址是像的file:///文件:/ C:/Users/topxebec/Desktop/doc/index.html ,有两家preFIX的URL,但在eclipse我只有文件:/ C:/Users/topxebec/Desktop/doc/index.html,

When I open it in Browser,the Url is like file:///file:/C:/Users/topxebec/Desktop/doc/index.html, there's two prefix in the url,but in the eclipse I only have file:/C:/Users/topxebec/Desktop/doc/index.html,.

我试图将其更改为 C:/用户/ tongxuebin /桌面/ DOC / 但是Eclipse说,这是一个无效的网址

I tried to change it to C:/Users/tongxuebin/Desktop/doc/ but Eclipse said it was a Invalid URL.

那么如何解决这个问题呢?或者,可以通过时产生的蚂蚁是我只是保存在罐子的意见?

So how to solve this problem? Or,can I simply save the comments in the Jar when it generated by Ant?

推荐答案

看来,你不能把javadoc的在同一个罐子的类文件,使日食会自动显示该文档。

It seems, that you can't put the javadoc in the same jar as the class files, so that eclipse will automatically show the doc.

一个解决方案是包括源 - code。这也将有所帮助,如果您需要调试该JAR的类。

A solution is to include the source-code. This will also help, if you need to debug the classes in that jar.

这答案:<一href=\"http://stackoverflow.com/questions/5497009/how-can-i-build-my-jar-file-so-that-users-who-use-the-library-will-be-able-to-se\">How我可以建立我的jar文件,这样谁使用这个库的用户将能够看到在Eclipse的Javadoc 涵盖如此。但它只是归结为:

This answer: How can I build my jar file so that users who use the library will be able to see the javadoc in Eclipse covers that case. But it just boils down to:

<target name="jar.noCompile.src">  
    <jar destfile="${ant.project.name}.jar">  
      <fileset dir="${classes}"/>  
      <fileset dir="${src}" includes="**/*.java"/>  
    </jar>  
</target>  

这篇关于我能救评论在我的JAR文件(使用Ant生成)的信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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