qbox Posted July 17, 2008 Share Posted July 17, 2008 Hi How to find java version on the visitor computer with php code? I googled but nothing found, or maybe I googled wrong... Thank you. Link to comment https://forums.phpfreaks.com/topic/115205-javaversion/ Share on other sites More sharing options...
Xurion Posted July 17, 2008 Share Posted July 17, 2008 // get instance of Java class java.lang.System in PHP $system = new Java('java.lang.System'); // demonstrate property access echo 'Java version=' . $system->getProperty('java.version'); Link to comment https://forums.phpfreaks.com/topic/115205-javaversion/#findComment-592350 Share on other sites More sharing options...
qbox Posted July 17, 2008 Author Share Posted July 17, 2008 Fatal error: Class 'Java' not found in /opt/lampp/htdocs/java/index.php on line 3 <?php // get instance of Java class java.lang.System in PHP $system = new Java('java.lang.System'); // demonstrate property access echo 'Java version=' . $system->getProperty('java.version'); ?> Link to comment https://forums.phpfreaks.com/topic/115205-javaversion/#findComment-592364 Share on other sites More sharing options...
kenrbnsn Posted July 17, 2008 Share Posted July 17, 2008 Read the manual. Ken Link to comment https://forums.phpfreaks.com/topic/115205-javaversion/#findComment-592365 Share on other sites More sharing options...
Xurion Posted July 17, 2008 Share Posted July 17, 2008 You need to install the java extension for it for PHP, sorry. Link to comment https://forums.phpfreaks.com/topic/115205-javaversion/#findComment-592367 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.