cancel
Showing results for 
Search instead for 
Did you mean: 

Java Connector Error

Former Member
0 Kudos

Hello!

I am new with the Java Connector, and I am sure this problem is something easy to solve; I just can not figure it out.

I am on XP Pro, and I have the files extracted to the directory C:\JCo. I have the PATH and CLASSPATH environment variables updated, but I am guessing that I might have the incorrect values there.

Here is the problem. I can compile Example1 (or any of the other examples) from the demo directory fine, but when I try to run it I get the error message "Exception in thread "main" java.lang.NoClassDefFoundError: Example1," which does not make sense since it was compiled correctly.

My guess is that the CLASSPATH (or PATH) variable is not set correctly. Can anyone send me what they have for that value, or what I should be using? I checked the Intro.html file and I think I am just not putting it in correctly or not understanding the intent.

I am always fast with returning points for helpful answers!

Thanks!

John

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello John,

as the demos compile without any errors your classpath settings for the JCO libs should be ok. How did you try to run the examples? If you're using the commandline you have to add the parameter -cp <path_to_your_demos> or add the demopath also to your global classpath definition.

Hope this helps.

Cheers Lars

PS: Don't forget the points if my answer helped you

Former Member
0 Kudos

Thanks Lars!!

Adding the demopath to the global classpath definition solved the problem!

Cheers,

John

Answers (1)

Answers (1)

former_member188685
Active Contributor
0 Kudos

Hi,

John Path variable does not work ..

But you need to do it manually.

you Just need to Build the Class Path

I will tell you the steps.

In Eclipse select the <b>project</b> and go to <b>file</b> and click on <b>Properties</b> and click on <b>JAVA Buid path</b> then click on

<b>Add External Jars</b> in that you specify the file path of JCO.JAR.

this will create the class path for that Project.

Hope this will Help you

Regards

vijay