|
From: Leif M. <le...@ta...> - 2008-05-31 05:32:49
|
Haipeng, In the future a lot more information would be helpful. I do not have a much experience with Swing, but I think I figured out what you are doing. I assume you are referring to the FlaforListener.flavorsChanged class. Registered with the Clipboard.addFlavorListener method. As I understand it from the javadocs, it looks like this method should be getting fired whenever the contents of the system Clipboard changes. The problem here is likely because the Wrapper(JVM) and your desktop application are running as different users. By default Windows services run as the SYSTEM user. It would not surprise me if the SYSTEM user does not have access to the clipboard of the user currently logged in. I would suggest doing some investigation along these lines then please post back if you find anything out one way or the other. Does your Java service set the wrapper.ntservice.interactive=TRUE property? If not you might want to try that. Another option if you not need your application to be interactive would be to run the service as the same user as you are logged in as. It is not possible to specify a user if your service is interactive however. http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-account.html http://wrapper.tanukisoftware.org/doc/english/prop-ntservice-interactive.html Cheers, Leif On Sat, May 31, 2008 at 8:02 AM, haipeng du <hai...@gm...> wrote: > If I start my application in eclipse or from command line, everything works > well. But if I start it as windows service, when text is copied, > flavorsChanged event can not be fired in my application. Do I need to modify > some configurations? > Thanks. > > -- > Haipeng Du > Salt Lake City |