How can I make a Java application access internet using 9210?
How can I make a Java application access internet using 9210?
Running tests for Java applications which need access to the Internet with the NokiaJava 9210 emulator is simple. The emulator is enabled to use directly the Ethernet card on the PC where the application is running . Therefore, using RAS server is not necessary in this scenario.
However, when testing is done on the Nokia 9210 communicator, the Internet connection dialog will pop up to ask for an IAP account. If the connection is required to establish with the RAS server (using a Null modem cable to connect the device and a PC), both the RAS server and the IAP for RAS (an IAP account set for Null modem mode) are to be configured properly the same way as it is done for Symbian platform applications (refer to the Nokia Developer ProPoint - document and the "ras_config_N9210_communicator.pdf" for detailed information).
some Java example codes:
...
import java.net.*;
private Socket socket = null;
private DataOutputStream douts = null;
private DataInputStream dins = null;
try{
socket = new Socket("127.0.0.1", 7);
douts = new DataOutputStream(socket.getOutputStream());
dins = new DataInputStream(socket.getInputStream());
}catch (UnknownHostException e){
}catch (IOException e) {}
// if you want to keep alive, add..
try{
socket.setKeepAlive(true);
}catch (SocketException e){}
Ravi