|
Your time now: Mon Nov 23, 2009 12:03 pm
|
View unanswered posts | View active topics
| Author |
Message |
|
Tommy_Boy
|
Post subject: NoClassDefFoundError - but class file is in that directory! Posted: Tue Apr 17, 2007 2:54 pm |
|
Joined: Tue Apr 17, 2007 2:49 pm Posts: 3 Location: Washington,DC
|
|
I am running a program that I can compile. but when I try to run it I get the NoClassDefFoundError: "myclass"
The class that it compiles does show up in the same directory that I run my compiler in but I still get the error.
What should I try to do?
|
|
| Top |
|
 |
|
ggomez
|
Post subject: Posted: Tue Apr 17, 2007 3:18 pm |
|
Joined: Tue Apr 17, 2007 4:30 am Posts: 45 Location: !!!!!MéXiCo¡¡¡¡¡¡
|
|
| Top |
|
 |
|
Tommy_Boy
|
Post subject: Posted: Tue Apr 17, 2007 3:23 pm |
|
Joined: Tue Apr 17, 2007 2:49 pm Posts: 3 Location: Washington,DC
|
|
Of course. Another note, is that when I compile it, I am using javac -classpath "/location/of/my/jar/file.jar" makeVisible.java, because the class contains the method is inside of file.jar
public class makeVisible
{
public static void main (String [] args) throws Exception
{
DirectIO dio = new DirectIO("filename", "/file/directory", "fileid", "/");
dio.makeVisible();
System.out.println("File is visible.");
}
}
|
|
| Top |
|
 |
|
ggomez
|
Post subject: Posted: Tue Apr 17, 2007 9:06 pm |
|
Joined: Tue Apr 17, 2007 4:30 am Posts: 45 Location: !!!!!MéXiCo¡¡¡¡¡¡
|
|
Maybe the program is not finding the correct class
you can extract the directory that is inside the jar archive, put it where your program is, import the directory so you can use the classes you want.
if this works maybe the parameters in the javac are wrong.
|
|
| Top |
|
 |
|
Page 1 of 1
|
[ 4 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|

|
|