I created a threadpool and gave it 50 tasks to connect to a server. So once it was done connecting, sending some data over, then disconnecting. It also has a read timeout set at 5 seconds (5000 long of course). I even set the thread pool to a max size of 1. I then fire this up, on linux, and ran htop (a better version of top) to check th...
Hey,
I have a Java desktop application I wrote, and I would like a recommendation about a monitoring application that can spot bottlenecks in the code and real time memory consumptions.
As I was developing for J2Me, the WTK then, had a memory monitor, and I found it really useful, I would like to know which monitoring program you think...
I have two Pocket PCs and I want write an application that be able to send a file via Wi-Fi, as you know the Pocket PC's OS is Windows-mobile.
Can I use J2SE ?(Because windows-mobile) or I must write J2ME Application? Please kindly advise me, with a sample source code about that.
Thanks a lot ...
...
Hello,
I want to know is this legitimate to say J2SE a framework? If J2SE is a framework, then why there is a collection framework? Isn't collection framework inside J2SE? Please help me!
...
Question is regarding Java 5 and Drag n Drop.
Is there a way to determine the drag source component in the drop target TransferHandler?
I need to know this in my canImport(..) or importData(..) method in order to take different actions for transfer data of the same type or DataFlavor.
The way I have achieved this currently is to hijac...
Hello all,
Suppose i have one simple function in my program. Whenever i call that function does a new thread or process is spawned to execute the function or it is executed under the main thread memory space only. Please help... any pointers will be appreciated.
Thanks in advance,
Rupesh
...
Hi
when in try to run jar file this error shown : "failed to load main-class manifest attribute from ..."
but when i run project in netbeans it`s run successfuly !!!
...
I've written a small java program to download all friends' and followers' profile pictures from twitter. But i'm getting an error because only 150 requests per hour per IP address is allowed.
the exact error is:
twitter4j.TwitterException: 400:The request was invalid. An accompanying error message will explain why. This is the status...
Hey,
I have designed a component for J2Me, and here is the paint method:
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
class Component {
...
public void paint(Graphics g) {
if (background != null)
g.drawImage(image, bounds.getLocation().x, bounds.getLocation().y, 0);
}
...
}
I want to...
I am gonna have an interview with a company working on stock trading system which only requires core Java skill. However, the requirements list many server related stuff as follow:
Strong server-side Java (no UI)
Strong JUnit testing
Web service knowledge, HTTP / HTTPS
Lucene
Performance tuning experience will be desirable
Continuous i...
hi
i have a Java library for working with multiplexer
but i don't know how to take output from it ?
any body can help ?
this is the library link to download http://www.bozorgvar.com/multiplexer.rar
...
Hello,
I'm using JPA+Hibernate with a PostGre SQL database in a J2SE project.
I have 2 entities A and B. A has a @OneToMany relationship to B.
In my domain model A might reference millions of B's. When I add a new object to the collection it takes minutes to complete.
@OneToMany(cascade=CascadeType.PERSIST)
Collection<B> foo = new Arra...
Simplified code example: http://pastebin.com/9ZQxSXi9
Hi
I wanted to experiment with the restlet 2.0 library and the gpodder webservice but somehow i reached a point where I can't see the wood for the trees.
The service in the example requires HTTP authentication and to post some JSON content to a URL.
Nothing that complicated but som...
I have a problem with blocking buffer with the following code on my android application:
else if (tcpdumpButton.isChecked())
{
try
{
Process process1 = Runtime.getRuntime().exec("tcpdump");
BufferedReader osRes = new BufferedReader(new InputSt...
I have a custom object that has a description (String) and priority value (int). I display these values in a JTree because there is a hierarchical relationship between different objects of this type. I only display the description in the JTree nodes because the priority is not important for display purposes.
I would like to have a JDial...
As far as I know GC is used only when JVM needs more memory, but I'm not sure about it. So, please, someone suggest an answer to this question.
...
Hi,
I am getting the symlink error when i do an ant build. Searched in net and some posts suggested to download junit jar for fixing it. Downloaded junit-4.8.2.jar. Added this jar file to Classpath but still's not working. I tried to include the jar file within the build.xml but still it didn't work out.
<target name="-createDir"...
Hey,
I have a containing panel JPanel with a Flow Layout, the containing panel is in a JScrollPane, the containing panel holds a bunch of other JPanels, inner panels, in it. All the inner panels have the same dimensions. If there are more panels then the containing panel can hold in its width then they are gridded downwards, and if ther...
Hi,
I have a JSE application which currently uses JMS, it was written by a developer which is no longer with the company.
For some reason, I really don't know if it was justified or not, the JMS session were not created as transacted.
I now want to change this as to have all Producers using transacted sessions; This in itself is very sim...
Is there a function like join that returns List's data as a string of
all the elements, joined by delimiter provided?
List<String> join; ....
String join = list.join('+");
// join == "Elem 1+Elem 2";
or one must use an iterator to manually glue the elements?
...