--cp option, / instead of File.separatorChar

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@122 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 68ab015b0d
commit c1b184b5cd
  1. 8
      jode/jode/decompiler/ImportHandler.java

@ -30,9 +30,9 @@ public class JodeEnvironment {
SearchPath classPath; SearchPath classPath;
JodeEnvironment() { JodeEnvironment(String path) {
Type.setEnvironment(this); Type.setEnvironment(this);
classPath = new SearchPath(System.getProperty("java.class.path")); classPath = new SearchPath(path);
imports = new Hashtable(); imports = new Hashtable();
/* java.lang is always imported */ /* java.lang is always imported */
imports.put("java.lang.*", new Integer(Integer.MAX_VALUE)); imports.put("java.lang.*", new Integer(Integer.MAX_VALUE));
@ -40,9 +40,7 @@ public class JodeEnvironment {
public java.io.InputStream getClassStream(Class clazz) public java.io.InputStream getClassStream(Class clazz)
throws java.io.IOException { throws java.io.IOException {
return classPath.getFile(clazz.getName(). return classPath.getFile(clazz.getName().replace('.', '/') + ".class");
replace('.', java.io.File.separatorChar)
+".class");
} }
/** /**

Loading…
Cancel
Save