best java jabber client library
What good/bad experiences do you have with java jabber libraries? ...
What good/bad experiences do you have with java jabber libraries? ...
suggest me any real time situations in which i'm supposed to create multiple threads,and then introduce a deadlock situation.this is kind of a project!!! can u ppl help to make the application more interestin with some real time situation... ...
I have a dynamic text file that picks content from a database according to the user's query. I have to write this content into a text file and zip it in a folder in a servlet. How should I do this? ...
java.util.PriorityQueue allows a Comparator to be passed at construction time. When inserting elements, they are ordered according to the priority specified by the comparator. What happens when the priority of an element changes after it has been inserted? When does the PriorityQueue reorder elements? Is it possible to poll an element ...
I'm trying to use JAX-WS on a JSF app on JBoss 4.2.3 and from the logs I notice that for every operation it fetches the WSDL not once, but 3 times: [07/Jul/2009:14:45:52 +0300] "GET /wsdl/my.wsdl " 200 23731 "-" "Java/1.6.0_13" [07/Jul/2009:14:45:52 +0300] "GET /wsdl/my.wsdl " 200 23731 "-" "Java/1.6.0_13" [07/Jul/2009:14:45:...
Jetty can be used as a library to embed a servlet-server into your application. To do that, you create an instance of the class Server and call start at some point. This method throws Exception. Catching or throwing a pure Exception (not a specialized subclass) is bad style. Does anyone know, how I can avoid this and get a Jetty-server i...
What should I use to get semantics equivalent to AutoResetEvent in Java? (See this question for ManualResetEvent). ...
Is there a way to create open protected excel file in Java? I'm looking at JExcelApi and Apache Poi projects but with both of them I cannot figure out how to protect generated xls file. I want to assure that generated file can be opened only by people that know password phrase. ...
Edit Since there were many downvotes and people who didn't understand what I'm asking for, I'll rephrase: How do I find out at runtime what is the class that foo was generified from? public boolean doesClassImplementList(Class<?> genericClass) { // help me fill this in // this method should return true if genericClass implements Li...
I'm reading my Deitel, Java How to Program book and came across the term shadowing. If shadowing is allowed, what situation or what purpose is there for it in a Java class? Example: public class Foo { int x = 5; public void useField() { System.out.println(this.x); } public void useLocal() { int x = 10; ...
I have an entity which looks something like this: (I'm coding to the web page so I apologize for any mistakes) @Entity public class Entity { @Id private Long id; private String field; // Insert getters and setters here... } I try to manipulate it using reflection: Long id = 1; Entity entity = myDao.getEntity(id); e...
Is there a nicer way to write in jUnit String x = "foo bar"; Assert.assertTrue(x.contains("foo")); ...
Hello, I am facing some issues while serializing objects (I am using JBoss Drools, and want to store an ArrayList of KnowledgePackage). When I serialize the list, store the result in a file, and deserialize it, no problem occurs, so it works fine. But when I serialize the list, store the result in a byte stream, then save it in a JarF...
When I'm create custom AWT cursors, it seems that they get the wrong hotspot when running on Windows Vista or Windows 7 -- the hotspot is offset by a few pixels to the right and down. On Windows XP and on Linux with X.org, I'm not seeing the problem at all. Is this a bug, or am I just doing something weird? I'm creating the cursors with...
I'm developing a Java desktop flight simulation. I need to record all the pilot actions as they occur in the cockpit, such as throttle controls, steering, weapon deployment, etc. so that I can view these events at a later time (or stream them live). I'd like to add a visual replay feature on the playback of the events so I can visually ...
Given that : 0000000000000000000000000000000000000000000000000000000000000001 = 1 What method would you use to determine if the the bit that represents 2^x is a 1 or 0 ? ...
What is the regular expression for replaceAll() function to replace "N/A" with "0" ? input : "N/A" output : "0" thanx ...
In my program I need to programmatically configure an ApplicationContext. Specifically, I have a reference to an instance of MyClass and I want to define it as a new bean called "xxyy". public void f(MyClass mc, ApplicationContext ac) { // define mc as the "xxyy" bean on ac ??? ... ... // Now retrieve that bean MyClass bean =...
Similar to http://stackoverflow.com/questions/46003/how-to-change-generate-method-stub-to-throw-notimplementedexception-in-vs, but for Eclipse instead of Visual Studio Both NetBeans and Eclipse have a function that, if you declare a Java class to implement an interface but omit one or more methods, will automatically generate a stub met...
I run a java program from a jar file in Linux Redhat 4.3 and use eclipse for creating the jar file from my project. If I create the jar file when running eclipse in linux everything is ok (normal logfile name and normal text format in the logfile). However, if I create the jar when running eclispe under WinXP (and send it to my linux s...