How do I backup / restore any kind of databases inside my java application to flate files.Are there any tools framework available to backup database to flat file like CSV, XML, or secure encrypted file, or restore from csv or xml files to databases, it should be also capable of dumping table vise restore and backup also.
Hi, would it be possible to bind a Java application to a Cocoa graphical interface?
I'm working in Eclipse right now, on my mac, and am wondering if Interface Builder could be used to construct a new interface so that I don't have to look at Swing all day.
Any ideas/suggestions? Thanks!
When I use the annotation:
@XmlRootElement(name="RootElement", namespace="namespace")
class RootElement {
to create xml file from java, it creates the root element as:
<ns2:RootElement xmlns:ns2="namespace">
but I wanted to create without the "ns2", like:
<RootElement xmlns="namespace">
Any idea how to fix it?
Reletad link (example I used to create the xml):
http://www.java2s.com/Code/JavaAPI/javax.xml.bind.annotation/XmlRootElementname.htm
Hi
There are several PHP or js code formatting libs out there -- does anyone know if similar libs exist in Java?
Ie., Given a string of code, return a formatted string with syntax colouring etc.
It'd be ideal if it auto detected the language, but I might be pushing my luck there...
Which CMS are you using in Java and what is your experience with it (in terms of extensibility, usage comfort, framework API, memory usage, performance etc.). I am looking for suggestions.
I need to implement a cache solution in java for a cluster of 9 servers with web applications. I saw apache JCS, seems old, do you know another open source solution ?
thanks
I've just made a program with Eclipse that takes a really long time to execute. It's taking even longer because it's loading my CPU to 25% only (I'm assuming that is because I'm using a quad-core and the program is only using one core). Is there any way to make the program use all 4 cores to max it out? Java is supposed to be natively multi-threaded, so I don't understand why it would only use 25%.
I have a big XML which contains around 300 elements. I need to modify 2 or 3 elements in this xml using Java. I don't want to go for conventional marshalling and unmarshalling as it involves the parsing of the whole XML. How is XPath/XSLT manipulation? I know that I can easily read the data but i need to modify the same and put in back in the same XML. The primary concern here is performance. Kindly advise
I have created a game in java and now I just need to add a timer that allow the user to play under 60s. I have searched on internet and found the timer for swing and util packages. could you please just give me a method to be able to use it in my game???
I have a java primitive type at hand:
Class c = int.class; // or long.class, or boolean.class
I'd like to get a 'default value' for this class - specifically the value is assigned to fields of this type if they are not initialized. E.g., '0' for a number, 'false' for a boolean.
Is there a generic way to do this? I tried
c.newInstance()
But I'm getting an InstantiationException, and not a default instance.
as we "No keyword should be used as an Identifier in java". But there will be some words like asser or enum or any other which have been added as keyword in version 1.4, 1.5 resp. So if any older version code is used to compile with new javac, what happens if that code contains these words as an identifier?
I am trying to code a game following instructions contained in an OU TMA document which read:
In the constructor, write code to assign a new instance of Random to ran which you should create using the Random class's zero argument constructor
Will this code work?
Random ran = new Random(0) ;
I am a relative newbie to Java, and I don't understand exactly what the instructions mean
Hi
I have written an chat application in java, now I like to update my application whenever user registers my chat application I should get a sms on my cell.
I am not getting how should I start with messaging service. Let me know any ideas or links.
Thanks
I need encrypt data using exactly the PKCS#1 V2.0 encryption method (defined in item 7.2.1 of the PKCS#1V2 specification).
Is it already implemented for Java?
I'm thinking in something like just pass a parameter to javax.crypto.Cipher specifying "PKCS#1V2", I wonder if there is something like this?
I am just starting with JAVA serialization, I have one exercise to do and I need to lock serialization on any class, it is suppose to throw an exception when I attempt to serialize that class. Does anyone know how to do it?
Thank you
i dont understand why c# is so popular. if it's only good on windows, where as c++ and java work on any system, why is it that c# is so popular? is it because it's accessible to more people since it's easier to use?
c# is the top tag in stackoverflow btw.
Java's jar file format builds off of the zip file format, and supports compression of the class files inside it. When and how does the JVM decide which class files to uncompress and pull out of the jars on its classpath? Is the process dynamic and done at runtime as classes are needed, or are they all uncompressed up front before the program actually runs?
Is there any framework, whick allows to mock concrete classes, not only interfaces in java 1.4? I have third party code with a singleton class, where I wanna change one function, without touching orignal code. Is it possible?
From what time I've spent with threads in Java, I've found these two ways to write threads.
public class ThreadA implements Runnable {
public void run() {
//Code
}
}
//with a "new Thread(threadA).start()" call
public class ThreadB extends Thread {
public ThreadB() {
super("ThreadB");
}
public void run() {
//Code
}
}
//with a "threadB.start()" call
Is there any significant difference in these two blocks of code?
I am interested in understanding object-oriented programming in a more academic and abstract way than I currently do, and want to know if there are any object-oriented concepts Java and C++ fail to implement.
I realise neither of the languages are "pure" OO, but I am interested in what (if anything) they lack, not what they have extra.
hi friends,
How to read XML file into two dimensional array using java. Am new to this concept. Please suggest me any ideas and suggest any websites and examples regarding this question.