home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 67 / IOPROG_67A.ISO / soft / Tools / mwsppv4.exe / JAVAP.SCRIPT < prev    next >
Encoding:
Text File  |  2002-04-09  |  955 b   |  35 lines

  1. !!include "Library\jdkUtilities.script"
  2. !!Script
  3. // @Modified build 611 cm20020409 - added support for ReplaceEnvironmentVariables 
  4.  
  5. var gOptions = getMapFile("JDKToolsStandardOptions");
  6. var helpers = getMapFile("ApplicationHelpers");
  7. var gOutput = getOutput();
  8.  
  9. function DoCommand()
  10. {
  11.     var file = chooseFile("Choose class file to dump", "Class files (*.class)", "*.class");
  12.     if (file && file.exists)
  13.     {
  14.         var directory = helpers.lookup("jdk-bin_directory");
  15.  
  16.         var javahCommand = directory.path + "\\javap.exe";
  17.  
  18.         javahCommand += " -l -c " + GetClasspathArgument(file.path) + " " +  Java.getClassName(file.path);
  19.  
  20.         javahCommand = ReplaceEnvironmentVariables(javahCommand); //cm20020409    
  21.         if (gOptions.lookup("showCommandLine",false)==true)
  22.         {
  23.             gOutput.writeLine("Command line: " + javahCommand);
  24.         }
  25.         
  26.         var javah = newTool();
  27.         javah.run(javahCommand);
  28.         
  29.         gOutput.writeLine("Finished");
  30.     }
  31. }
  32.  
  33. !!/Script
  34.  
  35.