File: TestPath.java

package info (click to toggle)
jtreg6 6.2%2B1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,864 kB
  • sloc: java: 29,826; sh: 1,367; xml: 674; makefile: 269
file content (21 lines) | stat: -rw-r--r-- 656 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import org.testng.annotations.*;

@Test
public class TestPath {
    public void run() throws Exception {
        String bcp = System.getProperty("sun.boot.class.path");
        String jcp = System.getProperty("java.class.path");
        System.out.println("boot class path: " + bcp);
        System.out.println("user class path: " + jcp);

        String path = bcp;

        if (path.matches(".*BootClassPathTest.work.classes.*")
                && path.matches(".*tools.jar.*")) {
            System.out.println("classes found on expected path");
        } else {
            throw new Exception("classes not found on expected path");
        }
    }
}