I am writing an application which will search for a particular file or files from the respective path. During searching i need to deploy a progress bar which must run according to the search. so how i can do that? and if possible please post the code?
...
What is the easiest way to get the text (words) or a PDF doc as a one long String or array of Strings.
I have tried pdfbox but that is not working for me.
...
My question is very similar to http://stackoverflow.com/questions/695971/java-http-post-to-create-new-product-in-a-ruby-on-rails-application
I have a form that I want to "post" to a form that looks like this
Offer:<br />
<input id="ride_togive" name="ride[togive]" size="30" type="text" />
</p>
<p>
Request for Offer:<br />
<input i...
I'm trying to use javac with the windows command prompt, but its not working.
After adding the directory "C:\Program Files\Java\jdk1.6.0_16\bin\" to the end of the environment path variable, the java command works fine, but using javac gives me the error:
'javac' is not recognized as an internal or external command, operable program or...
Hi,
My requirement is to provide:
Userid password based authentication.
Open id based authentication
Url based authentication (its a custom sso impl we have)
in the same project.
I have tried to plug in Spring security into an existing project as (code stripped down for simplicity):
<?xml version="1.0" encoding="UTF-8"?>
<beans:be...
I have Cocoa 64-bit Galileo Eclipse installed on snow leopard. For some reason all my java is underlined in red, even standard java library functions. When i try to add a jre it tells me "Standard VM not supported on MacOS." I've even tried installing the 1.5 java sdk and still doesn't work. I also get Unhandled Loop Exceptions. I've tri...
I'm trying to read a file then append some text to a certain place in the file (ie. @ offset jabjab). The problem occurs when i'm trying to write to the file at offset jabjab. what's the error?
File contents:
Mi
<?xml Version="1.0"?>
_
File f = new File("data.dat");
String brstring = null;
String entrystring = null;
try ...
... preferably in Java. Here is what I have:
//x choose y
public static double choose(int x, int y) {
if (y < 0 || y > x) return 0;
if (y == 0 || y == x) return 1;
double answer = 1;
for (int i = x-y+1; i <= x; i++) {
answer = answer * i;
}
for (int j = y; j > 1; j--) {
answer = answer / j;
}
return answer;
}
I'm wonderin...
Whenever I try to attach any file from HTML page in web browser(either Google chrome or Mozzila) and send to Servlet, I'm getting just getting the name of the file without having it's complete path. If I make an attachment of any file from C drive, I'm not getting it's complete address. And whenever I try to send this file name to mail ...
Can any one please provide the required setup and steps to develop a sample web service program using RESTLet.
...
Hi,
I am working on a project that is some kind of a 3d visualization of some simulation. This visualization is a separate eclipse plugin that can be run. The problem is that the gui is imagined as a new eclipse perspective with custom views where at runtime, while the visualization is running, in eclipse views in our own perspective val...
this.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent e) {
// How do I access the parent tree from here?
}
});
...
Hi All,
I'm working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database.
How hard is it to migrate to this system and embed a database in my application? are there real performance gains?
Thanks a lot
...
I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding Array type. The best I could come up with is this:
Class arrayOfFooClass = java.lang.reflect.Array.newInstance(fooClass, 0).getClass();
Is there a way to do this without creating the new instance?
...
Hi there.
We have a voting mechanism that we want to restrict to only allow one vote by user.
We've tried to validate by IP address, but the problem is that when we get the user's IP address in the applicational server it shows always the apache IP address (we have two applicational servers with apache in front of them).
We are using ...
Totally new to java and and struggling.
I need to get the user preferred language
I did the following
Locale userPreferredLocale = Locale.getDefault() ;
However the above despite my Language being "da-DK" it always gets "en-GB"
so I tried the the following which I think will return the correct user language
String locale = System.getPr...
Hi StackOverflow,
i have this rather simple question about the ThreadPoolExecutor. I have the following situation: I have to consume objects from a queue, create the appropiate worker tasks for them and submit them to the ThreadPoolExecutor. This is quite simple. But within a shutdown scenario many workers may be queued to execution. Si...
Hi I have create a sample java application and created a jar file. Now I want to create installer for windows application using visual studio.
How to create windows installer for java application using visual studio.
Also I want my installer should check jre version. and my application should start on boot up of the machine.
Thanks
Sun...
Hello guys
i know i've posting a lot about mac lately and setting up my environment to develop on java 1.6.
after trying to set my etc/launch.conf like so
setenv JAVA_VERSION 1.6
setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/
setenv CATALINA_BASE /Library/apache-tomcat6020
setenv CATALINA_HOM...
I have a small application that updates the contents of a JFrame very quickly (many times per second) and on each update (I remove a component and then add a new one, then set visibility true again) the JFrame flashes on the Taskbar (WinXp) to request focus. It's very annoying and I'm sure it can be disabled. I just cant find out where.
...