Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

thin driver / classpath / jdk1.4

 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Trying to execute a program, I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: "
whenever I set up my CLASSPATH.
export
classpath=/opt/oracle/product/9.2.0/jdbc/lib/ojdbc14.jar:/opt/oracle/product
/9.2.0/jdbc/lib/nls_charset12.zip
javac Test.java ==> ok
java Test == > Exception in thread "main" java.lang.NoClassDefFoundError: "
This is a CLASSPATH problem because if unset the classpath, I don't get any error. So it has nothing to do with the code in my program.
I am using jdk 1.4.1_01 and the jdbc driver is thin (included with Oracle
9i).

Does anyone have an idea ? What is wrong ?
thanks
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
longbeach longbeach,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps you need to include the current working directory in your CLASSPATH setting. The current working directory is denoted with a period. So, your CLASSPATH should be
.:[OTHER LOCATIONS HERE]
[ June 29, 2003: Message edited by: Dirk Schreckmann ]
 
bharat nagpal
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to ser the classpath of your system to include the jar files in JDK.
just write on the command prompt
set CLASSPATH=e:\jdk1.4\lib\nameofJar.jar;%CLASSPATH%;.;
where e:\jdk1.4 (is your java_home) and nameofJar is name os jar files in lib directory under java_home. Include all the jar files one by one.
it will work for you.
If everything goes well. Modify the classpath settings and reopen a new command prompt.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic