Results 1 to 2 of 2
  1. #1
    i'mhighdef is offline Member
    Join Date
    Feb 2011
    Posts
    3
    Rep Power
    0

    Default 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 :{

  2. #2
    cultclassic is offline Member
    Join Date
    Mar 2011
    Posts
    64
    Rep Power
    0

Similar Threads

  1. Read HTML fields From Java Applet
    By myjav in forum Java Applets
    Replies: 0
    Last Post: 10-21-2010, 07:28 PM
  2. entities are passed by value or passed by reference
    By syntrax in forum New To Java
    Replies: 1
    Last Post: 12-17-2009, 08:13 AM
  3. java certification passed
    By natasha in forum Java Certification
    Replies: 0
    Last Post: 12-05-2009, 09:24 AM
  4. Signed Java Applet to read a file on hard drive?
    By ollyworks in forum Java Applets
    Replies: 2
    Last Post: 09-11-2009, 11:08 PM
  5. Your variable is never read
    By singularity in forum New To Java
    Replies: 4
    Last Post: 09-10-2009, 01:13 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •