facing problems while converting .class file to .tini file
srikanth kunamneni <kanthk4u-/[email protected]>
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Message-ID | <[email protected]> |
hi all,
i m working on tini400 board. i am facing some problem when i try to convert the following file to tini format...
my java file is as follows
import java.io.*;
import java.net.*;
import com.dalsemi.system.*;
class multiserver extends Thread
{
private Socket socket;
private BufferedReader istream;
private PrintWriter ostream;
public multiserver(Socket s) throws IOException
{
socket = s;
istream = new BufferedReader( new InputStreamReader(socket.getInputStream()));
ostream = new PrintWriter(new BufferedWriter
(new OutputStreamWriter(socket.getOutputStream())),true);
start();
}
public void run()
{
try
{
while(true)
{
String str;
str = istream.readLine();
if(str.equals("END"))
break;
System.out.println("cdry "+str);
}// end of while
}
catch (IOException ioe)
{
System.out.println("IOEXCEPTION");
}
finally
{
try
{
socket.close();
}catch(IOException ioe) {}
}
}// end of run
}// end of class multiserver Definition
public class server
{
public static final int PORT = 5588;
public static void main(String[] args)
throws IOException
{
ServerSocket s = new ServerSocket(PORT);
System.out.println("Started: " + s);
try
{
while(true)
{
Socket socket = s.accept();
try
{
new multiserver(socket);
}
catch(IOException e)
{
// If it fails, close the socket,
// otherwise the thread will close it:
socket.close();
}
}
}
finally
{
System.out.println("closing Server Socket...");
s.close();
}
}// end of main
}
Actually i am trying to implement client server programming over the Ethernet and i want to my server programm should handle multiple clients for that i had choosen multhreading ......
compiling is OK
but if try to convert this i m getting the following messages
i have converted the Blinky & Portlist examples succesfully and run the with tini board successfully
Can anybody suggest me where the problem lies
Built on or around March 20, 2002
Copyright (C) 1996 - 2002 Dallas Semiconductor Corporation.
Loading class server.class from file C:\java\jdk1.3\bin\server.class
Could not finish loading: java.lang.ClassNotFoundException: Could not find the c
lass multiserver
Exception caught: java.lang.RuntimeException: Could not finish loading: java.lan
g.ClassNotFoundException: Could not find the class multiserver
java.lang.RuntimeException: Could not finish loading: java.lang.ClassNotFoundExc
eption: Could not find the class multiserver
at com.dalsemi.system.classloader.TINIClassLoader.beginLoading(TINIClass
Loader.java:142)
at com.dalsemi.TINIConvertor.go(TINIConvertor.java:680)
at com.dalsemi.TINIConvertor.main(TINIConvertor.java:301)
at TINIConvertor.main(TINIConvertor.java:16)
Exception in thread "main" java.lang.RuntimeException: Could not finish loading:
java.lang.ClassNotFoundException: Could not find the class multiserver
at com.dalsemi.system.classloader.TINIClassLoader.beginLoading(TINIClass
Loader.java:142)
at com.dalsemi.TINIConvertor.go(TINIConvertor.java:680)
at com.dalsemi.TINIConvertor.main(TINIConvertor.java:301)
at TINIConvertor.main(TINIConvertor.java:16)
C:\java\jdk1.3\bin>
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!