what is the differance between socket and serversocket?
If socket is representing client side and serversocket representing server side, why socket.read reads the data from serverside...Im really confused ...make me clear pls...? ...
If socket is representing client side and serversocket representing server side, why socket.read reads the data from serverside...Im really confused ...make me clear pls...? ...
How would you determine the classes (non Sun JDK classes) loaded / unused by a Java application? Background: I have an legacy Java webstart application that has gone through a lot of code changes and now has a lot of classes, most of which are not used. I would like to reduce the download size of the application by only deploying class...
Hi All, I'm just starting to take a look at java persistence (at the moment with eclipse's default provider of eclipselink). Basically just creating an object and attempting to persist it to the db (Oracle). It was my understanding that the default transactionality should commit the new object to the database when the method retur...
I came across omegle.com webiste.I know that picks two random strangers and pairs them up and then can chat. In short, i know the functionality of it. But i want to create a similar project as my final year project, so i want to understand the technical details of it. Can any one suggest which will be the best technology for devloping s...
how do you compile java progrmas in cygwin? ...
Hi I have designed a GUI connect to DB button using Swing in java now i want to make it webapp application I need to host it on my website. Do i need to replace all my coding as swing is only for desktop application. Or is there any other way? ...
I did not understand why there is 'x' appended to java for few of the import packages.What is the reason? Cant it be just java.swing.* like others java.io.* ...
hi, When I try to format the namenode or even start it I'm getting the below error. What should be done?? $ bin/hadoop namenode -format Exception in thread "main" java.lang.NoClassDefFoundError: Caused by: java.lang.ClassNotFoundException: at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.securi...
I'm using Netbeans. I use Netbeans to create a Jframe and drop and drap a JLabel to Jframe. I want to add a JLinkButton (I use zfqjava JLinkbutoon) to Jframe and to JLable by using code(but not drap and drop) but it doesn't work. Here is my code to add JLinkButton to JFrame this.getContentPane().add(linkButton); and here is my cod...
I have an excel sheet where I have duplicate values for many rows. How can I make it have unique values? I'm looking for some code which will remove duplicates from this excel sheet and store it back in the same file. ...
I'm trying to have a default java.util.Properties object in my class, with the default properties it accepts, and let the developer override some of them by specifying another java.util.Properties object, but I couldn't find a nice way for doing that. The intended usage is the following: Properties defaultProperties = new Properties();...
On Windows/Linux platform,I as a common computer user,could not nearly find any software written in Java. The two operating system(Windows and Linux) are written with C. The two web browsers(IE and firefox) are written with C++. The two web server(IIS and Apache) are written with C++. Most database management system are written with C/...
i am new to cygwin..what are the normal steps that are followed while setting classpath and all for running programs in cygwin? ...
Hi. I am a newbie at J2ME. Recently, I've shifted from Netbeans to Eclipse because of some internal constraints. I am making an App which makes use of a user-defined library. This library has only a jar file. Now, in Netbeans there were no problems. But in eclipse, I am unable to access the classes defined in the jar file included in m...
So I have created some demo code, see below. What I am seeing is that if a JScrollPane is within a JInternalFrame and component orientation is set to right-to-left, when minmising the frame, the scroll bar stays to the left of the content. I would expect, seeing as RtL, that it would stay to the right of the content, which is true if th...
One common dilemma I have faced throughout programming is regarding declaring variables inside a loop. Say I have to perform something like the following: List list=myObject.getList(); Iterator itr=list.iterator(); while (itr.hasNext()){ BusinessObject myBo=(BusinessObject)itr.next(); process(myBo); } In the above snippet, sh...
I'm using EasyMock to create mock objects for JUnit testing in Java. I create a mock object and pass it to another thread where it expects methods to be called. In the other thread, the calls are enclosed in a try/catch(Throwable) block, so when an unexpected call occurs on the mock and it thus throws AssertionError, that error is caught...
We have a legacy program that was ported from Java 1.3 to Java 1.5. This application involves applets which worked fine before. After porting however, the applet would not load. However there are no errors or exceptions. The app would just try to load it forever. We tried to run it with Java 1.6 and poof! No problems whatsoever. Isn't Ja...
I want to create a History Object for my Website, It should be Similar to Javascript history object. I want to use this Object to Creating Previous/Next nevigational Links for my Website. The Problem with Javascript History Object is that it is based on the Window object, not a website specific. And Using this Object clicking on "Prviou...
I have a set of Maven projects and I'd like to define access rules. For example, projects Database and Cache may only be accessed by project DataLayer, but not from project UiLayer. I'm speaking in terms of maven projects, but a package level access verification may also work, as long as it's easy to integrate into maven projects. I've ...