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... Quote 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. Quote 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. Quote 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 Quote 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/ Quote 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. Quote 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. Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/172542-integrating-java-with-php/#findComment-909582 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.