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?
> 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.