reading multiple files in a folder in java
hi, can any one help me . I want to read all the files in a folder through java. can any help me out???.. ...
hi, can any one help me . I want to read all the files in a folder through java. can any help me out???.. ...
How should I create & run unit-tests for a Java/Tomcat Servlet-Applet application? ...
What does List<?> mean, does it mean simply a list of objects of unspecified type? Googling for the string <?> returns nothing useful (: ...
New to spring, we have a whole pile of validators that generate java warnings, I was able to hide them using the "@SuppressWarnings" annotation, however what is the proper way to sort this out? public class SignInValidator implements org.springframework.validation.Validator { @SuppressWarnings("unchecked") public boolea...
Hi! I am working on a simple ejb module, sample code where i am trying to implement CURD operation through a SOAP webservice. My problem is like this. I have a persistence unit defined in persistence.xml file. Here is the code for my implementation. The problem is that I cannot create the instance of PersistenceService class since, th...
Hi, I have an application for which we use IzPack to create the installer. The installer is working fine in its current state, however, I need to add functionality that enables it to check whether an existing version of the software has been installed. I understand IzPack supports this out of the box using its CheckedHelloPanel, unfort...
I'm using Netbeans to develop my Java application.I want to display list of items with icons. I have use ListCellRenderer but it just display item, but not icon. Here is my code //Item class public class Item { private String title; private String imagePath; private ImageIcon image; //getter and setter} //ItemRenderer publ...
This following is from generics tutorials: Say class R extends S, public void addR(List<? extends S> s) { s.add(0, new R()); // Compile-time error! } You should be able to figure out why the code above is disallowed. The type of the second parameter to s.add() is ? extends S -- an unknown subtype of S. Since we don't know what ty...
I have an applet that is crashing Firefox on Linux. Can anyone tell me how I can enable the java core dump log file for this applet and where the file would be generated? ...
I am well aware of this previous question here and have heard great things about those books. I actually bought two of them, Effective Java and Java in a Nutshell as an early Christmas present. I am looking for a good Java book, or books, to further continue my understanding of Java from a recent college graduate point of view. I have ...
I'm looking for the simplest, most straightforward way to implement the following: main starts and launches 3 threads all 3 tasks process and end in a resulting value (which I need to return somehow?) main waits (.join?) on each thread to ensure they have all 3 completed their task main somehow gets the value from each thread (3 values...
I generate a report in doc format using Jasper, Jasper uses JRRTFExporter to generate doc reports, but wen i try and compare doc reports using POI it throws exception stating some header issues. Is there any way to convert rtf to doc in jasper or any API available to convert rtf to doc? Please help! ...
For a JAVA project I am working on there is a requirement that I use a Microsoft Access Database running on a computer where I do not have administrative priveleges. So, I have the Access DB file all ready, and I started doing some research - but everywhere I look mentions the need to use the Admin Tools (or Control Panel) to "setup an ...
Hi, I finally wrote me little app. It's desktop app but it has embedded web server. When I lunched it from NetBeans everything is ok. When I lunch dist jar I have correct character encoding in GUI, but web server output is corrupted ("?" instead of national characters). I use NetBeans 6.7.1, jdk1.6.0_16, http server from Java 6 SE and ...
Is there any Java API available which converts .rtf files to .doc file (97-2003) format? ...
I have a JDialog with a JTextArea component. This dialog shows the user what arguments to use when running the program to have it run the mode they just set up. I have a button on the dialog to copy the arguments to clipboard. This uses the copy() method on the JTextArea object. This works perfectly and the clipboard contains the correc...
I have a small Java application which uses some configuration settings, which are saved between sessions. I started to create a Configuration class which provides the settings and can save and load itself to a Properties object. But because it's a very small application with few settings I asked myself, if I just could use a Properties...
In a "serious" Java GUI app, you'll have models behind many of your GUI elements: A DocumentModel backing a JEditorPane, for example, or a ListModel behind a JList. We're always told not to make GUI changes from outside the Swing worker thread and given SwingUtilities.invoke...() for working around that. Fine, I can live with that! It's...
In Struts 1 you could have, in struts-config.xml, a declaration like: <action path="/first" forward="/second.do"> Is something similar also possible in Spring, or can I map an URL only to a controller? I am using Spring 2.5.x. I could off course map the URL to the same controller as: <bean id="urlMapping" class="org.springframework....
What is the difference between these two innerclass declarations? Also comment on advantages/disadvantages? case A: class within a class. public class Levels { static public class Items { public String value; public String path; public String getValue() { return value;} } } and case B: class within interface...