change a config.properties file in a jar / war file in runtime and hotdeploy the changes ?
my requirement is something as follows, we have a "config.properties" in a jar/war file , i have to open the file through a webpage and after the user has made necessary changes to it, i have to update the "config.properties" in jar/war file and h...
Has anyone tried Wiigee? I am planning to use it but I am facing a problem related to bluetooth (I am using BlueCove (latest version)). Whenever I try to compile and run the demo program (which is downloaded from Wiigee site) my wiimote is not detected by BlueCove. I played a lot with wiimote but it's the first time I have tried to conne...
I'm trying to figure out why my web app (I didn't write it, but I'm supposed to debug it) is consistently causing the Tomcat web server to restart. All I see in the logs before the server restarts is:
Jul 24, 2009 7:52:15 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Portable Runtime which allows opti...
Hi All,
Requirement is this ...
We are reading word document and getting all annotation from that document, and we are sending this document to user, when user open the document that time document should open with some specific page specific paragraph. ( That specific page, paragraph location we can give it, I can give the org.apache.p...
How can I test an xml string to see if it validates against and dtd file?
I've read this question but they only see to be talking about replacing the dtd declaration on an xml file.
Person.DTD
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT person (id)>
<!ELEMENT id (#PCDATA)>
Test
@Test
public void should_serialize_a_shootout_to...
Hi every One,
can any one tell me what is the best way to store and Image By hibernate (into MySQL)
I have this class Mapping
@Entity
@Table(name = "picture")
public class PictureEntity implements Serializable {
@Id
@Column(name = "id")
@GeneratedValue
private int id;
@Column(name = "format", length = 8)
private...
Say I have this class :
public class BaseJob{
String name;
public void setName(String name){
this.name=name;
}
public String getName()
{
return name;
}
}
and another class that extends it :
public class DetailedJob extends BaseJob{
public void doThing();
}
Furthermore, I have this method in another class :
List<BaseJob> ...
I'm experiencing some strange behaviour when using a stylus with swing.
I am interpreting pressing the button on the side of the stylus(RIGHT) and pressing the stylus down(LEFT) as a "Grab" event, but occasionally (more often than 0), events are just being dropped.
The JavaDocs for MouseEvent are pretty explicit about how multibutton p...
Hi all,
I have 4 servers and JVM is installed on them. I wrote a java service that Quartz calls this services every 10 minutes. But in 4 servers, every 10 minutes 4 calls are done. This sitiuation creates race condition. I want only one service on 4 JVM.
How can I do that with Spring Framework?
...
I am currently working on a web app that had previously run and deployed fine but after making a recent change JBoss will no longer deploy a complete war file. I was hoping someone here would have some advice on how to fix it. JBoss deploys everything in WEB-INF and META-INF fine but nothing in the class folder is getting deployed. I ...
Hi,
(this is java) I have an oval, representing a unit. I want the colour of the oval to represent the unit's health. So a perfectly healthy unit will be all green. and with the unit's health decreasing the oval starts filling with red from the bottom. so, on 50% health the oval would be red in bottom half and green in the top half, and ...
Why am I getting an error "Attribute value must be constant". Isn't null constant???
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface SomeInterface {
Class<? extends Foo> bar() default null;// this doesn't compile
}
...
Is there a.NET utility class equivalent to java.util.Arrays.hashCode() for arrays of intrinsic types such as int[], short[], float[], etc.?
Obviously I could write my own utility class but was trying to find one already available in the .NET framework.
...
I am using Rational Application Developer v7.0 that ships with an integrated test environment. When I get to debugging my webapp, the server startup time in debug mode is close to 5-6 minutes - enough time to take a coffe break!
At times, it so pisses me off that I start cursing IBM for building an operating system! instead of an app s...
I have a small Java desktop app that uses Swing. There is a data entry dialog with some input fields of different types (JTextField, JComboBox, JSpinner, JFormattedTextField). When I activate the JFormattedTextFields either by tabbing through the form or by clicking it with the mouse, I would like it to select all the text that it curren...
I have a jar file I produced from compiled class files using an ant file with <javac target="1.5" ... /> and I would like to verify that it actually produces 1.5 code. Is there a way to do this?
My version of MATLAB one one of the computers I'm using, uses a JRE 1.5; so it will not run code unless it is JRE 1.5 compatible. It's worked f...
I was previously using Axis 1.2 to create and throw AxisFaults to simulate a clients web service. We have since moved to Weblogic and I have taken the same code and converted it to a SOAPFault and now throw a new SoapFaultException( of SOAPFault), but Weblogic will now no longer compile the class.
It yells about "javax.xml.soap.SOAPFau...
just looking to start programming in Java. I'm on a windows platform and currently use Visual Studio 2008 for ASP.Net programming and FlashDevelop for ActionScript.
i'm looking for a free IDE which has the following:
Compile / Test from IDE
Runs on Windows (Vista)
Is free!
Has intellisense / autocompletion
Thanks,
Josh
...
I have a Java Swing UI that isn't updating/repainting as I thought it should. The app sends an XMPP message and receives a response on a different thread. That response is processed and the UI is updated to reflect information contained in the message.
When the response is received, I update a JPanel component using
javax.swing.Swing...
I have some programmatically assembled huge regex, like this
(A)|(B)|(C)|...
Each sub-pattern is in its capturing group. When I get a match, how do I figure out which group matches without linearly testing each group(i) to see it returns a non-null string?
...