当然可以了!!!
你就是想在java中调用api的吧?!
当然可以了!!!

解决方案 »

  1.   

    用jni与C++进行连接在那个yourclass.cpp中调用dll文件就可以了,你找关键字“jni dll”可以找到许多的例子。
      

  2.   

    就看你处理这些消息用来做什么了,一般来说,不用直接处理这些消息,用java自己的消息处理机制也可以完成大多数工作
      

  3.   

    说出你要解决的问题。我认为你要的只是WindowListener。具体他能干什么你可以去看WindowAdapter等相关文档.
      

  4.   

    void windowActivated(WindowEvent e) 
              Invoked when a window is activated. 
     void windowClosed(WindowEvent e) 
              Invoked when a window has been closed. 
     void windowClosing(WindowEvent e) 
              Invoked when a window is in the process of being closed. 
     void windowDeactivated(WindowEvent e) 
              Invoked when a window is de-activated. 
     void windowDeiconified(WindowEvent e) 
              Invoked when a window is de-iconified. 
     void windowGainedFocus(WindowEvent e) 
              Invoked when the Window is set to be the focused Window, which means that the Window, or one of its subcomponents, will receive keyboard events. 
     void windowIconified(WindowEvent e) 
              Invoked when a window is iconified. 
     void windowLostFocus(WindowEvent e) 
              Invoked when the Window is no longer the focused Window, which means that keyboard events will no longer be delivered to the Window or any of its subcomponents. 
     void windowOpened(WindowEvent e) 
              Invoked when a window has been opened. 
     void windowStateChanged(WindowEvent e) 
              Invoked when a window state is changed 
      

  5.   

    非常感谢大家,我现在在做一个网格计算的项目,要做网格FTP服务器和开关机监测以及共享目录的监测,现在已经做好了FTP服务器,下面我想将开关机检测集成进来,也用Java实现,所以就是要处理Windows系统关机的消息,请大家积极帮助!