Hi i have a ArrayList
ArrayList<String> values=new ArrayList<String>();
values.add("s");
values.add("n");
values.add("a");
values.add("s");
In this i want to remove repeated value
Please Help me
Thanks in Advance
...
I try to create a MIDlet that provides a publically availabe service but the code below is not enough. The service is on (no exceptions) but stil not discowerable.
public StreamConnection waitForConnection() throws IOException {
if (this.notifier == null) {
// Create a server connection (a notifier)
this.notifier = ...
Hi all,
I currently make heavy use of HibernateOperations in Spring for working with Hibernate. Some of the time I use a TransactionTemplate to demark a transaction explicitly. However sometimes I just want to save/update a single object. If I just call hibernateOperations.save() with no explicit transaction active then it sort of wo...
we are developing a web application which allows a user to draw diagrams(flow/ER diagrams) and we need the representation of that diagram in some XML or other formats. How should we acheive this ?? is there any open source software or jQuery plugin or anyother server side software??
...
Let's say I have a doc.xml and corresponding doc.xsd. I use xpath to retrieve some nodes, so I get a list of org.w3c.dom.Node. How can I get type of each node from schema, eg. xs:integer, xs:string etc ?
Some solution would be to parse schema with xpath query "//NodeName[@type]" using node.getNodeName() as NodeName, but that's not perfe...
Hi,
I have an application which displays a collection of objects in rows, one object = one row. The objects are stored in a HashMap. The order of the rows does not affect the functionality of the application (that is why a HashMap was used instead of a sortable collection).
However I have noticed that the same aplication runs different...
Hi,
I'm developing a java full screen application. I would like to debug this application using eclipse debugger. However, if I put a breakpoint, my application stops, but my eclipse window doesn't popup, because the full screen application is on.
Up till now, I commented out the lines which made it a full screen application, but I won...
I have a Error404Servlet which is configured as error-page for 404 in web.xml:
<servlet>
<servlet-name>Error404</servlet-name>
<servlet-class>com.foo.bar.Error404Servlet</servlet-class>
</servlet>
<error-page>
<error-code>404</error-code>
<location>/error404</location>
</error-page>
In this servlet...
Is there a simple way to load resource from my own executing JAR as InputStream without accessing ClassLoader? The problem is that my java.policy restricts accessing ClassLoader (this cannot be changed). I want to load some xml config which I can put anywhere in my JAR, but cannot have it outside the JAR.
Thank you for answers.
Actually...
In March or April 2009 Qt Jambi was made open source and then the commercial project was kicked. I'd really like to use Qt Jambi but can't do that if the code isn't maintained any longer.
Is there a fork of Qt Jambi, either commercial or open source?
...
Looked everywhere on sun.com but can't locate the jar file without installing the app server, etc, etc...
...
We have a desktop application using JNI that occasionally causes the JVM to crash. Luckily the JVM produces a hs_err_pidXXXX.log file, which is quite useful in debugging such errors. However, it always seems to go to the current working directory, and it's annoying to dig it from there, since our other log files all go to a specific "log...
What is the equivalent (in C#) of Java's >>> operator? Just to clarify, I'm not referring to the >> and << operators.
...
The MVC pattern wants that Model dispatches change status events to View.
Which is the best implementation of this comunication if the Model is a simple javabean with setter and getter methods?
...
I want to use my args array.
I mean this array:
public static void main(String[] args)
Where can I run something like java Test one two three?
...
I'm still investigating issues I have with GC tuning (see prior question), which involves lots of reading and experimentation.
Sun Java5+ JVMs attempt to automatically select the optimal GC strategy and parameters based on their environment, which is great, but I can't figure out how to query the running JVM to find out what those param...
i want to run a routine backup of my database from my java application. i'm actually considering a cron job within quartz to fire the backups at the specified time, but i don't know if thats the proper and most efficient way to do it. are there any other ways i can do it? and is there anything i should look out for??
...
I am having a dataBind which is having few attributes alongwith a list of bean and one of the attribute of the bean is of type Date. Now i would like to add the customDateEditor to this date field.
My Databind goes like this:
public class myDataBind{
/*
some attributes here
*/
List myList = new ArrayList(); // List...
I've created a .jar containing some packages and I tried to put it into
c:\jdk\jre\lib\ext
but the java commnand does not find the package
If I, instead, put the .jar into
c:\jre\lib\ext
all works!
Why? The SUN's tutorial says that both the locations are good!
I saw that the extension mechanism works only for VM but not for the ...
I wanna do something like
java -enableassertions com.geeksanonymous.TestClass
How do I do this?
...