Hi,
I read few books on spring2.5 on these topic, but still cannot grab the concepts when to use @initBinder. can anyone share any reference or explain in what situation i can use this on web application? How propertyEditor relate to it?
...
OpenSolaris 2009.6 does not come with a javac. So I installed the SUNWj6dvx package. It installed a javac alright, but when i run the javac, I got this error message:
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/Main
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.Main
at java.net.U...
Hello every body:
I want to apply policy and rights on MS Word file 2003 and 2007 using
Java API or using Microsoft COM object in Java like JACOB.
Is there any one know how this issue can be solved please help me
...
Hello I am trying to use a service to control a wakelock so I can permanently leave the screen on when my application is running. I create the wakelock and activate it in onCreate() and release it in onDestroy() however I get the error "wl cannot be resolved". Can someone explain how I can get over this? Code below:
public class WakeLoc...
Does anyone have a skeleton build file that I can modify to war up an eclipse dynamic web project.
I need to war it up and make sure that all the libraries/servlets are in the right place.
...
Hi,
I have a fairly computing intensive benchmark program in Java which I am testing on a Linux server. It runs just fine on my Macbook.
If I run it on the server, the following happens: As soon as the memory footprint reaches about 324 MB, the program begins to grind to a halt. Apparently some restriction bars it from using more memo...
From Sun's Java Tutorial, I would have thought this code would convert a set into an array.
import java.util.*;
public class Blagh {
public static void main(String[] args) {
Set<String> set = new HashSet<String>();
set.add("a");
set.add("b");
set.add("c");
String[] array = set.toArray(new String[0]);
S...
Just a simple doubt:
Is it possible to call a java function from c/c++ ?
...
I'm trying to call a RESTful web service from an Android application using the following method:
HttpHost target = new HttpHost("http://" + ServiceWrapper.SERVER_HOST,ServiceWrapper.SERVER_PORT);
HttpGet get = new HttpGet("/list");
String result=null;
HttpEntity entity = null;
HttpClient client = new De...
I am doing a computing-intensive benchmark using Mathematica and its J/Link Java interface.
The benchmark grinds to a halt if a memory footprint of about 320 MB is reached, since this seems to be the limit and the garbage collector needs more and more time and will eventually fail.
The Mathematica function ReinstallJava takes the argum...
I'm currently using FORM based authentication in glassfish v2.1 to log users in and it works fine. I want to switch to ProgrammaticLogin and I want to be able to get the initially requested URL (i.e. before redirecting to login page) and use it in my programmatic login code so that the user is redirected back to the requested page after ...
Is there a java compiler flag that allows me to use goto as a valid construct? If not, are there any third-party java compilers that supports goto? If not, are there any other languages that support goto while at the same time can easily call methods written in Java?
The reason is I'm making a language that is implemented in Java. Gotos...
I'd like to know how to integrate Scala with Spring Security (i.e. Acegi)? What are best practices and roadblocks while doing the integration
...
As we all know, the java -Xmx option is used to set the maximum heap space available to a Java program. But is there a way for a Java program to read the value that has been set? Something like System.getMaximumHeapSpace() (which does not exist).
...
I tried to create a jar file from a java project, which uses some external jars. I created a lib folder and put all the jars I need there.
I run the project in eclipse by adding all the jars in the lib folder to the Build Path and it works ok.
When I try to create the jar with ant from build.xml, it seems ok, no error is shown.
When I...
Is it possible to add elements to a collection while iterating over it?
More specifically, I would like to iterate over a collection, and if an element satisfies a certain condition I want to add some other elements to the collection, and make sure that these added elements are iterated over as well. (I realise that this could lead to ...
Hi All,
I have a simple method which is called from multiple threads;
@Override
public Bitmap getFullBitmap(Filter f, ProgressCallback<String> pc) {
// Requires synchronisation?
Bitmap bitmap = fullMap.get(f.id);
if(bitmap == null){
f.setProgressCallback(pc);
bitmap = f.e.evaluate(currentBitmap);
fullMap.put(f.id, bitmap);
}
...
I need to write a simple servlet which will be the client, and it should be sending some simple strings to server written in java. However I have a problem and I don't know how to solve it. I was trying to put the code in servlet methods but it ain't working.
Here is the code which works great in my standard (non servlet) java client:
ht...
I have created the following class that extends JSpinner to iterate over dd/mm/yyy values.
public class DateSpinner extends JSpinner{
Calendar calendar = new GregorianCalendar();
public DateSpinner(){
super();
calendar.add(Calendar.DAY_OF_YEAR, 1);
Date now = calendar.getTime();
calendar.add(Calendar.DAY_OF_...
Hello I am trying to implement a wake lock for an application.
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK, "My Tag");
It seems to force close when defining the PowerManager shown in the code above. Whats going wrong?
...