Associating class files with Jad

F

Fahd Shariff

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,
 
T

Tom N

Fahd said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top