Multitherading not working while using java with XML

V

Vidit Mathur

HI
We have a program in Java which Asks user to enter a password, the
password is not visible to the user as using multithreading it is
erased simultaneously while entering.
When we run this program through the command prompt it runs fine with
no problems, but when we call it using Ant xml, it starts flickering
all over the screen .

Can anyone suggest why is it hapening and a probable solution,
Vidit
 
J

John C. Bollinger

Vidit said:
We have a program in Java which Asks user to enter a password, the
password is not visible to the user as using multithreading it is
erased simultaneously while entering.
Yuck.

When we run this program through the command prompt it runs fine with
no problems, but when we call it using Ant xml, it starts flickering
all over the screen .

Can anyone suggest why is it hapening and a probable solution,

The problem might be caused by the program running in the same VM as Ant
itself. Try specifying fork="true" where you launch it. Better,
though, would be to adopt a more reliable approach to accomplish your
task. Have you considered the JPasswordField class? If that's not
sufficient for you, for whatever reason, then come up with a solution
that uses standard AWT / Swing listener facilities or that otherwise
integrates into the event-handling system to accomplish your goal of
hiding the password.


John Bollinger
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top