This content has been marked as final. Show 6 replies
What do you mean by "through a phone line"?
Actually if you make a call to ISP and get access to Internet you can use any network IP you want. This is "through a phone line".
If you talk about direct connect between two modems then you should think about comm package to access com port. This is "through a phone line" as well...
u r right, but the second is my desire , it make sense coneccting two comouter directly by modem...
Then I answered already. java.comm package will help you.
"ATDxxx" etc :)
You have to connect a serial modem to your RS-232 port (serial port), and let it send/receive data over the phone line. As other guys said, you need to use java.comm package to communicate with serial port.
Note that using the comm package means that you will not be using IP and thus not be using sockets.
i've been living with this issues and discuss in this forum for some dark time.
the best way I can do is using RAS on windows (or other similar service on other OS) . Simply you have to configure your dialed computer to be able to accept incoming connection, on windows you can do this on "New Connection Wizard" by choosing "set up an advanced connection" option.
after that, you can dial a number connected on dialed computer, if dialing success, than a TCP/IP connection will be established. Then you can build java application to send/retrieve file or etc using socket.
or you can consider JDialUp API for this problem (this API help you to dial using java)