I have an application where I need to parse or tokenize XML and preserve the raw text (e.g. don't parse entities, don't convert whitespace in attributes, keep attribute order, etc.) in a Java program.
I've spent several hours today trying to use StAX, SAX, XSLT, TagSoup, etc. before realizing that none of them do this. I can't afford to...
I want to bundle JRE 6.0 together with my java application. All my source code reside in CVS. My client will check-out the code and build it themselves. Should I store JRE in CVS?
...
Say I have a Maven dependency defined in a project like below.
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mycompany.library</groupId>
<artifactId>myli...
Imagine this string:
if(editorPart instanceof ITextEditor){
ITextEditor editor = (ITextEditor)editorPart;
selection = (ITextSelection) editor.getSelectionProvider().getSelection();
}else if( editorPart instanceof MultiPageEditorPart){
//this would be the case for the XML editor
selection = (ITextSelection) editorPart.getEditor...
I had a huge file for creating this GUI and I have shortened by using arrays. I am trying to add an ActionListener when the arrays are being added and I am getting this error
/tmp/jc_3531/GUI.java:60: addActionListener(java.awt.event.ActionListener) in javax.swing.AbstractButton cannot be applied to (GUI)
nButtons[c].addActionList...
The Java Virtual Machine Instruction Set page provides information about mnemonics such as aaload, aastore... etc.
However neither the cpu cycles that these mnemonics would take up is mentioned nor is there any info on the byte size or word size of these mnemonics.
Any idea where this information could be found?
...
Is there a Hibernate configuration (hopefully an annotation on a classes mapped @Column field) that would let me sort a collection of entities associated with the loaded entity by a given column of that entity when a session.load(Entity.class, Id) is called?
For example if I had an EntityA that contained a OneToMany association to an En...
I have a Java applet that is meant to run only on Windows. (It uses a 3rd party COM object; it is not cross-platform.)
Is there a way to run a Java applet as a stand-alone application on Windows?
...
I've created a jax-ws service endpoint and now I want to write a client. I want to have a shared jar between the client and server for common (JAXB annotated) entity classes and interfaces for the services. Is it possible to force jax-ws to generate (or allow me to write) a client using my existing entites/interfaces?
For those that are...
I've asked this before for Java, but this applies specifically to J2ME.
Is there a way in J2ME to convert a string, such as:
{"name":"MyNode", "width":200, "height":100}
to an internal Object representation of the same, in one line of code?
The problem with such JSON libraries, is that they generate JSONObjects from strings, not...
i new to neko vm. may i know in order to use it, i need to download the vm and install on client's browser? it is the same like java vm right? what is the different from java applet using jvm?
...
Hello,
The following enum structure performs certain operations while remaining agnostic to the client class (for encapsulation reasons)
public enum MyEnum implements Commands{
A{
public int method1(int varY) {
return varY+2;
}
public MyEnum method2(){
return MyEnum.B;
...
Hi All,
pl correct the prg.
Q. Write a java prg to accept RollNo, Name of a Student and store it in
Student.txt.Accept n records and store it.
Following are the drawbacks of o/p produced
1. When we write rno i.e. int {roll no of stud} to the file "Student.txt" it does
not write the int value
i/p
C:\j2sdk1.4.1_01\bin>java StudentInfo...
I have noticed in Java that you can have a function with object... as a parameter and then method will take any number of objects as a parameter and treat it as an array. What is this called? I have been trying to search for it but it seems ... is ignored by search engines.
I seem to remember printf in C does the same thing.
Thanks.
...
PLz I want to know is there any API or a query interface through which I can access wikipedia data
...
Is there any good open source library in Java which can be used to draw 3D dynamic charts, like JFreeChart does it for 2D?
...
Hi all,
I want to use Java Transaction service for distributed transaction management in my Java application.
I have 3 different databases to which I have to connect using 3 different Connection objects. I want to insert certain data in each of the 3 databases.
My requirement is that atomicity should be maintained. So either data should...
Dependency injection is a useful technique but what approach is recommended when faced with runtime dependencies?
e.g. Say you want to glue an event to an event processor depending on the type of the event and the user who initiated the request.
public interface Event {}
public interface EventProcessor {
public void handleEvent(Ev...
Hi
I write 2 GWT module and compile it. I want locate ***.nocache.js files into a html file.
...
What are JAX WS Interceptors? Where do I find info regarding the same!
...