Associating class files with Jad

Discussion in 'Java' started by Fahd Shariff, Jul 12, 2005.

  1. Fahd Shariff

    Fahd Shariff Guest

    Hi all,

    I am trying to associate java class files with Jad (in Windows) so that
    when I click on a class file it is decompiled on-the-fly and displayed
    in wordpad.

    I have written a bat file which is executed when a class file is
    clicked. It looks like this:

    Code:
    jad -p "%*" > "%*.jad"
    start "C:\program files\Windows NT\Accessories\wordpad.exe" "%*.jad"
    sleep 5
    del "%*.jad"
    
    This works fine, but I don't like the fact that a jad file is being
    created. Is there some way to pipe the output of jad directly into
    wordpad (without the intermediary file)?

    I am not very familiar with wscript but I also put the following vbs
    together which works partially:

    Code:
    Option Explicit
    Dim objShell, objExecObject, strLine, objArgs
    Set objShell = CreateObject("WScript.Shell")
    Set objArgs = WScript.Arguments
    Set objExecObject = objShell.Exec("jad -p " & objArgs(0))
    objShell.Run "notepad"
    strLine=""
    
    Do Until objExecObject.StdOut.AtEndOfStream
    strLine = objExecObject.StdOut.ReadLine()
    objShell.sendKeys strLine
    objShell.sendKeys "{ENTER}"
    Loop
    
    WScript.Quit
    
    Any help on this front would be greatly appreciated.

    Thanks,
    --
    Fahd Shariff
    http://www.fahdshariff.cjb.net
    "Let the code do the talking... "
     
    Fahd Shariff, Jul 12, 2005
    #1
    1. Advertising

  2. Fahd Shariff

    Tom N Guest

    Fahd Shariff wrote:

    > I am trying to associate java class files with Jad (in Windows) so that
    > when I click on a class file it is decompiled on-the-fly and displayed
    > in wordpad.


    Use DJ Java Decompiler.
    It uses jad and has a GUI to display the code so you don't need to stuff around with Wordpad etc.
     
    Tom N, Jul 13, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Timo Kinnunen
    Replies:
    3
    Views:
    883
    Tim Tyler
    Aug 3, 2003
  2. Darryl L. Pierce
    Replies:
    13
    Views:
    6,148
    Darryl L. Pierce
    Aug 7, 2003
  3. matt
    Replies:
    0
    Views:
    530
  4. John Goche

    J2ME: manifest.mf vs. JAD files

    John Goche, Dec 12, 2005, in forum: Java
    Replies:
    1
    Views:
    2,911
  5. Blake Essing
    Replies:
    0
    Views:
    706
    Blake Essing
    Nov 15, 2006
Loading...

Share This Page