예제 #1
0
파일: jver.php 프로젝트: OTiZ/osx
<html>
<?

  $system = new Java("java.lang.System");
  print "Java version=".$system->getProperty("java.version")." <br>\n";
  print "Java vendor=".$system->getProperty("java.vendor")." <p>\n\n";
  print "OS=".$system->getProperty("os.name")." ".
	      $system->getProperty("os.version")." on ".
	      $system->getProperty("os.arch")." <br>\n";

  $formatter = new Java("java.text.SimpleDateFormat",
			"EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");

  print $formatter->format(new Java("java.util.Date"))."\n";

?>
</html>
예제 #2
0
파일: test.php 프로젝트: jysdu2006/newclock
<?php

require "Java.inc";
$system = new Java("java.lang.System");
print "Java version=" . $system->getProperty("java.version") . " ";
require 'ganymed-ssh2-build210.jar';
//$javatest=new Java('test');
//$javatest->show();
예제 #3
0
파일: index.php 프로젝트: Sytsmaa/TempTest
<?php

echo "<p>We up here boys</p>";
$derp = new Java("java.lang.System");
$ver = $derp->getProperty("java.version");
echo "<p> version=\"" . $ver . "\"</p>";
$test = new Java("Test");
$msg1 = $test->getMsg();
$msg2 = $test->getMsg("2nd");
echo "<p> msg1=\"" . $msg1 . "\"</p>";
echo "<p> msg2=\"" . $msg2 . "\"</p>";
예제 #4
0
<?php

//phpinfo();
include "phpjasper/Java.inc";
$system = new Java('java.lang.System');
// accéder aux propriétés
echo 'Java version=' . $system->getProperty('java.version') . ' <br />';
echo 'Java vendor=' . $system->getProperty('java.vendor') . '<br />';
echo 'OS=' . $system->getProperty('os.name') . ' ' . $system->getProperty('os.version') . ' on ' . $system->getProperty('os.arch') . '<br />';
$formater = new Java('java.text.SimpleDateFormat', "EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");
echo $formater->format(new Java('java.util.Date'));
?>
                    
예제 #5
0
 /**
  * Attempts to use bridge and configure java settings
  *
  * @author KnowledgeTree Team
  * @param none
  * @access private
  * @return boolean
  */
 private function useBridge()
 {
     $zendBridge = $this->zendBridge();
     // Find Zend Bridge
     if ($zendBridge) {
         // Bridge installed implies java exists
         $this->zendBridgeInstalled();
         if ($this->checkZendBridge()) {
             // Make sure the Zend Bridge is functional
             $this->javaExtCheck = 'tick';
             // Set bridge to functional
             $this->javaInstalled();
             // Set java to installed
             $javaSystem = new Java('java.lang.System');
             $version = $javaSystem->getProperty('java.version');
             $ver = substr($version, 0, 3);
             if ($ver < $this->javaVersion) {
                 $this->javaVersionInCorrect();
                 $this->error[] = "Requires Java 1.5+ to be installed";
                 return false;
             } else {
                 $this->javaVersionCorrect();
                 // Set version to correct
                 $this->javaCheck = 'tick';
                 return true;
             }
         } else {
             $this->javaCheck = 'cross_orange';
             $this->javaVersionWarning();
             $this->zendBridgeWarning();
             $this->warnings[] = "Zend Java Bridge Not Functional";
             $this->javaExtCheck = 'cross_orange';
             return false;
         }
     } else {
         $this->warnings[] = "Zend Java Bridge Not Found";
         return false;
     }
 }