如何编辑 Java 库的构建属性

发布于 2024-11-09 16:41:08 字数 577 浏览 1 评论 0原文

似乎有一些类似的问题,但没有足够具体的问题,我希望这没问题。

我想知道如何编辑 Jamod MODBUS 库的构建属性,以便使用 RxTx API 而不是已弃用的 javax.comm。图书馆页面说这是支持的:

您需要安装 Java 通信 API 扩展 (javax.comm) 的实现才能运行串行 modbus 应用程序。 请注意,还支持通过布尔构建属性 build.serial.gnu 使用 gnu.io 前缀 (RXTX) 进行构建(true 将导致构建过程在使用的源中将 javax.comm 前缀替换为 gnu.io用于构建)。

更多信息请参见:http://jamod.sourceforge.net/development/project_build.html

我不确定如何访问该文件,或者这样做的技术。我需要创建它还是编辑现有的?我在项目中寻找build.xml,但没有运气,并用谷歌搜索了很多次。非常感谢任何帮助。

There seem to be some similar questions, but nothing quite specific enough, I hope this is OK.

I am wondering how to edit the build properties of the Jamod MODBUS library so as to use the RxTx API instead of the deprecated javax.comm. The Library page says this is supported:

You will need an implementation of the Java Communications API extension (javax.comm) installed to be able to run serial modbus applications.
Note that there is also support for building with the gnu.io prefix (RXTX), via the boolean build property build.serial.gnu (true will cause the build process to replace the javax.comm prefix with gnu.io in the sources used for builds).

More info here: http://jamod.sourceforge.net/development/project_build.html

I am unsure how to access this file, or the technique for doing so. Do I need to create it or edit and existing one? I have look for build.xml in the project, but no luck, and have googled many times. Any help very much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

安静被遗忘 2024-11-16 16:41:08

只需使用 IDE (例如 Netbeans),然后用 gnu.io 替换所有出现的 javax.comm,来自 rxtx,将 RXTXcomm.jar 库添加到项目中,如果您使用的是 Windows,则将 rxtxSerial.dll 复制到例如 C:\windows\system32。

它会起作用的。祝你好运

Just open the proyect source (you can download it from rxtx) with an IDE (for example Netbeans) then replace every appearance of javax.comm by gnu.io, from rxtx, add RXTXcomm.jar library to project, and if you are using windows then copy and rxtxSerial.dll for example to C:\windows\system32.

It will work. Good Luck

影子的影子 2024-11-16 16:41:08
The " Modbus Jamod Project - Original " folder contains the original project is available at
Web http://jamod.sourceforge.net/ . This project has a significant dependence :

[1 ] javax.comm : comm : jar :3.0 -u1
Description : The Java Communications 3.0 API is a Java extension That Facilitates develop developing platform -independent communications applications for technologies : such as Smart Cards , embedded systems, and point -of -sale devices , financial services devices , fax , modems, display terminals , and robotic equipment .

This API is not available from Oracle repositories .

That's why you have to open the " Jamod -1.2 -SNAPSHOT - sources.jar " project and recompile using other libraries for serial communication. This project is now ready to " Modbus Jamod Project with CXR " to 64 Bits.




METHOD OF SOLUTION OF DEPENDENCE
-------------------------------------------

To recompile the Jamod (Modbus Jamod Project - Original) project, you must open the project with Netbeans clear the javax.comm library , and replaced with the rxtx library. CXR This library can be selected which are in the " CXR - Serial comms Java " folder , ie :
[1 ] MFZ - rxtx -2.2- 20081207 -linux- i386
[2 ] MFZ - rxtx -2.2- 20081207 -x86_64 -linux
[3 ] MFZ - rxtx -2.2- 20081207 -win- ia64
[4 ] MFZ - rxtx -2.2- x64 -win- 20081207
[5 ] MFZ - rxtx -2.2- x86 -win- 20081207

We must take into account the following when choosing :

Windows
-------

Select a binary build - x64 or x86 (based on Which version of
the JVM you are installing to)

NOTE : You MUST match your architecture . You can not install the i386
version on a 64 - bit version of the JDK and vice - versa.

For a JDK installation:

Copy RXTXcomm.jar ---> <JAVA_HOME> \ jre \ lib \ ext
Copy rxtxSerial.dll ---> <JAVA_HOME> \ jre \ bin
Copy rxtxParallel.dll ---> <JAVA_HOME> \ jre \ bin

Linux
-----

Select a binary build - x86_64 or i386 (based on Which version of
the JVM you are installing to)

NOTE : You MUST match your architecture . You can not install the i386
version on a 64 - bit version of the JDK and vice - versa.

For a JDK installation on i386 architecture =

Copy RXTXcomm.jar ---> <JAVA_HOME> / jre / lib / ext
Copy librxtxSerial.so ---> <JAVA_HOME> / jre/lib/i386 /
Copy librxtxParallel.so ---> <JAVA_HOME> / jre/lib/i386 /

NOTE : For a JDK installation on architecture = x86_64 , just change the
i386 to x86_64 above.

-------------------------------------------------- -----------------------------------------------

After this replace the javax.comm library , the Jamod (Modbus Jamod Project - Original) project is recompiled , and the generated Jar Crossover is added.

When the Crossover project contains the library Jamod repaired , it will have to also add the RXTX library to Crossover.

Done.

-------------------------------------------------- -----------------------------------------------
The " Modbus Jamod Project - Original " folder contains the original project is available at
Web http://jamod.sourceforge.net/ . This project has a significant dependence :

[1 ] javax.comm : comm : jar :3.0 -u1
Description : The Java Communications 3.0 API is a Java extension That Facilitates develop developing platform -independent communications applications for technologies : such as Smart Cards , embedded systems, and point -of -sale devices , financial services devices , fax , modems, display terminals , and robotic equipment .

This API is not available from Oracle repositories .

That's why you have to open the " Jamod -1.2 -SNAPSHOT - sources.jar " project and recompile using other libraries for serial communication. This project is now ready to " Modbus Jamod Project with CXR " to 64 Bits.




METHOD OF SOLUTION OF DEPENDENCE
-------------------------------------------

To recompile the Jamod (Modbus Jamod Project - Original) project, you must open the project with Netbeans clear the javax.comm library , and replaced with the rxtx library. CXR This library can be selected which are in the " CXR - Serial comms Java " folder , ie :
[1 ] MFZ - rxtx -2.2- 20081207 -linux- i386
[2 ] MFZ - rxtx -2.2- 20081207 -x86_64 -linux
[3 ] MFZ - rxtx -2.2- 20081207 -win- ia64
[4 ] MFZ - rxtx -2.2- x64 -win- 20081207
[5 ] MFZ - rxtx -2.2- x86 -win- 20081207

We must take into account the following when choosing :

Windows
-------

Select a binary build - x64 or x86 (based on Which version of
the JVM you are installing to)

NOTE : You MUST match your architecture . You can not install the i386
version on a 64 - bit version of the JDK and vice - versa.

For a JDK installation:

Copy RXTXcomm.jar ---> <JAVA_HOME> \ jre \ lib \ ext
Copy rxtxSerial.dll ---> <JAVA_HOME> \ jre \ bin
Copy rxtxParallel.dll ---> <JAVA_HOME> \ jre \ bin

Linux
-----

Select a binary build - x86_64 or i386 (based on Which version of
the JVM you are installing to)

NOTE : You MUST match your architecture . You can not install the i386
version on a 64 - bit version of the JDK and vice - versa.

For a JDK installation on i386 architecture =

Copy RXTXcomm.jar ---> <JAVA_HOME> / jre / lib / ext
Copy librxtxSerial.so ---> <JAVA_HOME> / jre/lib/i386 /
Copy librxtxParallel.so ---> <JAVA_HOME> / jre/lib/i386 /

NOTE : For a JDK installation on architecture = x86_64 , just change the
i386 to x86_64 above.

-------------------------------------------------- -----------------------------------------------

After this replace the javax.comm library , the Jamod (Modbus Jamod Project - Original) project is recompiled , and the generated Jar Crossover is added.

When the Crossover project contains the library Jamod repaired , it will have to also add the RXTX library to Crossover.

Done.

-------------------------------------------------- -----------------------------------------------
友欢 2024-11-16 16:41:08

如果您在 http://sourceforge.net/projects/jamod/files/jamod/1.2/jamod-1.2rc1-src.zip/download

解压后,你会发现build.xml 和 build-snap.xml,以及 build.properties 文件,它允许您指定 build.serial.gnu。

然后,您只需安装 ant 并在目录中运行它即可启动构建。

编辑:我也没有安装 Apache Forrest,它似乎用于生成文档,因此我还需要注释掉 build.xml 中对 Forrest 的所有引用。

There is a copy of a build.xml file if you download the source ZIP of version 1.2rc1 at http://sourceforge.net/projects/jamod/files/jamod/1.2/jamod-1.2rc1-src.zip/download

If you unzip, you will find build.xml and build-snap.xml, as well as the build.properties file, which lets you specify the build.serial.gnu.

You then just need to install ant and run it in the directory to initiate the build.

Edit: I also didn't have Apache Forrest installed, which appears to be using for generating the docs, so I needed to comment out all references to Forrest in the build.xml as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文