Are there any embeddable document database engines for Java, that do not require separate server. I am looking for something similar to MongoDB or CouchDB.
Hello,
I am trying to output some Java objects as JSON, they have List properties which I want to be formatted as { "People" : [ { "Name" : "Bob" } , { "Name" : "Jim" } ] }
However, I cannot figure out how to do this with XStream. It always outputs as { "Person" : { "Name" : "Bob" }, "Person" : { "Name" : "Bob" }
Is there a way to fix this? I've put together some sample code with a unit test in github if you need something more concrete to play with: http://gist.github.com/371358
Thanks!
Hello,
I am working on a geographic project in Java.
The input are coordinates : 24.4444 N etc
Output: a PLAIN map (not round) showing the point of the coordinates.
I don't know the algorithm to transform from coordinates to x,y on a JComponent, can somebody help me?
The map looks like this:
http://upload.wikimedia.org/wikipedia/commons/7/74/Mercator-projection.jpg
Thank you
I am creating my java Swing application in Netbeans. At present there are more than 2000 lines of code. Is it right to have these many number of lines in a single file. Moreover the IDE has become slow when i am editing this file. Is there any way to overcome this?
There are several tools to build java projects:
ant
mvn
ivy
buildr
...
From my experience Ant is great for small projects and projects with special build requirements.
Mvn is great for large but typical projects without too much special requirements. It also seams better for open source than for commercial projects.
What would you recommend in case of large, enterprise, commercial projects ?
What do you currently use and what would you rather use and why ?
How can we keep track of every message that gets into our Java Message Queue? We need to save the message for later reference. We already log it into an application log (log4j) but we need to query them later.
I stumbled upon multi_index on a lark last night while pounding my had against a collection that I need to access by 3 different key values, and also to have rebalancing array semantics. Well I got one of my two wishes (3 different key values) in boost::multi_index.
I'm curious if anything similar exists in the Java world.
I'd like to see how the code is organized and how the various GUI design patterns are applied. Anything Java and in desktop gui style is fine: GWT, Swing, SWT. Thanks.
How can I get video and audio streams from web cameras with Java (in a cross-platform way)?
For example, we have a computer with 3-4 USB web cameras; we want to get their streams and make them visible in the user interface. How can we perform such a thing?
I am using a ServerSocket port to run one instance only of my Java Swing application, so if a user tries to open another instance of the program, i show him a warning that "Another instance is already open". This works fine, but instead of showing this message i want to set focus on the running application itself, like some programs does (MSN Messenger), even if it was minimized.
Is there a solution for this for various operating systems ?
Say suppose i am running a java program through command line. and this program requires some data to enter during the execution. So i was wondering on what happens if somebody uses javaw to run this type of program? that is how can enter the data to the program.
What's the quickest way to remove an element from a Map by value in Java?
Currently I'm using:
DomainObj valueToRemove = new DomainObj();
String removalKey = null;
for (Map.Entry<String, DomainObj> entry : map.entrySet()) {
if (valueToRemove.equals(entry.getValue())) {
removalKey = entry.getKey();
break;
}
}
if (removalKey != null) {
map.remove(removalKey);
}
I am looking for something like a portal, or a community where everybody posts their contributions in Java.
Ex. polynomial calculations, ...
Scenario: Search - "polynomial" - download package (source code)
Thank you.
I have a textfile which my Java program is modifying and putting into an HTML file for display.
However, this textfile contains lots of HTML unsafe characters such as "<" and the "" which would need to be encoded into & gt; (sans space) and & lt;.
Is there some library method I can use to sanatize my text document to replace all these HTML special characters with their safe encoded equivelants?
Please tell me how to write wsdl file of service developed in java. For example:
package fromjava.server;
import javax.jws.WebService;
import javax.jws.WebMethod;
@WebService
public class AddNumbersImpl {
@WebMethod(action="addnumbers")
public int addNumbers(int number1, int number2) {
return (number1+number2);
}
}
this is a web service....so what will be the corresponding wsdl file? if u guys have any tutorial then please help me out.
Hi,
What is the need of Collection framework in Java since all the data operations(sorting/adding/deleting) are possible with Arrays and moreover array is suitable for memory consumption and performance is also better compared with Collections.
Can anyone point me a real time data oriented example which shows the difference in both(array/Collections) of these implementations.
Thx
I'm creating a tree of folders and files in java. Windows and OSX return the system icons and name with the following code:
new JFileChooser().getIcon(File f);
new JFileChooser().getName(File f);
Is there any possibility to get the icons and name of unix systems?. A system command would be ok too.
Thanks.
Hiya.
I need to create a dynamic array in Java, but the values type differ from String to Int to float. how can I create a dynamic list that I don't need to give it in advanced the type of the values?
The keys just need to be ascending numbers (1,2,3,4 or 0,1,2,3,4)
I checked ArrayList but it seems that I have to give it a fixed type for the values.
thanks!
I'm looking for a good general library to grab localized labels for displaying on a web page. I've found some useful solutions at http://stackoverflow.com/questions/19295/database-backed-i18n-for-java-web-app and I will use them but I wanted to see if there was a standard library other than the fmt jstl tags that is already database backed.
Is there any way in Java to enforce a minimum window size?
The last article I can find is from 1999, and has some complicated code to mimic the behaviour...
http://www.javaworld.com/javaworld/javaqa/1999-10/03-qa-window.html
Surely there is a simple method that can be used?