Click here to Skip to main content
15,881,812 members
Home / Discussions / Java
   

Java

 
AnswerRe: Development IDE Pin
toxcct17-Dec-08 21:54
toxcct17-Dec-08 21:54 
QuestionNeed help with registry search and delete Pin
chooch048-Dec-08 1:45
chooch048-Dec-08 1:45 
QuestionImplementing a String collection class Pin
fazl3h6-Dec-08 8:04
fazl3h6-Dec-08 8:04 
QuestionNeed Help Please Pin
AZBOY205-Dec-08 0:51
AZBOY205-Dec-08 0:51 
AnswerRe: Need Help Please Pin
Naruki8-Dec-08 19:55
Naruki8-Dec-08 19:55 
Questioncommunicating from one system to another using chat application Pin
ckanth3-Dec-08 19:36
ckanth3-Dec-08 19:36 
AnswerRe: communicating from one system to another using chat application Pin
Apurba Saha3-Dec-08 23:26
Apurba Saha3-Dec-08 23:26 
GeneralRe: communicating from one system to another using chat application Pin
ckanth4-Dec-08 22:53
ckanth4-Dec-08 22:53 
hi apurba,

s i had developed using threading concept.my chatserver is working on a default ip-addressBlush | :O .0.0.0.what i want is my chatserver must start by picking up my systems Ip-address.here is the code m using.



protected void start_iChatServer(){
try{
iPortNo=Integer.parseInt(iAcquirePortNo.getText());
System.out.println("Port No." + iPortNo +"/n");
}catch(NumberFormatException e){
System.out.println("\n"+e);
System.out.println("Starting at default port : 1664...");
iPortNo=1664;
}

try{

iChatServer=new ServerSocket(iPortNo);
Int=iChatServer.getInetAddress();
i=iChatServer.getLocalPort();
sad=iChatServer.getLocalSocketAddress();
System.out.println("inetaddress=" + Int+ "localport="+i+ "getlocalsocketaddress="+sad);
isServerRunning=true;
System.out.println("\nServer set up and running at port "+iPortNo+"...\nWelcome to iChat Server v1.0...");
System.out.println("ichatserver=" +iChatServer);
iAcquirePortNo.setEnabled(false);
srtServer.setEnabled(false);
stpServer.setEnabled(true);
iClientList=new ArrayList();
iMainThread=new Thread(this,"iChat Server v1.0");
iMainThread.start();
}catch(IOException e){
System.out.println("\n"+e);
System.out.println("Error occured while setting up the server...\nTry another port...");
}
}

public void run(){
while(iMainThread!=null){
try{
Socket iNewClient=iChatServer.accept();
InfiniteChatClientHandler iNewClientHandle=new InfiniteChatClientHandler(this,iNewClient);
Thread.sleep(1000);
}catch(InterruptedException e){
}catch(IOException e){
}
}
}


Thank u
have a nice day.
QuestionHow to create an exe file? Pin
Cheyahere3-Dec-08 3:20
Cheyahere3-Dec-08 3:20 
AnswerRe: How to create an exe file? Pin
Expert Coming14-Dec-08 12:31
Expert Coming14-Dec-08 12:31 
QuestionDifference between JPA and Hibernate Pin
sunil_jvfrm3-Dec-08 3:17
sunil_jvfrm3-Dec-08 3:17 
QuestionChanging locale for updates! Pin
Naruki2-Dec-08 13:24
Naruki2-Dec-08 13:24 
QuestionJava UTF8 applet Pin
Allan Larson26-Nov-08 15:12
Allan Larson26-Nov-08 15:12 
AnswerRe: Java UTF8 applet Pin
Naruki23-Dec-08 17:38
Naruki23-Dec-08 17:38 
GeneralRe: Java UTF8 applet Pin
Allan Larson24-Dec-08 6:11
Allan Larson24-Dec-08 6:11 
QuestionGraph layout Pin
ventomito26-Nov-08 8:06
ventomito26-Nov-08 8:06 
QuestionHelp mee,,,,, I'm confused,,,, Pin
VANDAWAA25-Nov-08 15:09
VANDAWAA25-Nov-08 15:09 
QuestionJavascript - href - servlet - java Pin
asifhirani78625-Nov-08 14:51
asifhirani78625-Nov-08 14:51 
Questionjava code for creating a unstructered p2p n/w Pin
venkatesh1111121-Nov-08 22:35
venkatesh1111121-Nov-08 22:35 
QuestionJava to COM Bridge Pin
railay2919-Nov-08 4:58
railay2919-Nov-08 4:58 
AnswerRe: Java to COM Bridge Pin
ramesh_rc24-Nov-08 0:21
ramesh_rc24-Nov-08 0:21 
QuestionError Diplaying TIF Image in Applet Pin
alpeshkhunt17-Nov-08 23:45
alpeshkhunt17-Nov-08 23:45 
AnswerRe: Error Diplaying TIF Image in Applet Pin
toxcct18-Nov-08 1:25
toxcct18-Nov-08 1:25 
QuestionError Diplaying TIFF in Applet through JSP Pin
riteshsv17-Nov-08 23:37
riteshsv17-Nov-08 23:37 
QuestionCreating Vectors Pin
sudany_zool14-Nov-08 23:01
sudany_zool14-Nov-08 23:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.