Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Cannot compile JTAPI examples!

Hello all,

Just getting started with JTAPI after doing AXL/XML for awhile. In a previous post I was pointed to installed the JTAPI pluging from my CCM which I did. I can get the jtrace example working as its installed. However, once I open it in Visual Studio 2005 and convert it. It says:

"cannot find type com.cisco.cti.util.Condition". I have verified my classpath enviornment variables as:

system -> ".;C:\WINNT\java\lib\jtapi.jar;"

user -> "C:\WINNT\java\lib\jtapi.jar"

I installed the JTAPI plugin after I installed JDK 1.3.1 and Visual Studio 2005. Any help would be appreciated.

4 REPLIES

Re: Cannot compile JTAPI examples!

Uh... J# != Java

Try a real java IDE, e.g. Netbeans (it's free). Then create a new project called JTrace, create a new package called jtrace, then in the project properties, add your jtapi.jar, then it should compile.

However, to run all you need (JDK 1.3.1? ewwwwwwwwwwwww.. use something up-to-date) is to jump to the proper directory (for a default install it's

C:\Program Files\JTAPITools\jtrace

then type

java jtrace.JTrace ip-callmanager jtapi-user jtapi-password extension1 extension2 extension3...

where ip-callmanager is the ip or fqdn of your call manager, jtapi-user is a user on your ccm that has a device association with all the phone lines you want to monitor, jtapi-password is the password of that user and extensionX are your extension numbers.

Also make sure that if you type

echo %ClassPath% (in the same commandprompt you're trying to launch the app from), that c:\winnt\java\lib\jtapi.jar is actually listed.

On top of that, make absolutely sure that you're not trying to launch the app from the C:\Program Files\JTAPITools\jtrace\jtrace folder.

And what exactly was the error message you got when trying to run the application?

New Member

Re: Cannot compile JTAPI examples!

LOL - sorry didn't mean to offend your java bone. Unfortunantly I work for a MSFT solution shop and must do things Gates way. I actually cut my teeth on Borlands C++ compiliers and liked them much better but I gotta keep the lights on.

Anyhoo, appreciate the info. I actually got it to compile under J# by converting the jtapi.tar file to a .dll and jtrace worked fine. It was midnight when I found out that java archive files are not supported in .net. Man ya gotta love Gatesian logic.

I used JDK 1.3.1 despite its EOL status because that's what the readme for the JTAPI examples said was required. Should I go to 1.4 or 1.5?

Great info from you as always. I will check out Netbeans in my spare time and see if I can incorporate it into my development cycles.

Re: Cannot compile JTAPI examples!

IIRC, JDK 1.3 support is now being phased out for the Cisco JTAPI (in CCM 5.x).. I've developed with 1.4 and 1.5, both work just fine.. but if you're into .NET 2.0, you'll prefer Java 1.5 (it introduces generics, finally has a foreach, and some other stuff that lines it up pretty well with .NET 2.0).

And I don't think you offended any bone.. I actually use both Java and C#, depending on the scenario (thank god the syntax is so close ). However, while J# uses the Java syntax, it still uses the .NET class library, which is something completely different from the Java class library. While thanks to the similarities, you can port a considerable amount of code automatically, there will always be scenarios where this isn't possible because the APIs just don't line up (that goes the other way around as well of course.. e.g. using unsafe code in .NET). I'm actually quite surprised you got JTAPI to work under J# - I suspect you're going to have a hell of a time trying to get support for Cisco if anything breaks - it can sometimes be very cryptic even if you do it the Java way - and the online JTAPI community is small.. the online J# JTAPI community must be pretty much inexistent.

New Member

Re: Cannot compile JTAPI examples!

I think I will download 1.5 and see how it goes. I can tell you once nice about .net 2.0 that is new is the ease by which one can create multi-threaded apps. Instead of going through all the drama of the 1.1 c++ code that was previously required, now a simple drag and drop component. I think, for giggles, I am going to attempt to write an app that can monitor every event on about 1000 phones using some type of multi-threaded architecture. I think, just to prove I am a bit of a sadist, that I will do it initially in J#.

You are right about the online communities being small for both of the groups. Its a good thing I am good a googling my butt off trying to find solutions. Thats how I got the answer for the .jar file problem.

Thanks for the great info bud!

Mark

782
Views
5
Helpful
4
Replies