Results 1 to 2 of 2
- 02-15-2011, 03:40 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 3
- Rep Power
- 0
Java Applet to Read passed variable from php pages
I am making a java applet that will literally read (text-to-speech) the word passed by a Php page..
this is trial code in php (i made a simple one first to make it easier to look for the error)
<? $readme="hello hello hello"; ?>
<applet code="HelloWorld.class">
<param name="readme" value="<?php echo $readme; ?>" />
</applet>
then this is the code form my java program..
public class HelloWorld extends Applet {
public static void main(String args[]) throws NullPointerException
{
try
{
Synthesizer synth;
synth = Central.createSynthesizer( new SynthesizerModeDesc(Locale.ENGLISH));
synth.allocate () ;
synth.resume () ;
String readme = this.getParameter("readme");
synth.speakPlainText ( readme, null ) ;
synth.waitEngineState ( Synthesizer.QUEUE_EMPTY ) ;
synth.deallocate();
}
catch(Exception r)
{
r.printStackTrace();
}
}
}
i tried running it on localhost and it does not produce an audio that is supposed to be the word passed from the php page.. PLS HELP :{
- 03-04-2011, 02:12 AM #2
Member
- Join Date
- Mar 2011
- Posts
- 64
- Rep Power
- 0
Similar Threads
-
Read HTML fields From Java Applet
By myjav in forum Java AppletsReplies: 0Last Post: 10-21-2010, 06:28 PM -
entities are passed by value or passed by reference
By syntrax in forum New To JavaReplies: 1Last Post: 12-17-2009, 07:13 AM -
java certification passed
By natasha in forum Java CertificationReplies: 0Last Post: 12-05-2009, 08:24 AM -
Signed Java Applet to read a file on hard drive?
By ollyworks in forum Java AppletsReplies: 2Last Post: 09-11-2009, 10:08 PM -
Your variable is never read
By singularity in forum New To JavaReplies: 4Last Post: 09-10-2009, 12:13 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks