aspose file tools*
The moose likes JDBC and the fly likes problem regarding JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problem regarding JDBC" Watch "problem regarding JDBC" New topic
Author

problem regarding JDBC

abhay das
Greenhorn

Joined: Aug 22, 2001
Posts: 9
Hi Mr. Robertson,
I have got your mail and thanx for replying.The problem is when I execute this example Employee.java...it executes.When I try to run it like D:\Abjava\javac Employee.java then it runs but when I try to run D:\Abjava\java Employee this is the error it gives....Exception in thread "main" java.lang.NoClassDefFoundError:Employee.I have saved this in a directory called Abjava in D: drive in my PC.
Please help me out.
Thanx
Abhay
venugopal askani
Greenhorn

Joined: Aug 20, 2001
Posts: 16
Hey Abhay
this error occurs due to the path variables not set.
please check ur path and classpath variables.
ur classpath should contain . in the classpath variables which stands for current working directory..
Regards
Venu
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

Originally posted by abhay das:
Hi Mr. Robertson,
I have got your mail and thanx for replying.The problem is when I execute this example Employee.java...it executes.When I try to run it like D:\Abjava\javac Employee.java then it runs but when I try to run D:\Abjava\java Employee this is the error it gives....Exception in thread "main" java.lang.NoClassDefFoundError:Employee.I have saved this in a directory called Abjava in D: drive in my PC.
Please help me out.
Thanx
Abhay

There is no need to address this post to me. You are only limiting your resource pool for help. In fact, I don't really know why you are having troubles. There are so many variables. It is a classpath problem of some sort.
try using the full/qualified path name to compile the source file: Assuming that Employee.java resides in the directory D:\Abjava and D:\Abjava is in your classpath
javac D:\Abjava\Employee.java
java Employee (no full path or you will get the java.lang.NoClassDefFoundError: message)
Jamie
 
Consider Paul's rocket mass heater.
 
subject: problem regarding JDBC