JByteMod-Beta icon indicating copy to clipboard operation
JByteMod-Beta copied to clipboard

Krakatau: Cannot run program "py", Add libraries to Krakatau

Open Hdadaw opened this issue 7 years ago • 19 comments

So, this is what I see when I try to decompile any class with Krakatau:

[05:02:41] [INFO] Successfully created Krakatau temp folder
java.io.IOException: Cannot run program "py": CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessBuilder.start(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at java.lang.Runtime.exec(Unknown Source)
        at me.grax.jbytemod.decompiler.KrakatauDecompiler.decompile(KrakatauDecompiler.java:45)
        at me.grax.jbytemod.decompiler.Decompiler.decompile(Decompiler.java:53)
        at me.grax.jbytemod.decompiler.Decompiler.run(Decompiler.java:41)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        at java.lang.ProcessImpl.create(Native Method)
        at java.lang.ProcessImpl.<init>(Unknown Source)
        at java.lang.ProcessImpl.start(Unknown Source)
        ... 7 more

Hdadaw avatar May 06 '18 21:05 Hdadaw

What OS are you on?

GraxCode avatar May 06 '18 21:05 GraxCode

Windows 10

Hdadaw avatar May 06 '18 21:05 Hdadaw

do you have python installed?

GraxCode avatar May 06 '18 21:05 GraxCode

I do not have the "python" installed, but I tried to install it, but I also get this error

Hdadaw avatar May 06 '18 21:05 Hdadaw

I'm going to create an option to set the path of the python executable

GraxCode avatar May 06 '18 21:05 GraxCode

Oh, I installed another version of "python" and now I get this error, but in the "Temp" folder, the files are still there.

java.io.FileNotFoundException: C:\Users\User\AppData\Local\Temp\1015029260.zip (The system cannot find the file specified)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(Unknown Source)
	at java.io.FileInputStream.<init>(Unknown Source)
	at me.grax.jbytemod.decompiler.KrakatauDecompiler.decompile(KrakatauDecompiler.java:54)
	at me.grax.jbytemod.decompiler.Decompiler.decompile(Decompiler.java:53)
	at me.grax.jbytemod.decompiler.Decompiler.run(Decompiler.java:41)

image

Hdadaw avatar May 06 '18 21:05 Hdadaw

Could you try building the latest version and try to decompile again?

GraxCode avatar May 06 '18 21:05 GraxCode

I don't know how to build it

Hdadaw avatar May 06 '18 21:05 Hdadaw

I will compile a jar and post it here tomorrow.

GraxCode avatar May 06 '18 21:05 GraxCode

So, i am builded latest jbytemod and nothing changes, still an error with "Temp/*.zip" files, and why in "Temp" folder i see the jar files?

Hdadaw avatar May 06 '18 21:05 Hdadaw

Is there more information in the console log?

GraxCode avatar May 06 '18 22:05 GraxCode

I changed zip to jar in KrakatauDecompiler.java image and now no one error in console and i see this scary "code": image

Hdadaw avatar May 06 '18 22:05 Hdadaw

.zip should be alright, could you please open a console window and type "python -V"?

GraxCode avatar May 06 '18 22:05 GraxCode

Python 3.6.5

Hdadaw avatar May 06 '18 22:05 Hdadaw

Could you try setting the python path and decompiling in the latest build?

GraxCode avatar May 08 '18 18:05 GraxCode

Still this error image

Hdadaw avatar May 08 '18 21:05 Hdadaw

Anything in the console?

GraxCode avatar May 09 '18 04:05 GraxCode

image

Hdadaw avatar May 09 '18 14:05 Hdadaw

I added space after pythonPath to command string: image and now it works image And I think you need to make some menu for adding additional libraries for this decompiler

Hdadaw avatar May 09 '18 17:05 Hdadaw