I hava an application which deployed on J2EE application server , inside the application there is implementation of class loader loading jar files into the JVM, inside those jar files there are Test Cases which implements common interface, by java reflection i dynamically invoke (by name) those test cases, the problem is that is like a b...
Say I load messages in a queue from multiple nodes.
Then, one or many nodes are pulling messages from the queue.
Is it possible (or is this normal usage?) that the queue guarantees to not hand out a message to more than one server/node?
And does that server/node have to tell the queue it has completed the operation and the queue and d...
my program is a client connect to multi server.
i save connection object to all server in a static map object: server1 -> connection1, server2 -> connection2, ..
public class CacheConnection {
private final static Map cacheConnection = new HashMap();
public static void add(String serverName, Socket sock) {
synchronize...
Hi experts,,,
wish you all a happy and exciting year of 2010.
Is there another way in java 1.1 to handle cookies in Applets other than using JSObject...
...
I'm trying to load the parsed html data from an rss feed using a
WebView, but the webview claims that the page:
"data:text/html;utf-8,[The html I'm trying to display]"
is not available.
I find it strange that it seems to be putting the html data into the
url, when I just want it to display it.
Here's my code right now for the webvi...
What is the Java equivalent of following C++ code?
float f=12.5f;
int& i = reinterpret_cast<int&>(f);
...
I want to use java platform and I don't know what else I need to know about to write apps in google app engine?
...
Hi
I'd like to trace a java application at runtime to log and later analyze every its behaviour.
Is there a possibility to hook into a java application to get runtime information like method calls (with parameters and return values) and the status of an object (i.e. its attributes and whose values)?
My goal is to get a complete under...
HI,
how can i use the JSplitPane so that they show up in the borders of a BorderLayout???
So that i can resize each sise (NORTH, EAST, WEST, SOUTH, CENTER).
Thanks
...
when you do this:
public class Blah {
public void doBlah() throws BlahException {
}
}
What does adding the throws BlahException really do?
Does it basically group any exception to that one? i.e. if there is an exception, no matter what it is, will always be thrown using BlahException?
...
just reading up on spring, and when using DI in spring, if you set the bean to be a singleton (default), then a single instance of the class will be 'dispensed', while prototype forces a new instance each time.
What are the ramifications of having the same instance dispensed by the container each time?
does that mean there will be share...
For many years my code was full of this kind of comments :
//TODO : Add ...
...
/*
*TODO : Fix ...
*
*/
Now I think to create my own @todo javadoc annotation ... but before doing that I want to know if do you guys have better way to manage your todo programming stuff ?
...
I'm trying to use JPA's Context Injection. Currently my code fails to have the context injected, throwing a NullPointerException:
Exception in thread "main"
java.lang.NullPointerException at
learn.spring.dao.ListingDao.findById(ListingDao.java:19)
Below is my code, anyone see what is wrong/missing? Thanks.
Spring Configuration...
Hi,
I would like to create a list objects called Product (Listproducts) where Product includes the following members:
public class Product {
private Double price;
private String title;
private String description;
private List<Point>points;
...
}
Point is another object which includes latitude and longitude:
public class Point{
Doub...
I'm having some build issues with Eclipse in that it runs my app just fine in eclipse but for some reason when trying to run using
#>java MyClass
it ends up not running due to not being able to find the class. This makes no sense so I was wondering if there was a way to have eclipse output what it's feeding into the jvm to get it to ...
I'm writing an application that has an SWT GUI currently, but would like the end-users to be able to choose between SWT and Swing. I've experimented with abstracting the GUI details before at different layers in the program, but have never been really satisfied with the results. Is there an agreed-upon or nice way to do this?
...
I'm using a customized JToolbar using the following code:
public class GeneralToolbar extends JToolBar{
public GeneralToolbar() {
super();
setBackground(Color.white);
setOpaque(true);
setPreferredSize(new Dimension(54,54));
setMinimumSize(new Dimension(54,54));
setMaximumSize(new Dimension(54,54));
setSize...
if you needed to build a highly scalable web application using java, what framework would you use and why?
I'm just reading thinking-in-java, head first servlets and manning's spring framework boo, but really I want to focus on highly scalable architectures etc.
would you use tomcat, hibernate, ehcache?
(just assume you have to design...
I'm writing a GUI app that I want to use Swing and SWT. The end-user will specify somehow which should be used (it won't use both at the same time!). SWT is what I prefer generally and I have been looking at JFace, but it seems like if I use its most powerful features I will increase the coupling between the GUI and the model, and make i...
I'm using a GZIPInputStream in my program, and I know that the performance would be helped if I could get Java running my program in parallel.
In general, is there a command-line option for the standard VM to run on many cores? It's running on just one as it is.
Thanks!
Edit
I'm running plain ol' Java SE 6 update 17 on Windows XP.
W...