Quick Search


Tibetan singing bowl music,sound healing, remove negative energy.

528hz solfreggio music -  Attract Wealth and Abundance, Manifest Money and Increase Luck



 
Your forum announcement here!

  Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums > Other Methods of FREE Advertising > Manual Traffic Exchanges

Manual Traffic Exchanges This is a list of Manual traffic exchanges that you can use to get your site viewed by thousands of people a week. Manual traffic exchanges are better known for quality over the quantity you find with auto surfs. But both are great for generating traffic.

Reply
 
Thread Tools Search this Thread Display Modes
Old 03-19-2011, 03:06 AM   #1
nikeshoes6i
Commander In Chief
 
Join Date: Feb 2011
Posts: 2,859
nikeshoes6i is on a distinguished road
Default boss for men If you are using Linux/RxTx

用 Java 通过串口发短信其实很简单,因为有现成的类库供我们使用。有底层的类库,也有封装好一点的类库,下面我介绍 一下在 Win32 平台下发送短信的方法。
如果你想用更底层的类库开发功能更强大的应用程序有两种选择:一个是 SUN Java Comm(下载地址:https://sdlc5c.sun.com/ECom/EComActionServlet;jsessionid=5BDA74750704D3761CF12 BDC9C4E6F5D),另一个是 RxTx (下载地址:Rxtx.zip)
用这两个类库开发程序的先决条件是你要很好掌握串口的知识,比如 AT 命令等,这些基本知识学起来是需要一定时间的,不过不用担心,现在也有开源的已经封装好的类库供我们使用, 这就是 SMSLib - SMS Processing Libraries (下载地址:SMSLib),今后的几篇系列文章主要目的就是介绍 SMSLib 的使用,今天首先就是要安装环境了,注意最新的 SMSLib 只能在 JRE5.0 或以后的版本才能运行。
SMSLib 也是构建在 SUN Java Comm 和 RxTx 基础之上的,这两个类库你可以自己选择,不过 SMSLib 默认采用的是 SUN Java Comm(即你下载下来的 SMSLib 包中的 dist\lib 目录下的 smslib-2.1.2.jar 是用 SUN Java Comm 编译生成的),
如果你想更换成 RxTx 就需要更改 SMSLib 的源文件并重新编译,具体方法为:
将 src\java\org\smslib 文件夹下的 CSerialDriver.java 这个文件的 "import javax.comm.*;" 修改为 "import gnu.io.*;",然后用 ant 工具重新编译生成的 jar 文件就是基于 RxTx 实现的。
下面介绍一下 SUN Java Comm 和 RxTx 的安装过程:
1. SUN Java Comm:
  将 "javax.comm.properties" 拷贝到 "%JREHOME%/lib" 目录下
  将 "win32com.dll" 拷贝到 "%JREHOME%/bin" 目录下
2. RxTx
  将 "rxtxSerial.dll" 拷贝到 "%JREHOME%/bin" 目录下
然后将 "comm.jar" 或者 "RXTXComm.jar" 加载到你的工程环境中就可以了,另外还要记着下载 log4j,因为 SMSLib 用到了它,boss for men
如果对串口有兴趣的朋友可以去研究一下 AT 命令,直接使用 SUN Java Comm 和 RxTx 编写应用程序,可以实现更强大的功能
RXTX-2.1以上版本,则不必使用sun的comm.jar包,只需要RXTX带的RXTXcomm.ja r包;

下面是网站原版说明:
Installation InstructionsPrerequisitesTo use SMSLib, you should install the following components:
SUN JDK 1.5 or newer. Java Communications Library. Apache ANT for building the sources. Apache log4j for logging. Apache Jakarta Commons - NET. JavaMail. Java Activation Framework (JAF). Java Communications LibraryYou have two options:
For Win32 systems you should use the SUN Java Comm v2 which is provided in the Downloads section. For other systems (Linux, Unix, BSD, etc), you are advised to install either Java Comm v3 or RxTx, whichever is available. When both choices are available, you are advised to use Java Comm v3. Java Comm InstallationThe installation procedure for both the old Java Comm v2 and the new Java Comm v3 is identical.
Java Comm v2 is for Win32 systems and it is available for download at the Downloads section.
Java Comm v3 is for Linux systems and it is available for download directly from SUN downloads. Note that registration is required.
To install it,womens dunks, unzip the downloaded archive file in a temporary place and do the following copies:
File comm.jar should go under JDKDIR/jre/lib/ext/ File javax.comm.properties should go under JDKDIR/jre/lib/ Library files (i.e. win32com.dll for Win32 or the so Linux library files) should go under JDKDIR/jre/bin/ If you have a separate JRE directory, do the same copies for the JREDIR directory!
RxTx InstallationRxTx binaries' pack is available from here. The provided link will download the distro with some standard binaries (for linux 32bit, 64 bit, etc). If binaries for your specific operating system are not included, you may consider recompiling RxTx yourselves.
To install it, unzip the distribution file in a temporary place and do the following copies:
File RXTXcomm.jar should go under JDKDIR/jre/lib/ext/ The necessary library (e.g.. for Linux 32bit, the librxtxSerial.so) should go under JDKDIR/jre/bin/ If you have a separate JRE directory,chanel vintage, do the same copies for the JREDIR directory!
Communications Library - Post-installation checklistStarting from v3.3,skechers size, SMSLib will select and use whichever comm library is installed via reflection. So there is no need to change anything in the sources - SMSLib will detect and use the comm library you have already installed by itself.
Other issues that you may have to consider:
If you are using Linux/RxTx, it has been reported that the user running the smslib enabled app should be added to the "uucp" group. If you get exceptions like "java.lang.reflect.InvocationTargetException" you may have to add your users to this group. Apache ANTDownload and install Apache Ant from here.
Apache log4jDownload Apache log4j from here. You need to have the log4j-1.2.14.jar file (1.2.14 was the current version at the time of this writing) somewhere in your classpath or in Java's lib/ext directories.
Apache Jakarta Commons - NETDownload Apache Jakarta Commons/NET from here. You need to have the commons-net-1.4.1.jar file (1.4.1 was the current version at the time of this writing) somewhere in your classpath or in Java's lib/ext directories.
JavaMailDownload JavaMail from here. You need to have the mail.jar file somewhere in your classpath or in Java's lib/ext directories.
Java Activation Framework (JAF)Download JAF from here. You need to have the activation.jar file somewhere in your classpath or in Java's lib/ext directories.
Building SMSLibThe ANT build file provides the following targets:
all : Builds everything (classes, creates the jar file, javadocs). compile : Compiles the sources. docs : Creates the javadoc pages. clean : Cleans the temporary compile / javadoc directories. Running
ant (i.e. without a target) will give you a help screenother article


ultra short ugg boots 答案C过后一定是一顿大架或冷战

nike air yeezy shop 散发出来的都是清香

manolo heels 流水
nikeshoes6i is offline   Reply With Quote

Sponsored Links
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 10:26 AM.

 

Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum