1.1, fixes hardcoded \\

1.1, fixes hardcoded \\
This commit is contained in:
Kalen Kinloch 2014-10-19 18:34:57 -07:00
parent 34de4efdb1
commit f5ad6e449d

AI 샘플 코드 생성 중입니다

Loading...
3 changed files with 4 additions and 5 deletions

BIN
BytecodeViewer Beta 1.1.jar Normal file

Binary file not shown.

View File

@ -129,7 +129,7 @@ public class BytecodeViewer {
private static ArrayList<String> recentFiles = DiskReader.loadArrayList(filesName, false);
private static ArrayList<String> recentPlugins = DiskReader.loadArrayList(pluginsName, false);
private static int maxRecentFiles = 25;
public static String tempDirectory = "bcv_temp\\";
public static String tempDirectory = "bcv_temp";
public static void main(String[] args) {
cleanup();
@ -181,7 +181,6 @@ public class BytecodeViewer {
}
else if (fn.endsWith(".class")) {
try {
final ClassNode cn = JarUtils.getNode(JarUtils.getBytes(new FileInputStream(f)));
BytecodeViewer.loadedClasses.put(cn.name, cn);

View File

@ -30,19 +30,19 @@ public class FernFlowerDecompiler {
JarUtils.saveAsJar(BytecodeViewer.getLoadedClasses(), tempZip.getAbsolutePath());
de.fernflower.main.decompiler.ConsoleDecompiler.main(new String[] {tempZip.getAbsolutePath(), BytecodeViewer.tempDirectory + "./temp/"});
File tempZip2 = new File(BytecodeViewer.tempDirectory + "./temp/"+tempZip.getName());
File tempZip2 = new File(BytecodeViewer.tempDirectory + System.getProperty("file.separator") + "temp" + System.getProperty("file.separator") +tempZip.getName());
if(tempZip2.exists())
tempZip2.renameTo(new File(zipName));
tempZip.delete();
new File(BytecodeViewer.tempDirectory + "./temp/").delete();
new File(BytecodeViewer.tempDirectory + System.getProperty("file.separator") + "temp").delete();
}
public String decompileClassNode(final ClassNode cn) {
final ClassWriter cw = new ClassWriter(0);
cn.accept(cw);
String fileStart = BytecodeViewer.tempDirectory + "temp";
String fileStart = BytecodeViewer.tempDirectory + System.getProperty("file.separator") + "temp";
int fileNumber = getClassNumber(fileStart, ".class");
final File tempClass = new File(fileStart+fileNumber+".class");