J
John
Hello,
We are testing the Microsoft Java Language Conversion Assistant 2.0 and have
run into a problem with a simple test program converted by the tool to run
on the compact framework.
The Java source is as follows:
----------------------------------------------------
static public void Main(String[] args) {
Socket lsnskt; // the socket to listen on
Socket acpskt; // the socket which was accepted
try {
System.Console.Out.WriteLine("Running socket accept application.");
lsnskt=new
Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
lsnskt.Bind(new IPEndPoint(IPAddress.Any,8080));
lsnskt.Listen(1);
System.Console.Out.WriteLine("Waiting for connection...");
acpskt=lsnskt.Accept();
System.Console.Out.WriteLine("Connection accepted
from"+acpskt.RemoteEndPoint+'.');
acpskt.Close();
lsnskt.Close();
}
catch(SocketException thr) {
System.Console.Out.WriteLine("Exception: "+thr);
System.Console.Out.WriteLine("Exception Error Code:"+thr.ErrorCode);
}
catch(Exception thr) {
System.Console.Out.WriteLine("Exception: "+thr);
}
System.Console.Out.WriteLine("Program ended.");
}
----------------------------------------------------
The resulting conversion runs fine on the 1.1 *PC* Framework but the same
..exe crashes on the PocketPC 2003 Platform with the following error message:
httpServer.exe
TypeLoadException
Could not load type
System.Net.Sockets.Tcplistener from assembly System,
Version=1.0.5000.0, Culture-neutral,PublicKeyToken=B77A5C561934E089
--
Any ideas as to why? Documentation indicates that the TCP Listener Class is
implemented in the compact framework but "could not load type" seems to
state otherwise.
Thanks,
John
We are testing the Microsoft Java Language Conversion Assistant 2.0 and have
run into a problem with a simple test program converted by the tool to run
on the compact framework.
The Java source is as follows:
----------------------------------------------------
static public void Main(String[] args) {
Socket lsnskt; // the socket to listen on
Socket acpskt; // the socket which was accepted
try {
System.Console.Out.WriteLine("Running socket accept application.");
lsnskt=new
Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
lsnskt.Bind(new IPEndPoint(IPAddress.Any,8080));
lsnskt.Listen(1);
System.Console.Out.WriteLine("Waiting for connection...");
acpskt=lsnskt.Accept();
System.Console.Out.WriteLine("Connection accepted
from"+acpskt.RemoteEndPoint+'.');
acpskt.Close();
lsnskt.Close();
}
catch(SocketException thr) {
System.Console.Out.WriteLine("Exception: "+thr);
System.Console.Out.WriteLine("Exception Error Code:"+thr.ErrorCode);
}
catch(Exception thr) {
System.Console.Out.WriteLine("Exception: "+thr);
}
System.Console.Out.WriteLine("Program ended.");
}
----------------------------------------------------
The resulting conversion runs fine on the 1.1 *PC* Framework but the same
..exe crashes on the PocketPC 2003 Platform with the following error message:
httpServer.exe
TypeLoadException
Could not load type
System.Net.Sockets.Tcplistener from assembly System,
Version=1.0.5000.0, Culture-neutral,PublicKeyToken=B77A5C561934E089
--
Any ideas as to why? Documentation indicates that the TCP Listener Class is
implemented in the compact framework but "could not load type" seems to
state otherwise.
Thanks,
John