problem regarding JDBC
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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
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
posted 24 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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
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
posted 24 years ago
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
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
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
| I will suppress my every urge. But not this shameless plug: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |










