Try Heptagon !

Heptagon program (with "main" node):

Compilation...

'; flush(); ob_flush(); // Temporary directory creation $workdir = tempdir("heptagon-"); // Copy Heptagon program to working directory $heptfile = $workdir . "/main.ept"; $isfile = move_uploaded_file($_FILES['heptfile']['tmp_name'], $heptfile); if (! $isfile) { $hepthandle = fopen($heptfile,'a+'); fputs($hepthandle,"(*@ java\npackage main;\n@*)\n"); fputs($hepthandle,$_POST['heptprog']); fclose($hepthandle); }; // Go to working directory chdir($workdir); // Compile main file echo '
';
  $last_line = system(HEC
                      . ' -stdlib '
                      . HEPTLIB
                      . ' -target java -i main.ept 2> main.out',$res);
  echo '
'; flush(); if ($res == 0) { // Make interface Java class mkdir('main_interface'); echo ''; echo '
';
    // Java compilation
    system('javac '
           . '-classpath /home_nas/gdelaval/public_html/bzr/heptagon_applet.jar:.'
           . ' main_interface/MainInterface.java 2>&1');
    //system('ls -l *');
    echo '
'; // Make jar file $tempfile=tempnam('/home_nas/gdelaval/public_html/bzr/jar','main-'); system('jar cf ' . $tempfile . '.jar main/*.class main_interface/*.class 2>&1'); // $_SESSION['jarfile'] = $tempfile; // Generate applet HTML code ?>
width="800" height= alt="Simulation loading...">
'; passthru('cat main.out'); echo ''; echo '

Compilation failed !

'; } system("rm -fr " . $workdir. "/*"); // Get the compilation result // Working directory suppression rmdir($workdir); } ?>