You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ClassPathTests.java 659B

12345678910111213141516171819202122
  1. package org.aspectj.apache.bcel.util;
  2. import java.io.IOException;
  3. import org.aspectj.apache.bcel.classfile.tests.BcelTestCase;
  4. import org.aspectj.apache.bcel.util.ClassPath.ClassFile;
  5. public class ClassPathTests extends BcelTestCase {
  6. public void testJava9ImageFile() throws IOException {
  7. String sunbootClasspath = System.getProperty("sun.boot.class.path");
  8. if (sunbootClasspath==null || !sunbootClasspath.contains(".jimage")) {
  9. // Not java9
  10. return;
  11. }
  12. ClassPath cp = new ClassPath(sunbootClasspath);
  13. ClassFile cf = cp.getClassFile("java/lang/Object");
  14. assertNotNull(cf);
  15. assertTrue(cf.getSize()>0);
  16. assertTrue(cf.getTime()>0);
  17. }
  18. }