Problem installing a new API

HiI have to use a 3rd party API in my java program.Actually, it is just a folder consisting of about 12 JAVA files. There is no .jar fileWhat should I write in the classpath variable? Thanks
[225 byte] By [java.newBa] at [2007-11-27 10:07:25]
# 1
If you don't have the .class files, then you need to compile that source code before you can use it. After that, place the directory that has the class files on the classpath.
hunter9000a at 2007-7-13 0:43:43 > top of Java-index,Java Essentials,New To Java...
# 2

Thanks for the reply.

I compiled all the java files.. All the java files are located in com/ib/client folder and after compiling, it contains all the class files as well.

I set this as my classpath--

"C:\Program Files\Java\jdk1.6.0_01\bin\com\ib\client"

I also tried

"C:\Program Files\Java\jdk1.6.0_01\bin\com"

Now, in my program when i write

import com.ib.client.*

it does not recognize the pkg. I am using NetBeans IDE

Am I writing the import statement wrong or my classpath variable has not been set properly?

java.newBa at 2007-7-13 0:43:43 > top of Java-index,Java Essentials,New To Java...
# 3

> Thanks for the reply.

>

> I compiled all the java files.. All the java files

> are located in com/ib/client folder and after

> compiling, it contains all the class files as well.

>

> I set this as my classpath--

> "C:\Program

> Files\Java\jdk1.6.0_01\bin\com\ib\client"

>

> I also tried

> "C:\Program Files\Java\jdk1.6.0_01\bin\com"

>

> Now, in my program when i write

> import com.ib.client.*

it does not

> recognize the pkg. I am using NetBeans IDE

> Am I writing the import statement wrong or my

> classpath variable has not been set properly?

Netbeans doesn't use your system's classpath, it uses it's own settings on a per project basis. The easiest way is probably to compile that library to a jar, and add that you your project. Create a project for the library, and compile it. Netbeans will create a jar under the dist directory. That's your library. After you have the jar, then go under the Tools menu, and click Library Manager. Click New Library. Add the jar to the library, then go to your project's properties. Under Libraries, then Compile, add the library.

ps. This is part of the reason I suggest people new to java don't use an IDE and stick with command line tools. The ability to understand how to link other libraries into your code is very useful, and stacking the IDE's learning curve on top of java's just makes things harder.

hunter9000a at 2007-7-13 0:43:43 > top of Java-index,Java Essentials,New To Java...
# 4
Thank you so much! NetBeans recognized the pkg. Actually I had to design a rather complex GUI in Swing so had to use NetBeansThanx once Again!!
java.newBa at 2007-7-13 0:43:43 > top of Java-index,Java Essentials,New To Java...