Exception in thread "main" java.lang.NoClassDefFoundError:
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
That was the thing i didn't understood. Thank you so much.
But why doesn't this work for Anjuta ?
Exception in thread "main" java.lang.NoClassDefFoundError: /home/thomas/Java/hello
Program exited successfully with errcode (1)
Press the Enter key to close this terminal ...
If you want to use anjuta you will have to do something slightly different.
For 'java -classpath . Hello', make sure you're in the directory that the file's in (w/ cd).
For anjuta, you'd do something like:
java -classpath $(name.of.anjutas.variable.for.the.files.dir) $(current.full.filename)
I made it. I just changed the java "$(current.full.filename)" for java "$(current.file.name)".
But say me one thing. Why can't linux run the class files without using a program? Whit compiled c files, it just runs them.
You "can't", yet. Gcc has an extension that translate java byte code into native code, called gcj. The draw back is, that project is in early stages of development and don't support any graphical interface of java, as Swing.
Also, translating your code into machine language completely kills the purpose of Java, which is portability.
No language is safe, not c/c++ either. There're decompilers for everything. The process of decompiling is known as Reverse Engineering. Take a look here for some decompilers:
That said, the two very best ways of protecting your code is: copy right it or release as GPL.
If I was you, I'd more worried to learn Java efficiently (or any other language for that matter) then someone, somehow, in the future, will hack your application. If it does, just sue their pants off. It's quite funny and I bet, profitable