ivr IVR Tutorial Table of Content << Previous  >> Next

8.4 Compile and Run the Java Class

Java class must be compiled first before it can be invoked from IVR applications. You should also be able to run the Java class independently from an IVR application.

Compile the Java Class

Make sure you have JDK installed on your computer. Here is the compilation command. You can put it in a batch file.

rm -rf ivrsample.jar

set JDKHOME="... replace with your installed JDK home dir..."

%JDKHOME%\\bin\\java -version

%JDKHOME%\\bin\\javac -d . IvrSampleGetFiles.java

%JDKHOME%\\bin\\jar -cvf ivrsample.jar IvrSampleGetFiles.java voicent

After compilation, you should have created a jar file called ivrsample.jar.

Run the Java Class

You can test the class using the following command:

java voicent.ivrsample.IvrSampleGetFiles

If the folder contains mylist A.voc and mylist B.voc, then the print out is:

#test
#Thu Dec 20 20:58:59 PST 2007
total=2
promptmsg=Please press 0 for mylist A; press 1 for mylist B;
list="C:\Call List\mylist A.voc" "C:\Call List\mylist B.voc"

 

 
ivr IVR Studio Table of Content << Previous >> Next