O
ohaya
Hi,
I'm working on developing an extension to a commercial server product.
The base product is written in Java, and we don't have access to the
source, but they do provide an extension API from their product that I
am coding against. Basically this API involves us creating a class
with several methods in it, including an init() method which the main
server code calls during startup.
I originally had a basic extension working, but I needed to have the
extension take in some console input (a password) without having the
input display. While researching this, I found this article:
http://java.sun.com/features/2002/09/pword_mask.html
which uses threads to 'mask' console input. I first implemented a
small standalone app that does this, and this app works fine when run
on both Windows and Solaris, so I then incorporated the code into my
extension's init() code.
When I tested on my Windows test system, this worked fine. When the
server starts, I could see my extension's init() method being called,
and then I got a prompt and was able to enter input on the console
without it being displayed.
I then moved my extension over to Solaris, and it didn't work. I can
see my extension's init() method being called, but it looks like right
about the point where the init() method tries to instantiate a thread,
basically nothing happens.
Again, this same code works fine on Windows.
I suspect that, for some reason, creating/using a thread within my
class may be be "interfering" with threading that the server itself is
doing. The fact that this is only a problem on Solaris, gives me some
hope that I may be able to make this work on Solaris, but I was hoping
someone here might be able to shed some light on this problem.
Thanks,
Jim
I'm working on developing an extension to a commercial server product.
The base product is written in Java, and we don't have access to the
source, but they do provide an extension API from their product that I
am coding against. Basically this API involves us creating a class
with several methods in it, including an init() method which the main
server code calls during startup.
I originally had a basic extension working, but I needed to have the
extension take in some console input (a password) without having the
input display. While researching this, I found this article:
http://java.sun.com/features/2002/09/pword_mask.html
which uses threads to 'mask' console input. I first implemented a
small standalone app that does this, and this app works fine when run
on both Windows and Solaris, so I then incorporated the code into my
extension's init() code.
When I tested on my Windows test system, this worked fine. When the
server starts, I could see my extension's init() method being called,
and then I got a prompt and was able to enter input on the console
without it being displayed.
I then moved my extension over to Solaris, and it didn't work. I can
see my extension's init() method being called, but it looks like right
about the point where the init() method tries to instantiate a thread,
basically nothing happens.
Again, this same code works fine on Windows.
I suspect that, for some reason, creating/using a thread within my
class may be be "interfering" with threading that the server itself is
doing. The fact that this is only a problem on Solaris, gives me some
hope that I may be able to make this work on Solaris, but I was hoping
someone here might be able to shed some light on this problem.
Thanks,
Jim