I want to write a program for this: in a folder I have n number of files; first read one file and perform some operation then store result in a separate XML file and the read 2nd file again perform operation and save result in same XML file, even same procedure for n number of files. The program read all files one by one and stores resul...
I have an event processing scheme which should also eventually write to file; I cannot afford to delay the event when the file is being flushed, i.e. waiting to the end of BufferedWriter.write(String).
I'm looking for the easiest way to achieve that (is there's a library doing that? I reckon that I'm not the only one who had this proble...
How do you make a Java desktop application modular? How should the modules be classified?
...
I want to ask if there is a way to make the text field active and inactive according to the radio button.
For example, the textfield will be inactive and when the user click on the radio button, the textfield will be active.
I am using Java language and NetBeans program
...
I want create a excel with Apache POI in java and I must insert in a cell a formula: A3=B3+C3.
Is possible to insert another formula in A3 that color the cell if his value is> 0?
I use Apache POI 2.5.1
...
I'm trying to use automatic dependency injection via Spring's @Configurable annotation w/ @Resource on the fields needing injection. This involved some setup, like passing spring-agent.jar to my JVM. For the full details see here.
It works... mostly. When my Tomcat is booting up, I see the AspectJ init messages, my User objects automati...
I'm a beginner, and I'm experimenting with formatted output.
I'm trying to produce a table of decimals:
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
row = (double) 5*i;
column = (double) j + 1;
System.out.format("% 6.3f", row/column);
System.out.print("\t");
}
System.out.format("%n");
}
This produces:
0.00...
Hi,
Im using Logica SMPP api for sending sms. Im able to send plain english messages with default data coding as "0"
Now if i want to send sms in other language such as hindi or chinese, what are the different values i should set..
Should i create a UDH for the same ?
wht data coding should i use?
wht esm class should i set ?
sho...
Hi,
I can't figure out how to set an ANT property on the condition that it has not been set(i.e: it is not defined in the properties file and should automatically default).
So far, I only have the following code:
<condition property="core.bin" value="../bin">
<isset property="core.bin"/>
</condition>
But this only seems to work ...
Is it possible for a Non-Interpreted language to have a Garbage collector. Interpreted languages have the Interpretor executing the Program line by line so the Interpretor might just as well provide a runtime with a GC. But is it possible to have a Garbage collector for any other language without building the GC in your code itself ?
...
I'm doing some werid reporting from JPA datastore.
I need to select (using EJBQL) list of objects and these objects contain collection of entities ie I have class that is constructed by:
FOOBean(String param1,
String param2,
List<Entity> listParam)
(notice that third parapeter is a list)
And I want to select list of thes...
After having read and used (made a web application using Struts/Hibernate last semester) Struts1, I want to step forward in learning a better MVC framework. I have been wondering if it would be more prudent to learn Struts2 now and Spring later, or skip Struts2 for Spring directly?
...
what is the standard exception to throw in Java for not supported/implemented operations
...
is there such a thing in a standard manner?
including
Java Source Code - Test Code -
Ant or Maven
JUnit
Continuous Integration (possibly Cruise Control)
ClearCase Versioning Tool
Deploy to Application Server
in the end I 'd like to have an automatic Build and Integration Environment.
...
Hello,
I need improve the traceability in a Web Application that usually run on fixed db user. The DBA should have a fast access for the information about the heavy users that are degrading the database.
5 years ago, I implemented a .NET ORM engine which makes a log of user and the server using the DBMS_APPLICATION_INFO package. Using ...
Calling all MQ Gurus,
I have a box under my desk which we use to replicate our production environment which is:
WebSphere 6.1
Fedora Linux
MQ 6.0
Whenever one of our applications tries to send a message to a MQ queue we get the following error: MQJE018: Protocol error - unexpected segment type received
Any suggestions on what this mi...
What I need to do is:
1) Get user's locale from request.
2) Create new sql.Date object with current date and time, based on user's locale
3) Write it in MySQL db, column type: TIMESTAMP
What I got is:
java.util.Locale locale = request.getLocale();
java.text.DateFormat dateFormat =
java.text.DateFormat.getDateTimeInstance(
...
I'd like for Netbeans to deploy directly into an exploded ear in JBoss, instead of the current process of deploying a whole .ear file. Development would be much quicker if it were possible to edit .jsps and backing beans without a redeploy after each change.
Is this possible?
...
I have a situation where I'm refactoring old code, taking apart an old monster project and splitting it (for various reasons) into smaller sub projects. One project is going to end up containing mostly interfaces while their associated implementations are in another project, and I'm not sure about the best way of setting up the package s...
I'm using Hibernate JPA and Spring in my project. Suppose if I try to insert a record with duplicate key value, the insert query will throw an exception.
Now, is it possible to get the table name, field name and possible cause for the exception from the SQL Exception object at run time !?
...