I am trying to capture screen shots in my JavaFX application using Robot class, this is the code which I used in my application: It is working perfectly in windows operating system, but showing an error of headless environment in MAC OS at Robot robot = new Robot(); Answer This is to answer my own question, a…
Monads with Java 8
In the interests of helping to understand what a monad is, can someone provide an example using java ? Are they possible ? Lambda expressions are possible using java if you download the pre-release …
Find all numbers in the String [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, …
Would writing a server in 64bit Java be stunted by JVM heapsize / memory?
It looks like 32 bit java program can only use between 1-2 gigs of ram? http://publib.boulder.ibm.com/infocenter/javasdk/tools/index.jsp?topic=%2Fcom.ibm.java.doc.igaa%2F_1vg00014884d287-11c3fb28dae-7ff6_1001.html Could I expect a java program running in 64bit OS to not have this limitation? Answer Could I ex…
xjc: Two declarations cause a collision in the ObjectFactory class
Running the following xjc command raises an error : Although I understand the JAXB bindings and what are is conflict in XJC, I don’t understand where is the conflict in the current schema. how should I fix this ? Thanks, Pierre update: here is the context of the errors: Answer I’ll quote from the …
Wicket dynamically add components to form
I’m having trouble adding components to a form dynamically. What I’m trying to do is: Give the user a drop-down list with items they can choose like name, age, … When a user presses add: there comes a (label + inputbox) in 1 component which allows them to put in the value. You might think I …
Reflection generic get field value
I am trying to obtain a field’s value via reflection. The problem is I don’t know the field’s type and have to decide it while getting the value. This code results with this exception: Can not set java.lang.String field com….fieldName to java.lang.String I tried to cast, but I get comp…
Is EclipseLink MOXy suitable for ridiculously huge XML files?
I’ve spent some enjoyable time with EclipseLink MOXy, figuring out the best way to parse XML into POJOs within Spring. I’ve now been given some XML to parse, and the files go up to a quite unbelievably 750MiB in size. Does EclipseLink MOXy use streaming tech underneath, or will it try to hold the …
Java TCP Client/Server
I have a problem which I do not know how to proceed further in Java TCP socket issue. So far as what we can get from the Internet, it’s not hard to get quite a number of working solution for TCP server & client communication in Java. However, most of the example will have their server listen to a po…
How to remove certain items from a Stack [closed]
It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago. I have a homework pr…