opendir(DIR, ".") || die "Can't open current dir";

@entries = readdir(DIR);

closedir(DIR);

@sorted = sort(@entries);

foreach $entry (@sorted) {
  if ($entry =~ /java$/) {
    system("echo env CLASSPATH=/project/pss_zgs/hpjdk/src javac $entry");
    system("env CLASSPATH=/project/pss_zgs/hpjdk/src javac $entry");
  };
};
