473,320 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Passing java output to variable in PHP code.

2
Hi,

I am trying to pass the output of java executable to a variable. After executing the java using system command in PHP, it produces two ouput files. I just need one of them with the extension *.arff to process further. How can I capture the output in a variable???


Expand|Select|Wrap|Line Numbers
  1. $name = "user.sdf";
  2. $fh = fopen("$name", "r+");
  3. if($fh==false)
  4.     die("unable to create file");
  5.  
  6. if (file_exists("$name")) {
  7.   echo "$name";
  8. system("/usr/java/jdk1.6.0_16/bin/java -jar -Xmx512M ODDescriptors.jar -f $name -l KI");
Jun 24 '10 #1
1 2712
Markus
6,050 Expert 4TB
See the exec function, and, more specifically, its $output parameter.
Jun 27 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Patrice | last post by:
Hi, I'm trying to use a javascript function passing a vb variable. I don't understand why it doesn't work. Can someone help me? Thanks in advance. Here is my javascript function used to...
0
by: sarith sutha | last post by:
Hi Need a help on the above topic, how to pass a java object as parameter to the java stored procedure .Code snippets will be greatly appreciated , i came across udf/udts etc but still not able...
2
by: JC | last post by:
Can someone post a working stored procedure with output variable that works on northwind db or explain to me what I am missing. I've tried ever tying but it always returns @outvariable parameter...
6
by: | last post by:
I have MyEnumeratedSet { ... some values go here ... } I have a variable that is defined as MyEnumeratedSet MyVariable; I have a function that needs to be able to set a variable by Ref...
0
by: mfilpot | last post by:
I am working on a prime number generator for sschool, but I jsut can't seem to figure out how to write the contents of the variable MeSSage into a new text file, Can someone help me? the script...
9
sanjay123456
by: sanjay123456 | last post by:
dear friends I want to convert a java script variable in to php varible some code i write its not work <form name="myform" method="post" action="abc.php"> <input type="button"...
1
by: thumbiko | last post by:
I read some discussion on this topic however I am faced with the same problem of passing a php variable into a perl script. I want to pass a string from a php script to a perl script which is called...
1
by: ravindravarman | last post by:
I need to assing some value from the java script variable in the .aspx page to a server side variable in the .aspx.cs page. Can any one help me with this? Thanks, Ravi
1
by: inf | last post by:
How can i use java script variable in java scriptlet
1
by: blknmld69 | last post by:
I keep getting the error: Circle.java:18: variable radius might not have been initialized import java.util.Scanner; import java.io.*; public class Circle { public static...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.