[Jsmooth-cvs] jsmooth/sample/src JSmoothPropertiesDisplayer.java, 1.10, 1.11
Status: Beta
Brought to you by:
reyes
From: Rodrigo R. <re...@us...> - 2007-05-18 21:35:34
|
Update of /cvsroot/jsmooth/jsmooth/sample/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6644/sample/src Modified Files: JSmoothPropertiesDisplayer.java Log Message: adds the JNI Jsmooth documentation Index: JSmoothPropertiesDisplayer.java =================================================================== RCS file: /cvsroot/jsmooth/jsmooth/sample/src/JSmoothPropertiesDisplayer.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** JSmoothPropertiesDisplayer.java 13 May 2007 20:07:43 -0000 1.10 --- JSmoothPropertiesDisplayer.java 18 May 2007 21:35:29 -0000 1.11 *************** *** 7,11 **** import java.util.*; - /** * --- 7,10 ---- *************** *** 14,17 **** --- 13,17 ---- public class JSmoothPropertiesDisplayer extends java.awt.Frame { + private String[] m_args; /** Creates new form Frame */ *************** *** 72,75 **** --- 72,112 ---- add(m_buttonClose, gridBagConstraints); + java.awt.Button reboot = new java.awt.Button("JNI Tests"); + add(reboot, gridBagConstraints); + reboot.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + try { + java.io.File f = new java.io.File("Z:/test"); + System.out.println(f.getAbsoluteFile().toString()); + System.out.println(f.getAbsoluteFile().getCanonicalPath().toString()); + System.out.println("JNI Availability : " + jsmooth.Native.isAvailable()); + + if (jsmooth.Native.isAvailable()) + { + + jsmooth.DriveInfo di = jsmooth.Native.getDriveInfo(f); + System.out.println("DriveInfo: " + di + " = " + di.toString()); + + System.out.println("path: " + jsmooth.Native.getExecutablePath()); + System.out.println("filename: " + jsmooth.Native.getExecutableName()); + jsmooth.Native.shellExecute(jsmooth.Native.SHELLEXECUTE_OPEN, + "service.log", null, null, + jsmooth.Native.SW_SHOWNORMAL); + jsmooth.Native.shellExecute(jsmooth.Native.SHELLEXECUTE_FIND, + "c:\\TEMP", null, null, + jsmooth.Native.SW_SHOWNORMAL); + jsmooth.Native.shellExecute(jsmooth.Native.SHELLEXECUTE_EXPLORE, + "z:\\", null, null, + jsmooth.Native.SW_SHOWNORMAL); + + // System.out.println("RES: " + jsmooth.Native.exitWindows(jsmooth.Native.EXITWINDOWS_REBOOT | jsmooth.Native.EXITWINDOWS_FORCE )); + } + } catch (Exception e) + { + e.printStackTrace(); + } + } + }); + pack(); }//GEN-END:initComponents |