hi ,
today i got an error with :


Exception in thread "main" java.lang.NoClassDefFoundError : Loop

i have gone thru so many links which i found in google but i am unable to solve that problem iam using both eclipse and command prompt.

in both i got the same problem

Can any one help Me?


With Regards.

Can you show some of your code, especially any reference to a class called "Loop"? The error is saying that java wants to load a class called Loop, but it can't find it in anywhere in the current classpath.

set your environment variables.

Member Avatar for DaSogo

How are you running the application, through and IDE or the command line?

hi ,
thanks for ur reply
i tried that program in both IDE and command prompt.In command promp its saying that :noclassdeffounderror.

hi ,
Could anyone tell me how to give commandline arguments in Java using Eclipse?
Iam using Windows XP.

best regards,
Aruna

That's a different question :)

For your first, you need to learn about classpaths. That's well described in any decent beginners' book, no need to repeat that here.

For the second, that all depends on the version of Eclipse. But when you select a class to run you can also supply parameters to it in the runtime configuration dialog.

Member Avatar for DaSogo

hi ,
thanks for ur reply
i tried that program in both IDE and command prompt.In command promp its saying that :noclassdeffounderror.

I assume that you are able to run your app with no prob through the IDE. For the CMD, make sure you change the directory to the path where the java class file is logically stored. You should be able to run it now. If you don't want to have to change to different directories to run your apps every single time, then take the advice that has been given to you already, "LEARN ABOUT SETTING THE CLASSPATH ENVIRONMENT VARIABLE!"

hi ,

i have done what u told me that problem has been solved.
thank u so much

Best regards,
Aruna

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.