sheikhmdirfan Posted August 31, 2009 Share Posted August 31, 2009 Hello Everyone Greetings!!! I am using a Windows PC having XAMPP installed on it. I want to run java code and classes through php. How can i do it and do i need to change any settings.. Please show an example if possible... Thanks in advance... Link to comment https://forums.phpfreaks.com/topic/172542-integrating-java-with-php/ Share on other sites More sharing options...
oni-kun Posted August 31, 2009 Share Posted August 31, 2009 Code? This is impossible. You can use the exec function to run a command such as 'java -f this.jar' to run the program itself, and display the console output to PHP, but you cannot run JAVA code. Link to comment https://forums.phpfreaks.com/topic/172542-integrating-java-with-php/#findComment-909547 Share on other sites More sharing options...
trq Posted August 31, 2009 Share Posted August 31, 2009 Code? This is impossible. You can use the exec function to run a command such as 'java -f this.jar' to run the program itself, and display the console output to PHP, but you cannot run JAVA code. Um, indeed you can. Take a look at the java extension. Link to comment https://forums.phpfreaks.com/topic/172542-integrating-java-with-php/#findComment-909553 Share on other sites More sharing options...
RichardRotterdam Posted August 31, 2009 Share Posted August 31, 2009 You might also want to look at the tomcat plugin so you can run jsp pages. Look under "XAMPP for Windows Add-Ons part" http://www.apachefriends.org/en/xampp-windows.html Link to comment https://forums.phpfreaks.com/topic/172542-integrating-java-with-php/#findComment-909563 Share on other sites More sharing options...
newbtophp Posted August 31, 2009 Share Posted August 31, 2009 Maybe this may help? http://www.winehq.org/ Link to comment https://forums.phpfreaks.com/topic/172542-integrating-java-with-php/#findComment-909568 Share on other sites More sharing options...
trq Posted August 31, 2009 Share Posted August 31, 2009 Maybe this may help? http://www.winehq.org/ What does wine have to do with running Java via PHP? Both Java and PHP can be run on both Linux and Windows. I don't see how tomcat is related either, its simply an Apache module. Link to comment https://forums.phpfreaks.com/topic/172542-integrating-java-with-php/#findComment-909574 Share on other sites More sharing options...
RichardRotterdam Posted August 31, 2009 Share Posted August 31, 2009 I don't see how tomcat is related either, its simply an Apache module. Hmm you're right I made an assumption (which I shouldn't) that he might not need to run java through PHP but run it directly using JSP. Link to comment https://forums.phpfreaks.com/topic/172542-integrating-java-with-php/#findComment-909581 Share on other sites More sharing options...
Mark Baker Posted August 31, 2009 Share Posted August 31, 2009 In addition to some of the other methods listed, there's also PHP Java Bridge Link to comment https://forums.phpfreaks.com/topic/172542-integrating-java-with-php/#findComment-909582 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.