I was reading an article on handling Out Of Memory error conditions in Java (and on JBoss platform) and I saw this suggestion to reduce the size of the threadstack. Can anyone explain how "reducing" the size of threadstack will help with a max memory error condition?
http://community.jboss.org/wiki/OutOfMemoryExceptions
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?
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 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 am trying to re-arrange all the attributes of the XML file.
Need to group all the attributes of each node.
Here is the required output XML file:
Can this be possible with XML DOM in JAVA?
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
Is there a utility similar to OllyDbg / SoftICE for java? I.e. execute class (from jar / with class path) and, without source code, show the disassembly of the intermediate code with ability to step through / step over / search for references / edit specific intermediate code in memory / apply edit to file...
If not, is it even possible to write something like this (assuming we're willing to live without hotspot for the debug duration)?
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.
Does Java have any functionality to generate random characters or strings? Or must one simply pick a random integer and convert that integer's ascii code to a character?
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 ?
E.g.
input: ['A', 'Z', 'F', 'D', ...]
output: [0, 25, 5, 3, ...]
In C I'd just subtract the char from 'A', but I don't seem to be able to do this in java.
I'm creating an XML document. I got it to indent using TransformerFactory.setAttribute("indent-number", new Integer(2));
Transformer.setOutputProperty(OutputKeys.INDENT, "yes");
Is it possible to get Java to use tabs instead of spaces for indenting? And how?
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.
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.
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.
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'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.
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 ?
What is the best way to do a resizable array in Java? I tried using Vector, but that shifts all elements over by when when you do an insert, and I need an array that can grow but the elements stay in place. I'm sure there's a simple answer for this, but I still not quite sure.
I'm looking for the most suitable tool for generating dynamic geographical maps in Java (with styles based on custom business data: colors, labels etc. will be dynamically set). After some searching, only GeoServer (and the underlying GeoTools library) seems to fit.
Although I'm really happy with this solution, I'm afraid I might miss something and make some decision based on incomplete input. Any suggestion ? Any viable alternative to compare against ?
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.
I have an application written in Java to run on Linux. I'm developing in Eclipse under windows. I would like to run the code on the Linux box and debug it on the Windows one remotely. I've found some information about how to do so, but it's pretty sparse. Does anyone have (or can point to) a complete explanation of the process?
Any help would be appreciated.