Android和XML解析器STAX-1.2.0.jar与使用源 [英] Android and XML Parser stax-1.2.0.jar versus using the source

查看:300
本文介绍了Android和XML解析器STAX-1.2.0.jar与使用源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我这里发现对Java StAX的源$ C ​​$ c和jar文件。这些文件都有版权所有2004年BEA系统有限公司在他们中。 BEA被甲骨文在2008年买的。

I found the source code and jar files for Java StAX here. The files all have "Copyright 2004 BEA Systems, Inc." in them. Bea was bought by Oracle in 2008.

我把两个jar文件的库目录,并在构建路径中包括它们。但后来我得到一个漫长的错误信息有关使用别人的code和系统包名称后面跟的Dalvik的错误,基本上说我不能使用有Javax.xml.xxxx包名的jar文件。

I put the two jar files in the libs directory and included them in the build path. But then I get a lengthy error message about using someone else's code and system package names followed by a Dalvik error that basically says I can't use jar files that have Javax.xml.xxxx package names.

如果我不是把源$ C ​​$ C到我的src目录,并重构所有的javax的。目录到别的东西,它的工作原理。

If I instead put the source code into my src directory and refactor all of the javax. directories to something else, it works.

我会使用源$ C ​​$ C违反任何版权法律,并修改它与Android合作?如果我修改code,使其达到目前的Java标准,并删除未使用的code?

Would I be violating any copyright laws using the source code and modifying it to work with Android? What if I modify the code to bring it up to current Java standards and remove unused code?

谢谢!

推荐答案

我得到它的工作。下面是我所做的:

I got it to work. Here is what I did:


  1. 在Eclipse中创建一个新的Java项目,提取源$ C ​​$ C文件中的 stax-src-1.2.0.zip (由codehaus下载),并导入来源$ C ​​$ C到新的项目。

  1. Create a new Java project in Eclipse, extract the source code file stax-src-1.2.0.zip (downloaded from Codehaus), and import the source code into your new project.

重构所有javax.xxxxx文件夹。我补充说:东亚银行。在所有这些的面前,就像bea.javax.xml。确保没有源文件显示错误。我不得不打开其中之一,手动或改变其进口(按addeding东亚银行的话)。

Refactor all of the javax.xxxxx folders. I added "bea." in front of all of them, like "bea.javax.xml". Make sure none of the source files show an error. I had to open one of them and manually and change its import (by addeding "bea." to it).

右键单击src和选择Export ...。爪哇 - JAR文件,并点击下一步

Right-click on src and select Export... "Java - JAR File", and click next.

在选择的资源导出,选择这两个的.classpath 的.project 。然后选择这些选项:

In "Select the resources to export", select both .classpath and .project. Then have these options selected:


  • 导出生成的类文件和资源

  • 导出Java源文件和资源

  • 选择一个目的地。在Android项目的libs目录是它会去的。

  • 的COM preSS的JAR文件的内容

  • 添加目录条目

在JAR文件在Android项目的libs文件夹,你将能够使用。我并不需要将其添加到构建路径。

Once the JAR file is in the libs folder of the Android project, you will be able to use. I didn't need to add it to the build path.

这篇关于Android和XML解析器STAX-1.2.0.jar与使用源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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