I have a problem calling execlp (java) after chroot.

java program is installed at /usr/lib/jvm/default-java/jre/bin/java.

And I cant execute java program after chroot(".") because I cant reach actual root and 

directory where java is installed.

here's my simple code.

```
    int pid = fork();

    if(pid == 0)
    {
        chroot(".");

        execlp("java","java","test",  NULL);  // cant run "test" java program
    }
    else{
           wait4(..............);
    }

```

if I remove chroot, it runs well.

the problem is that "java" is in /usr/lib/....... , 

and if I use chroot, I can't reach actual root and java.

isn't there solution using chroot and java together??