Anda di halaman 1dari 4

smslib Developer's library for sending/receiving SMS messages.

Project Home Downloads Wiki Issues Source Search for

Top of Form

Bottom of Form

Installation
Installation Instructions Updated Dec 20, 2010 by T.Deleni...@gmail.com

Installation Instructions o Prerequisites o Important Note o Java Communications Library Java Comm Installation Installation o Apache ANT o Apache log4j o Apache Jakarta Commons - NET o JSMPP Library o Building SMSLib o Now what?

Installation Instructions
Prerequisites
To use SMSLib, you should install the following components:

SUN JDK 1.6 or newer. Java Communications Library. Apache ANT for building the sources. Apache log4j. Apache Jakarta Commons - NET. JSMPP Library

Important Note
Starting from SMSLib v3.4, the installation procedure has changed a bit. Some SMSServer components that required extra dependencies have been pulled out of the main source tree. This was done in order to reduce the required third party libraries & dependency files for those wanting to use the core library. The core SMSLib/SMSServer source files can now be compiled with only two dependencies: the Simple logging facade for Java and the Apache Commons/NET for the IP modem driver. All other add-on SMSServer components are moved in the /misc/SMSServer/Interfaces/

directory, organized by development status. Installation instructions for these specific components are given in the relevant SMSServer documentation pages.

Java Communications Library


You have two options:

For Win32 systems you should use the SUN Java Comm v2. For other systems (Linux, Unix, BSD, etc), you are advised to install either Java Comm v3 or RxTx, whichever is available. There are some problems reported with Java Comm v3 on some linux distros, so if Java Comm is not working you can safely use RxTx instead.

Java Comm Installation


The 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 on the Download page. Java Comm v3 is for Linux systems and it is available for download directly from SUN downloads (registration is required) To install it, 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 Installation
The official RxTx binary pack is available 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. For a custom Win64 RxTx distro, have a look at the CloudHopper's web site. 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, do the same copies for the JREDIR directory!

Apache ANT
SMSLib uses Apache Ant for building and deployment. Download and install Apache Ant from here.

Apache log4j
SMSLib uses Apache log4j as its logging framework. Download log4j from here. You need to have the log4j-1.2.15.jar file (v1.2.15 was the current version at the time of this writing) somewhere in your classpath or in Java's lib/ext directories or in lib directory of project.

Apache Jakarta Commons - NET


Download Apache Jakarta Commons/NET from here. You need to have the commons-net2.0.jar file (v2.0 was the current version at the time of this writing) somewhere in your classpath or in Java's lib/ext directories or in lib directory of project.

JSMPP Library
Download the library from JSMPP project and install the jsmpp-2.1.0.jar (v2.1.0 was the current version at the time of this writing) somewhere in your classpath or in Java's lib/ext directories or in lib directory of project.

Building SMSLib
The ANT build file provides the following targets: compile-smslib build-smslib doc build-smsserver build-smsserverstandalone clean Running
ant

Compiles the core library. Builds the core library. Starting with v3.4.6, this target also packages the "org.ajwcc" (pduUtils) as a separate jar file. Creates the javadoc pages for the core library. Builds the SMSServer application together with SMSLib core library in one jar, making SMSServer as the startup application in the jar. Builds the SMSServer application without the SMSLib core library in one jar, making SMSServer as the startup application in the jar. Cleans the temporary compile / javadoc / class directories.

(i.e. without a target) will give you a help screen.

Now what?
If you are new to SMSLib, spend some time with the two examples ReadMessages and SendMessage (located in the src/java/examples/modem folder) to find out the basics of how to read / send messages via your phone.

Anda mungkin juga menyukai