Results 1 to 6 of 6
- 08-29-2012, 01:04 PM #1
Member
- Join Date
- Dec 2011
- Location
- India
- Posts
- 74
- Rep Power
- 0
How do I go on importing JSAPI classes into my code?
I am using ubuntu 12.04.
I am planning to work on Java speech recognition (Start-up Project). While I was trying to import classes like javax.speech.*, javax.speech.recognition.* the system gave me an error saying that the classes are not found.
I have tried freeTTS, but having a hard-time importing the classes. Does anybody have any ideas?
Thanks
- 08-29-2012, 01:50 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Re: How do I go on importing JSAPI classes into my code?
Have you got the jar file that contains those classes on your class path?
Please do not ask for code as refusal often offends.
- 08-29-2012, 02:33 PM #3
Member
- Join Date
- Dec 2011
- Location
- India
- Posts
- 74
- Rep Power
- 0
Re: How do I go on importing JSAPI classes into my code?
Please correct me if I am wrong, do i need to add the path of jar file to the path which contains reference to bin directory under environment variables.
i have added the jsapi.jar to the class path referring to jdk's bin dir.Last edited by ankiit; 08-29-2012 at 02:56 PM.
- 08-29-2012, 03:21 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Re: How do I go on importing JSAPI classes into my code?
No, you add it to the specific classpath used for compiling or executing (ie javac or java).
If you are using an IDE then you add it to the build path or equivalent, which is IDE dependent and will be in the docs for it.
It all depends how you are doing this.Please do not ask for code as refusal often offends.
- 08-29-2012, 07:25 PM #5
Member
- Join Date
- Dec 2011
- Location
- India
- Posts
- 74
- Rep Power
- 0
Re: How do I go on importing JSAPI classes into my code?
so does this mean that i copy that jar file and place it in a directory containing javac? Please excuse for my novice questions.
- 08-30-2012, 10:00 AM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Re: How do I go on importing JSAPI classes into my code?
Classpath.
You want to use the -classpath switch, not the CLASSPATH environment variable.
That's if you;re using the command line.
If you're using an IDE (not recommended if you're only just starting out) then you'll need to read up on how the classpath (or build path) works for that IDE.Please do not ask for code as refusal often offends.
Similar Threads
-
importing classes
By javajames in forum New To JavaReplies: 6Last Post: 05-24-2011, 09:21 AM -
Dynamically interpreting/importing code/classes
By ~ in forum Advanced JavaReplies: 1Last Post: 04-27-2011, 04:06 AM -
importing other classes or using a Jar
By xhane in forum New To JavaReplies: 3Last Post: 01-31-2009, 05:20 AM -
Need help with importing classes
By Deathmonger in forum New To JavaReplies: 3Last Post: 02-07-2008, 10:03 AM -
Importing classes
By Java Tip in forum Java TipReplies: 0Last Post: 11-06-2007, 02:27 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks