I have been wracking my brain trying to figure this out. For the first time I used jEdit the other day and I was pleasantly surprised that it auto indented my code (meaning that I'd put in the following code:
int method () {
_ //<-- and it put me here automatically
I've tried to get the same thing working with eclipse but with no ...
HashMapList keeps its elements inside a HashMap) and when I call add method this error message will be shown in the concole "Exception in thread "main" java.lang.NullPointerException
public class HashMapList<K, V extends Product> extends AbstractList<Product> {
public V element;
public int index;
Map<Integer, V> map;
public HashMapLi...
in which situations we have to implement the Comparable interface?
...
Hi
can you please let me know in which language the Java compiler, virtual machine (JVM) and java is written.
...
I need to write a download servlet in java to download a file from the web server. I am setting the response parameters as follows:
resp.setContentType( (mimetype != null) ? mimetype : "application/octet-stream");
resp.setContentLength( (int)f.length() );
resp.setHeader( "Content-Disposition",
"attachment; filename=\"" +...
I'm not an expert, just a beginner. So I kindly ask that you write some code for me.
If I have two classes, CLASS A and CLASS B, and inside CLASS B there is a function called funb(). I want to call this function from CLASS A every ten minutes.
You have already given me some ideas, however I didn't quite understand.
Can you post some e...
Hi, is there an easy way to dell htmldocument (inside a JTextPane) to not load images from the web? i cant think of anything smarter then to simply remove the tags or similar. and cant seem to find any "build in" functionality for it.
...
I'm using a JViewport for viewing some data and I'd like the header row to be placed at the bottom of the JViewport rather than the top.
The viewport never scrolls horizontally so the issue of where the scroll bar would go isn't a problem.
I suspect I'm going to have to make my own JViewport-like class which has the header row at the b...
Hello,
Can the semaphore be lower than 0? I mean, say I have a semaphore with N=3 and I call "down" 4 times, then N will remain 0 but one process will be blocked?
And same the other way, if in the beginning I call up, can N be higher than 3? Because as I see it, if N can be higher than 3 if in the beginning I call up couple of times, t...
Hi
I'd like to know the correct / best way to handle concurrency with an Axis2 webservice.
Eg, given this code:
public class MyServiceDelegate
{
@Resource
UserWebService service; // Injected by spring
public CustomerDTO getCustomer()
{
String sessionString = getSessionStringFromCookies();
service.setJSES...
Hi, I'm new to Java.
Why are abstract or interface classes created, or when should we use abstract or interface classes?
...
how to get Subnet mask address of local system using java programming.?
...
Hello Guys,
I am haveing this problem with my application and need help. I have data from the server in this form
Food Apple Fruit Seed etc..
Table Chair pen School et..
...
Food Mango Peer Melon etc..
Reading from the left, i want to make for eg; in the first row,
Food parent of Apple
Apple parent of Fruit
Fruit...
If I use the maven-dependency-plugin plugin, than I can't use a version range. Also it seems the version of a there defined artifact doesn't get updated though a newer version is in the remote repository.
Why is that so?
Uses the maven-dependency-plugin some other mechanism than the rest of maven to resolve dependencies? And if that is...
hi ,
As there is JUnit test tool for Desktop java is there some thing similiar in android so one can apply on android also .
Thnx in advance.
...
Hello Guys,
I just posted the following question but i made a mistake. What i want is not how to use Eclipse but how to build the tree-like structure. An element can have more than one children.
So show me how to build the tree; It is not actually tree but to build the structure as i have show below. Thanks
I am haveng this problem...
can you get 2 singleton instances of the same underlying type?
this is obviously trivial in spring as it is based on named instances to which you attach a scope but I can't see the equivalent in guice which is about binding types to implementation classes. Note that I don't want to have to bind to the instance as the instances in quest...
Hi,
I'm having some ERRORS at runtime, from DWR methods with no parameters. The error looks like:
[exec] 12:21:56,372 ERROR
[SignatureParser] Parameter mismatch
parsing signatures section in dwr.xml
on line: public String
MyOwnClassName.myOwnDWRMethod()
How can I avoid this error? I mean, is there anything erroneous in the...
I'm looking for a java library or some help to write my own interpolation function. That is I have two arrays of doubles which are potentially different sizes, but are ordered. I need to be able to make an estimate of intermediate values, and insert so that both arrays become the same size. In fact the total number of points appearing...
I'm new to OSGi. My aim is to create a structure with the config admin, so you can enter a configuration, which will be reused after restarting the server.
While I have read the api and tried some samples, I thought this feature will be included by default.
My question to you: Is this possible at all and if yes: what have I to consider...