Networking :: Ethernet Works Fine But Not Wireless
Jan 30, 2014
My application with Oracle Database only works with Ethernet, I tried to connect via wireless without any response. When I run the command netstat the port state is WAIT TIME and then be closing. The clients machines run Windows 7 and 8 and the server run Suse Linux Enterprise Server 10 SP2, if the client machine run XP all works fine. I disabled the firewalls in the both sides.
i am calling a method of my applet from within the javascript. My code works fine with all browsers except CHROME.i get this exception in browser = "Uncaught TypeError: Object #<HTMLObjectElement> has no method 'loadComplete' mainControl.js:6". i called this method on the "onload" of <body> tag.
I am trying to calculate a fine in a PoliceOfficer object with method calls to a ParkedCar and ParkingMeter object. The word problem is:
The fine is $25 for the first hour or part of it and $20 for every additional hour of part of it.
My code is:
public class PoliceOfficer public static final int PARKING_FINE1 = 25; public static final int PARKING_FINE2 = 20; public static final int NUMBER_OF_MINUTES_OVER_PARKED = 60; public double calculateFine(){ double calculateFine = 0;
[Code] ....
obviously the fine is not calculated correctly but I'm not sure how to proceed from here...
So I'm working on some networking code and I have the Server running as its own thread, then I have a PacketListener which is contained in the Server, that is running on its own thread too. As of right now, the PacketListener waits for packets via DatagramSocket.receive() and then adds them to a queue. The Server runs in a loop and it checks that queue for packets and then polls the most recent and process it before sleeping for 1 millisecond. Here is my question though, I'm considering changing the program to a more observer pattern structure in that when the PacketListener would receive a packet, rather than add it to the queue, it'd notify the server which would process it. However, wouldn't this cause additional time required within the PacketListener thread dedicated to processing the packets rather than listening for them?
I have a requirement to get the details of the files present in a directory on a server. I need to get the file names and timestamp. I have the below code to get the file names:
Connection conn = new OracleDriver().defaultConnection(); ArrayDescriptor arraydesc = ArrayDescriptor.createDescriptor ("DIRLIST_T", conn); File myDir = new File (dir); String[] filesList = myDir.list(); ARRAY dirArray = new ARRAY(arraydesc, conn, filesList); return dirArray;
But am not able to get the timestamp. How can I get the timestamp as well.
I would like to limit my bandwidth usage when accessing/downloading files (similar to the --limit-rate 50K option for curl and wget) as the website has limited bandwidth. I am not exactly sure how to implement this, but I'm guessing it be accomplished via the BufferedReader? I have attached the current code below.
I have noticed an error, that makes sometimes troubles, when downloading jars from https addresses, when there are many jars to download..
Best example is by opening Javas on Java version checker. [URL] ....
I get also following log...
network: Connecting https://www.java.com/jsp_utils/jreverification.jar with proxy=DIRECT network: Connecting http://www.java.com:443/ with proxy=DIRECT network: Connecting https://www.java.com/jsp_utils/jreverification.jar with cookie "JSESSIONID=22ABBA2BE9B5789629C276AC35BDF969; s_cc=true;
Even if the address is https, java try to access via http protocol on port 443, and that leads sometimes to problems..
I have noticed this, when I have used URLConnection(HttpURLConnection) for my self, as soon Java sends http link on https address, the jar gets sometimes not loaded, and i get error about missing class that get called..
On http addres it is not so bad, since same protocol is used, but evidently, that is evil for https..
As you see, that happens already when loading Jar by Applet Starter and at all, it happens each time on any URLConnection
############################### Java Plug-in 10.13.2.20 Using JRE version 1.7.0_13-b20 Java HotSpot(TM) Client VM User home directory = X:Usersadmin ---------------------------------------------------- c: clear console window f: finalize objects on finalization queue g: garbage collect
I wrote a proxy in java. The version with ServerSocket-Socket/Stream-IO works wonderfully. When I rewrote it to ServerSocketChannel-SocketChannel/ByteBuffer it works also very well. However, when I access YouTube things happen weirdly: The video is frozen after 3 or 5 minutes (but this did not with the version of ServerSocket/Socket). I strongly assume that there probably was a nasty bug.... The (shortened) codes are:
Server: public class BeanServer extends Thread { public BeanServer( ) { } public void run( ) { try { bServer = ServerSocketChannel.open();
We have a servlet application running under jboss 7.1.1/java 1.7 that sends http requests to another server. Everything works fine for most of the time, but occasionally (from one to a couple of times a day) we get a “Socket closed” exception. I’ve been trying to find out what might be causing this but so far I’ve been unsuccessful. By the way, this has been happening while the application was running under older versions of Jboss/Java so the version might not be that relevant.
Here’s an excerpt from the method where this happens: . . . . . try { HttpURLConnection conn = (HttpURLConnection) urlEndpoint.openConnection(); conn.setRequestMethod("POST"); conn.setDoInput(true); conn.setDoOutput(true);
[Code] ....
And here’s what the exception looks like: . . . . . . java.net.SocketException: socket closed at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:150) at java.net.SocketInputStream.read(SocketInputStream.java:121) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
[Code] ....
In my investigation I came across some posts that were mentioning the sockets pool the http connection is keeping, but I’m not sure whether and how this solve the problem I have.
I am trying to create a new text file in FTP Server using FTPClient but im not able to do. By using storeFile method i can only upload file that is already exists in my local system. But my requirement is to create file directly into FTP Server.
Similar to HttpFilter (javax.Servlet.Filter ) which when added in web.xml can intercept any incoming request to JVM / outgoing (as response) independent of framework ( Spring/CXF/Jersy etc ) without any code changes (excluding the filter itself), I am trying to find an API or approach which could intercept any outgoing HTTP calls from JVM to add/modify headers independent of framework.
Quite often the word Outgoing HTTP call is misinterpreted in the forums so let me explain with example.
Let us assume there are two JVMs, jvm1 and jvm2. and there are HTTP calls being made from JVM1 to JVM2. I would like to intercept the HTTP connection being made from JVM1 to modify the headers information before the call happens. I do not want the code to be tied to a specific framework so that I can as bundle the interceptor as a jar and share it with application team. Changes in web.xml is fine.
I'm facing some problem connecting to a IBM 4690 OS Server with the FTPClient class from the commons-net-1.4.1 library. It seems it can't read the folder on the server. The problem is that using the FTP client from Internet Explorer is works perfectly.
Here is my code (kind of hardcoded but it's only to test).
Here is the ParserInitializationException that it throws:
org.apache.commons.net.ftp.parser.ParserInitializationException: Unknown parser type: OS 4690 operating system at org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory.createFileEntryParser(DefaultFTPFileEntryParserFactory.java:118) at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2358) at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2141) ...
I've tried to use many of the FTPFileListParser available but without success. How could I handle the problem? Where could I find a Parser that would works?
I have a Java application that was built by a third party and my task is to embed this in a web site. To do so I got an HTML snippet, a .JAR and da .DAT file that seems to be called by the app. I tested this locally on my machine and it works ok. After uploading to the web server I get an error message
NumberFormatException For input string: "i>>?<html>"(the question mark is actually upside down, the >> is really one character)
At first sight this looks like a common issue with UTF-8 file being delivered when the file itself holds only ANSI characters (or vice versa). So I made sure that the .HTM and the .DAT file are indeed stored in ANSI 8-bit (and not Unicode 16-bit) format. However, this does not solve the issue. The .HTM file itself also holds a ISO 8859-1 directive. The server is set to deliver UTF-8 by default. I cannot change this due to a huge lot of other dependencies.
So I am not sure if my suspicion is right - is it indeed a character set issue? Or is it something else?
I am trying to remotely call one servlet and getting below exception:
java.io.StreamCorruptedException: invalid stream header: 3C21444F at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:785) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:282) at com.deere.isg.dm.web.controller.StatsController.getOtherAdminStatsBeanFromConnectURL2(StatsController.java:224) at com.deere.isg.dm.web.controller.StatsController.main(StatsController.java:122)
I'm trying to write a transparent proxy like polipo. Polipo is written in C and I want to have the same result in java.
A simple program that can filter/monitor all connections created and closed by the browser.
To do so, I've chosen to work with sockets, because that's the only way i know to read and write raw data to and from the browser in a completely transparent way.
In this moment my code reads and writes every couple of request/response but I've noticed profiling it that the time needed to create the socket is a bottleneck.
Using URLConnection to create the same connection I need much less time than sockets.
When socket creation implies 50ms URLConnection implies only 1ms.
I've been trying to send a file(text & image files) from one system to another. somewhat I did, but file is not send originally in destination system. It shows AccessDeniedException on the destination system. What should do to avoid this exception.
I have create a program that takes a random array which is created by starting from 0 and adding Math.random() (double between 0 and 0.999) n times, and calculates the weighted average of each position within a certain radius. I currently have a program that does this but i was wondering how to create one using a torus. The basic principle is the last element is now equal to the first element and when the first element updates its position it takes into account the difference between the other elements including some of the last elements in the array.
Heres the code so far that works for one iteration. After one the code is incorrect and calculates the wrong values. I think using a circular list or a ring buffer may work but i have little experience with either.
import java.text.DecimalFormat; import java.util.Scanner; public class Torus { public static void main(String[] args) { DecimalFormat df = new DecimalFormat("#.###");
I am having issue with jmenu popup in netbeans. It only sometimes works. Sometimes I don't get a java popup at all. Sometimes my File and Edit options are completely missing. This is what my code looks like.
import javax.swing.*; public class menu { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here JFrame f = new JFrame(); f.setVisible(true);
I have gf 4.0.1 and swing client. I want to get EJB over SSL. I've set all certificates. However, I can get it work only when client and server are at the same host. What I see in tcpdump when they are at the same host:
I have create a program that takes a random array which is created by starting from 0 and adding Math.random() (double between 0 and 0.999) n times, and calculates the weighted average of each position within a certain radius. I currently have a program that does this but i was wondering how to create one using a torus. The basic principle is the last element is now equal to the first element and when the first element updates its position it takes into account the difference between the other elements including some of the last elements in the array.I cant work out how this would be possible for multiple iterations.
heres the code so far that works for one iteration. After one the code is incorrect and calculates the wrong values.I think using a circular list or a ring buffer may work but i have little experience with either.