@solomon, If you turn on the GUI the port will be in use and will not be accesible.

Mimano G. Muthondu,
Software Developer
skype : gmimano
Mobile : +254 723 615 206

--A lack of planning on your part does not constitute an emergency on my part (unknown)---




On 16 April 2013 23:48, solomon kariri <solomonkariri@gmail.com> wrote:
Hi,
That exception usually occurs when the COM port you specified cannot be accessedc by smslib.
Make sure you have the right port name argument passed to your program. In windows, these usually take the form of COM1 COM5. You can check which ports are actually defined from the computer manager. Also, if the modem you are accessing has an accompanying driver with a GUI make sure the GUI is running. Sometimes the modem needs to be turned on by the driver to be accessible.


On Tue, Apr 16, 2013 at 10:19 PM, walton goga <waltgoga@gmail.com> wrote:

The issue you're raising is vague:
1. What you're executing in in command prompt is a jar file. How did you run it in netbeans.
2. If you managed to send or receive SMS via netbeans you had to be using an emulator with a dedicated port.

On Apr 16, 2013 9:16 PM, "Richard Gathogo" <muraguri2005@gmail.com> wrote:
Have you added javax.comm.properties in the lib directory?


On Tue, Apr 16, 2013 at 9:05 PM, Martin Chiteri <martin.chiteri@gmail.com> wrote:

In relation to the ports problem, your application could be opening one with a number between 0 and 1024. These are usually reserved for use by an operating system. If this is the case let your code assign one with a higher value, say 8001 that is not in use.

Martin.

On Apr 16, 2013 7:36 PM, "Martin Chiteri" <martin.chiteri@gmail.com> wrote:
Hello Peter,


On Tue, Apr 16, 2013 at 7:06 PM, Peter Muchemi <pmuchemi@gmail.com> wrote:
I've had a small issue with smslib really tying me down.

I am experimenting with the sms lib. The code works as expected in netbeans. sending and receiving sms's

when i run the same .jar in the command prompt it fails with a noportfound exception.

ive tried going thru stakeoverflow and googled to no avail. added all possible paths to the classpah. still no luck

tried running the same from the cmd with no luck.

my classpath is as below

C:\Program Files\Java\jdk1.7.0_11;C:\Program Files\Java\jdk1.7.0_11\lib\;C:\Prog
ram Files\Java\jdk1.7.0_11\jre\lib\ext;c:\windows\system32;C:\Program Files\Java
\jdk1.7.0_11\jre\bin;C:\Program Files\Java\jdk1.7.0_11\jre\lib; D:\dev_java\sms\
smsquery\dist\lib; D:\dev_java\sms\smsquery\dist

Specifying the classpath from the cmd as below

java -classpath D:\dev_java\sms\smsquery\dist\lib  -jar smsquery.jar

org.smslib.GatewayException: Comm library exception: java.lang.RuntimeException:
 javax.comm.NoSuchPortException
        at org.smslib.modem.SerialModemDriver.connectPort(SerialModemDriver.java
:102)
        at org.smslib.modem.AModemDriver.connect(AModemDriver.java:114)
        at org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:189)
        at org.smslib.Service$1Starter.run(Service.java:277)


From the Stack trace, it seems like the issue is not with the classpath. Rather, the V.M seems to be complaining about a port on your host. You can check to see if your firewall is up or there is an active blockage of "strange" applications by your anti-virus software.

I am saying this because I know for a fact that Netbeans usually places its library on the folder dist/lib/ when it deploys your project.

Martin.
 
any ideas?
--
Peter Muchemi




_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------

Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke


_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------

Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke


_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------

Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke

_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------

Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke



--
Solomon Kariri,

Software Developer,
Cell: +254736 729 450
Skype: solomonkariri

_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------

Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke