[英]jar edit and re-compile in simple way
I have a jar file called ScreenCapture.jar 我有一个名为ScreenCapture.jar的jar文件
I use http://jd.benow.ca/ what is in there. 我用http://jd.benow.ca/那里有什么。 I have even downloaded jd-gui
我甚至下载了jd-gui
This is what it shows me 这就是它给我看的内容
I can see the ScreenCapture.class file. 我可以看到ScreenCapture.class文件。 I want to edit 2 lines here
我想在这里编辑2行
Thread.sleep(15000L);
to
Thread.sleep(60000L);
and 和
driver.manage().window().setSize(new Dimension(1024, 768));
to
driver.manage().window().setSize(new Dimension(1200, 800));
But this file is not editable. 但是这个文件不可编辑。
My question is, how to edit it? 我的问题是,如何编辑它? like how to decompile it so I can edit it and then recompile it.
比如如何反编译它,以便我可以编辑它然后重新编译它。 So I can just re-upload my jar file and everything gets back to normal?
所以我可以重新上传我的jar文件,一切恢复正常?
Btw, I know nothing about java, and I don't have any special application/software installed on my machine 顺便说一下,我对java一无所知,我的机器上没有安装任何特殊的应用程序/软件
follow these steps: 跟着这些步骤:
Save the source files by clicking save menu item under file. 单击文件下的保存菜单项保存源文件。 It will generate src.ip file.Then you can do whatever you want.
它将生成src.ip文件。然后你可以做任何你想做的事情。
On your first question JD-GUI is just a viewer you need to use dex2jar to retrieve the JAR file; 在您的第一个问题上,JD-GUI只是一个查看器,您需要使用dex2jar来检索JAR文件; decompile and save the classes you need to change;
反编译并保存您需要更改的类; import JAR and JAVA files in your Android Studio;
在Android Studio中导入JAR和JAVA文件; modify;
修改; recompile and repackaged.
重新编译并重新打包。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.