Network 1 « Network « Java Network Q&A

Home
Java Network Q&A
1.API
2.bluetooth
3.Client
4.connection
5.Cookie
6.Development
7.Email
8.File
9.ftp
10.http
11.HttpClient
12.https
13.ip
14.Network
15.OS
16.RMI
17.Security
18.Server
19.Socket
20.tcp
21.UDP
22.url
Java Network Q&A » Network » Network 1 

1. Java: Best Place to Begin Learning Basic Networking    stackoverflow.com

I am trying to write a simple networked chat program in Java. I have almost no networking experience. I was wondering what resources I should begin looking at (beside ...

2. Large amount of data - what is the best way to send them?    stackoverflow.com

we have this scenario: A server which contains needed data and client component which these data wants. On the server are stored 2 types of data: - some information - just a couple ...

3. Java socket programming    stackoverflow.com

Leading on from my previous questions I am going to try and clarify one of the problems I am facing. I am trying to create a multiplayer version of PacMan. A simple ...

4. Network Programming: to maintain sockets or not?    stackoverflow.com

I'm currently translating an API from C# to Java which has a network component. The C# version seems to keep the input and output streams and the socket open for the duration ...

5. IPv4/IPv6 network calculations and validation for Java?    stackoverflow.com

I am looking for a package that is similar to Net_IPv4 and Net_IPv6 but written for Java. It needs to be able to do the following:

  • Verify ...

6. Find the closest server in the network    stackoverflow.com

Given a list of servers & a list of clients, how to find a server that is closest to a particular host using "traceroute"? The program should be in java.

7. Java DomImplementationLS    stackoverflow.com

I'm looking to create XML Document objects in Java and serialize them to a byte array (prior to sending them across a TCP connection). I currently have code that looks ...

8. How to prevent application freeze if server unavailable?    stackoverflow.com

InetAddress serverAddr = InetAddress.getByName(serverAddress);
String hostname = serverAddr.getCanonicalHostName();
Socket socket = new Socket(serverAddr, portNumber);
// Freezes before this line if the server is unavailable
socket.setSoTimeout(3000);
Does anyone know how to implement the check of server availability ...

9. How long is the request queue on a Vista-system?    stackoverflow.com

I'm currently hacking on a new project, a web-app. But something's wrong, and I think it's Vistas fault, when I'm stress-testing the app, not all of the requests are answered. The only ...

10. How to measure response-time of network using Java?    stackoverflow.com

We have a client and a server. I want to measure the response-time of the network between them. When I send a request to server it should immediate respond to my ...

11. Java Network Programming. Question about sockets    stackoverflow.com

I have a server and has 2 clients connecting to it through TCP. These clients continuously send information to the server. This is a proxy server and relays the messages it receives from ...

12. In ColdFusion, is there a way to determine what server the code is running on?    stackoverflow.com

Is there any way in ColdFusion code to determine on what server the code is executing? I have few load-balanced ColdFusion servers. I want to be able to know on which ...

13. How to handle code for network failure and resume back?    stackoverflow.com

suppose am in the middle of updating some information and the network connection goes off. How should i write my code to handle such situation and resume from where the code was ...

14. Why are my sockets only able to communicate client-to-server and not server-to-client?    stackoverflow.com

I have written a simple Java dispatcher with a daemon thread to handle the incoming traffic, and using another thread to send out commands. The problem comes when the server receives ...

15. Critically efficient server    stackoverflow.com

I am developing a client-server based application for financial alerts, where the client can set a value as the alert for a chosen financial instrument , and when this value will ...

16. Java network server and TIME_WAIT    stackoverflow.com

I have run into a problem with a network server that receives signals from devices my company produces. The device will occasionally reuse the source port that it had just ...

17. Is it possible to specify which network interface for a JVM ( or IDE ) to use    stackoverflow.com

The situation goes like this, I have two network interfaces in my macbook pro. One is a statically defined Ethernet interface and the other one is a DHCP configured wireless interface. I ...

18. Writing unit tests for network related classes    stackoverflow.com

I have a class that is responsible for network communication. I would like to have a unit test for it. Here is where I'm stuck in order to write a test for ...

19. Whats the best way to check for downtime in Java?    stackoverflow.com

Can you please advice on the best way to check if a server is running using java? I mean I want to check a site for downtime. Is connecting to the ...

20. java network i/o blocking or not?    stackoverflow.com

Hopefully this is a quick and easy question about BufferedOutputStreams and DataOutputStreams in java. When I write bytes to the output stream like

myBufferedOutputStream.write(array);
myDataOutputStream.write(array);
Do these methods write them instantly to the stream ...

21. Run user's Java method on network message    stackoverflow.com

I can do this in C++ and Python, but I haven't quite figured it out on java. My class has a 'MessageReceived' function that my network loop executes when a message comes ...

22. How to simulate different network scenarios ? (in Java)    stackoverflow.com

I’m building a client server application that should operate 24/7. The applications is designate to detect network failures (using a heart beating) and reconnect to the server asap. The first test that ...

23. Query ARP cache to get MAC ID    stackoverflow.com

I need to get the MAC ID of a host in my network. For that, if I ping to that IP and query the ARP cache arp -a, I am able ...

24. How to know when network down using java socket programming    stackoverflow.com

Hi I have a problem how to detect when the network goes offline. My server and client are in different computer. but connected by LAN Actually I have written tcp socket programming in ...

25. Framework for Scalable Multithreaded Client/Server Network Application    stackoverflow.com

Although the java.net.Socket and java.net.ServetSocket give me powerful networking capabilities I wouldn't want to go through the nitty gritties of creating and managing my own sockets and threads. What open source ...

26. How to avoid a NoRouteToHostException?    stackoverflow.com

Disclosure: the code I'm working on is for university coursework. Background: The task I'm trying to complete is to report on the effect of different threading techniques. To do this I have ...

27. How to run a java file/project in remote JVM which is present in other Network?    stackoverflow.com

I am trying to work on a project which involves running/executing the java file in three JVM on different Network. If i locally run the Java file should simultaneously ...

28. Using Sonatype nexus in local network    stackoverflow.com

I've successfully created a small software engineering environment (SEE) for Java applications that is - amongst other tools - based on maven and nexus. My actual problem is - not a ...

29. What is the best way to transmit Java objects over a network    stackoverflow.com

I am trying to transmit objects of a particular class from one server to another. The options I'm looking at are:

  • Serialize the data as JSON and send it over the wire ...

30. Java server memory management on slow networks    stackoverflow.com

I'm writing a code that generates a large XML document and writes it directly into a client stream using StAX XmlStreamWriter. I'm afraid that if the network becomes extremely slow, the bytes ...

31. Handling network timeouts in Java    stackoverflow.com

i have a java program connect to server through xot protocol. My lib i use can handle connect timeout, but there is no method like setSoTimeout() to handle timeout when send & ...

32. SMTP Settings Not working for Hotmail    stackoverflow.com

Username: xxxxx.@hotmail.com

Password: yyyyyyyy

Pop3: pop3.live.com  Port: 995 SSL: TRUE

SMTP: smtp.live.com  Port: 587 SSL: TRUE (Port: 25 also not working)
These are the details I gave: POP3 settings accepted and SMTP settings ...

33. Can I run a server/client program like this?    stackoverflow.com

I want to write a yahoo! messenger and I create 2 java applications .one is for "server" and the other one is for" client" .at first I run the Server application ...

34. How can we handle the ConnectException?    stackoverflow.com

I have searched a lot ,but i couldn't find the fine answer for it.I use try_catch block for this exception(if this exception is thrown one frame will be shown to the ...

35. How do I decipher garbled/gibberish characters in my networking program    stackoverflow.com

I am working on a client-server networking app in Java SE. I am using stings terminated by a newline from client to server and the server responds with a null ...

36. Why it returns null value?(Network)    stackoverflow.com

These are two classes that one of them is in my Client application and the other is in Server application. my MainServer class :

public class MainServer {

static Socket client = null;
static ServerSocket ...

37. Why does it return a null value?!!(client/server application)    stackoverflow.com

i have asked this question 2 days before but I can not edit that(I don't know why)also i have changed some part of my classes.also I have checked it a lot ...

38. it doesn't return anything from server!    stackoverflow.com

I have 2 important classes(client and server) and I will write something in my text area and by clicking on the send button I will call the active method of the ...

39. why it returns null pointer exception (server side )    stackoverflow.com

this is my server class which let the clients to chat with each other but it will return nullpointer exception for this line: while (!(line = in.readLine()).equalsIgnoreCase("/quit")) would you please help ...

40. Java Network application cache dependencies locally    stackoverflow.com

I have several Java apps that run directly from the a shared drive on the LAN. This has worked fine until recently when we setup a remote office on a VPN. ...

41. Datagrams in java    stackoverflow.com

Is possibility in java without using native functions to send datagrams ?

42. How to create Java socket that is localhost only?    stackoverflow.com

I have a Java server that opens up a socket using ServerSocket (using Thrift with it). This server has a client on the local machine in Obj-c that communicates with the ...

43. How to start networking in Java?    stackoverflow.com

I would like to program a game that can be played by several players seating in front of different computer which are connected via network and I want to use Java ...

44. How to instantiate a Socket class in Java?    stackoverflow.com

I know that the Socket class can be instantiated in this way (as an example):

new Socket("taranis", 7);
where "taranis" is the name of the server in a local network. In this respect ...

45. Java Network / Socket programming tutorial    stackoverflow.com

I'm going to create a project in some month in a course I'm having and for that purpose I would like to read and try making some small test programs regarding ...

46. Java: Proper Network IO handling?    stackoverflow.com

The problem I am having is that when I use an InputStream to read bytes, it blocks until the connection is finished. EG:

        InputStream ...

47. Network statistics    stackoverflow.com

I'm trying to collect network statistics on my computer and draw a pie chart. An example is shown below.

my computer connects to port 80   75%
my computer connects to port ...

48. Can Bonjour browse a service with a particular name?    stackoverflow.com

Bonjour provides "DNSSD.browse(serviceType,callBackObject)" method which browses for services of a particular type. If a service of the given type is found, Bonjour calls "callBackObject.serviceFound". If the service is lost, Bonjour calls ...

49. Should I close sockets from both ends?    stackoverflow.com

I have the following problem. My client program monitor for availability of server in the local network (using Bonjour, but it does not rally mater). As soon as a server is ...

50. Can I close and reopen a socket?    stackoverflow.com

I learned an example of usage of sockets. In this example a client sends a request to a server to open a socket and then the server (listening to a specific ...

51. Build a road network out of shapefile coordinates    stackoverflow.com

I want to build a road network from the ESRI shapefiles. I am able to read the data from the .shp files but unable to proceed any further with building the ...

52. Why do sockets not die when server dies? Why does a socket die when server is alive?    stackoverflow.com

I try to play with sockets a bit. For that I wrote very simple "client" and "server" applications. Client:

import java.net.*;

public class client {
    public static void main(String[] args) throws ...

53. What is the best way to communicate with Bonjour?    stackoverflow.com

There is a nice method provided by Bonjour: DNSSD.browse("_killerapp._tcp", this);. As the first argument of this method I give type of service which potentially can be available in the network, and ...

54. How to turn Java class into one of its subclasses (SocketAddress and InetSocketAddress)    stackoverflow.com

I am trying to get the IP of a socket connection in string form. I am using a framework, which returns the SocketAddress of the received message. How can i transform it ...

55. Why it cannot find getInputStream?    stackoverflow.com

I have this code:

ServerSocket serverSideSocket = new ServerSocket(1234);
        serverSideSocket.accept();
        BufferedReader in = new BufferedReader(new InputStreamReader(serverSideSocket.getInputStream()));
And compiler writes ...

56. A two player game over the intranet    stackoverflow.com

I am a student of 3rd year engineering and only a novice in my programming skills. I need some help with my project.. I wish to develop a two player game ...

57. Technologies and standards in a Kindle    stackoverflow.com

I'm using the Kindle as an example of an embedded system to illustrate some points I'm making in a paper. Since I'm not an expert in all the technologies used, can ...

58. link state notification in Java    stackoverflow.com

Is there any way in Java to receive event notifications whenever link state changes on a computer (connected, disconnected, up, down, etc)? Thanks!

59. Hessian vs Tibco rv    stackoverflow.com

I'm looking to contrast Tibco rv and Hessian in terms of performance - for a Java application. Any pointer to get me started appreciated. thanks.

60. JAVA: How do I accept input during a certain period of time only    stackoverflow.com

Im trying to do a simple game where I continually need input from players. This needs to happen during a certain time period only. Everything that is sent after that will ...

61. How can I implement a download rate limited in Java?    stackoverflow.com

I'm going to implement a (simple) downloader application in Java as a personal exercise. It is going to run several jobs in different threads, in a way that I will be ...

62. Java sockets - how to determine data type on the server side?    stackoverflow.com

I'm using Java sockets for client - server application. I have a situation when sometimes client needs to send a byte array (using byteArrayOutputStream) and sometimes it should send a custom ...

63. Networking multiple computers to one brain in Java    stackoverflow.com

I was wondering which libraries or API's would be useful in this. what im aiming for is to be able to type a command into a prompt and then specify which ...

64. How to insert correctly my network in this code?    stackoverflow.com

i got a problem with my network. I can send a file with my network but it is just a test. But I want to insert the network in my connect4. My ...

65. Adding a bias neuron to Encog network    stackoverflow.com

I am porting some C code involving an artificial neural network to Java. I have decided to use the Encog framework. I would like my network to have a bias ...

66. Books recommendation to learn about java networking    stackoverflow.com

In order to cover for my (glaring) lack of knowledge in the basics of networking, I'm looking for a book which would ideally cover: -> 1 or 2 chapters on the transport ...

67. Any ideas how I could create a network usage "meter" for Java SE?    stackoverflow.com

I need to meter the number of bytes being used by a java application from within java (i.e. I don't have any special access to the JVM other then not having ...

68. Emulating network disconnects to locally test distributed app partitioning    stackoverflow.com

I have several instances of a distributed application running on the localhost; every instance communicate with others through certain ports, all instances together make an ensemble. (I'm actually talking about

69. How to transfer objects over network using java    stackoverflow.com

what is the library should I use ? what are the functions that help me?

70. Sending large data over sockets in java    stackoverflow.com

I am working on client server architecture and i am just beginner in this thing. Here my server is of C and client is of Java and i want to send ...

71. How to create ring network structure in java    stackoverflow.com

I have to create a ring structure network by using java and i am wondered if it has any library to help me create this ring structure? or I have to ...

72. How we can Download a HTML Page using JAVA?    stackoverflow.com

How we can Download a HTML Page using JAVA??

73. Resuming a failed compression using Java    stackoverflow.com

I have a smallish number (2-10) of largeish files (6-15GB) that compress really well (4:1). I'm writing the client and server in Java, and I want to send the files from the ...

74. Help with first networking program    stackoverflow.com

Here's the code.

public class testClient {
public static void main(String[] args) {
    testClient abc = new testClient();
    abc.go();
}
public void go() {
    try {
 ...

75. Generic QoS Message batching and compression in Java    stackoverflow.com

We have a custom messaging system written in Java, and I want to implement a basic batching/compression feature that basically under heavy load it will aggregate a bunch of push responses ...

76. How to know programmatically whether a machne is in Global/Private network    stackoverflow.com

I am trying to write a program in Java to know whether a machine is in Global/Private network or not. Below is my code snippet. I thought if a machine detects ...

77. How exactly does a Server Socket work?    stackoverflow.com

How exactly does a Server Socket work? When I create a java server socket and accept connection at port 1234. Does the server actually uses the port 1234 for all clients? ...

78. Sending a Vector of objects over a network    stackoverflow.com

Okay, so I'm writing a test program to send a vector of objects from server to client. -Server-

import java.net.*;
import java.util.Vector;
import java.io.*;

public class TestServer{
    public static void main(String[] args) throws ...

79. Best way to do RAW socket programming involving Java    stackoverflow.com

I have some existing C code that uses ICMP raw sockets to do Ping and I need to use this code in Java as Java does not support ICMP packages. When ...

80. Using own Java software´s custom update implementation    stackoverflow.com

I have a server, and Client that are working fine, they transfer file to each other and handle commands with success. The thing is that once connected to the server, the ...

81. what method should be used?    stackoverflow.com

For finding the ip address of the smtp server in java? I cant find the right api method. Thank you

82. What would be a good test regimen for beginner java network program    stackoverflow.com

I know this sounds a big vague so I'll try and be as precise as I can be. I'm pretty new to programming. I wrote an application a year ...

83. Redirect a network request    stackoverflow.com

Morning all, I don't even know if this is possible, and if it is, I'm struggling to know where to start. I'll describe the problem: I have application A, which is a third-party ...

84. Selenium - Wait for network traffic    stackoverflow.com

We're using Selenium with the Java API and some Javascript user extensions. We use a lot of AJAX calls in our app. A lot of our tests fail randomly because sometimes ...

85. Two different objects on the same socket in Java    stackoverflow.com

Sender:

ObjectA A = new ObjectA();
ObjectB B = new ObjectB();
//Connection is created
socket.writeObject(B);
Receiver: //don't know how to find to which object I should typecast the object to :( Is there any way to send two ...

86. Flush operation for Java non-blocking socket    stackoverflow.com

In normal blocking socket, I can use Socket.getOutputStream().flush() to partly control when to send out a TCP packet. Is there an equivalent operation for SocketChannel? Edit: My guess is that every time ...

87. CCNx Java Code Help (ProcessBuilder)    stackoverflow.com

Has anyone played around with the CCNx code over from http://www.ccnx.org/. I unzip the project and loading the .project file in the javasrc directory into Eclipse. The project builds with ...

88. fetching a webpage using java socket class    stackoverflow.com

Good evening to all of you
I want to fetch a webpage using the socket class in java and i have done this as

import java.net.*;
import java.io.*;

class htmlPageFetch{
      ...

89. How to close a non blocking socket channel properly?    stackoverflow.com

I'm writing a server program using Java non-blocking SocketChannel. Sometimes I want to send a reply message and then close the channel, like the following code. However, the close() method interrupts the ...

90. Strange network socket leak in Java app    stackoverflow.com

I'm trying to catch a network socket leak in our Java daemon, which has quite a strange output in lsof:

java    11734 root  463u  IPv6   ...

91. Typical network socket timeout    stackoverflow.com

I'm interested to know, what is the typical network socket timeout value, used in production today. I'm currently using 30 seconds in our Java application, but would like to hear what other ...

92. get a page using java program and then send it back after filling out    stackoverflow.com

I have to do this as my assignment which is as: Write a java program to get a html page from server then fill out the form using the java program and ...

93. Network programming on java    stackoverflow.com

I have written a simple network program on java using sockets. Program has a client and a server. When user types a word on client side, server simply return this ...

94. How to create an adhoc network between laptops in java?    stackoverflow.com

I want to create an adhoc between labtops were they will communicate using wireless communication. I will use java for this but still I do not know how to start.. I ...

95. using java to get network utilization    stackoverflow.com

please help me, can anyone tell me how to get the network performance using java code ??? or how to measure network performance via including simple time related metrics ? Thanks a lot ...

96. Generate RTT values    stackoverflow.com

I'm writing a Java applet where I should be able to simulate a connection between two hosts. Hence I have to generate packet round-trip times at random. These RTTs can go from ...

97. Missing JGroup logical name?    stackoverflow.com

I have two Linux boxes and need to run 7 jGroup nodes w/ different logical names within them, so totally 14 nodes within a cluster. During the startup processes of these ...

98. java networking related problem    stackoverflow.com

Sorry for i can't precisely specify the title. I want to ask that i have created a server using ServerSocket class in java. and i am able to run it easily ...

99. How to program the OSI reference model in language    stackoverflow.com

I am studying networking and OSI model and all 7 layers. Like how each layer puts its own header and then removes on the receiver end. Is there any way that i can ...

100. How to access class of a java application in a network of systems?    stackoverflow.com

I want to access the class and I want to use that object. Systems are connected in LAN. How can we access that system java application class?

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.