Test2.java:10: cannot access http.ChunkedInputStream bad class file: ./http/CInputStream.class class file contains wrong class: CInputStream Please remove or make sure it appears in the correct subdirectory of the classpath. CInputStream ch = new CInputStream(con.getInputStream()); ^ 1 error