java.lang.NoClassDefFoundError:
You try to run a little java program and you get this error. I first got this error when running my first little hello world program.
This occurs because the classpath is not setup or referenced correctly.
Executing your program using this command should correct the problem:
java -classpath . helloworld
where helloworld is the name of your compiled class.
This tells java that your classpath is your local directory.
I was looking for an article which can provide a good learning path and i found one related to java. For those who are fresh graduates and/or developers willing to dive in java, This link is really awesome. I am summarizing the main point or may say copy paste.
Heiss considerately asked Fain, veteran developer that he is, for any advice he might offer to a young graduate preparing for his first interview. He had several suggestions:
- Join open-source Java projects while still an undergraduate
- Arrange as many technical interviews as possible, ideally including some outside your geographical area. And then analyze your mistakes after each interview that didn’t result in a hire.
- Listen, don’t talk as “this will lower your chances of saying something stupid.”
- Research some technical areas in the Java space and make a point of bringing them up in the interview.
- Finally, create the opportunity to develop a project that uses using different server side Java technologies for some entity in your community.
Fain also had some recommended reading that he shared in response to Heiss’s question:
- Second, “Joel on Software” by Joel Spolsky, helpful reading, Fain insists, no matter what programming language a reader uses.
- Third, “Thinking in Java” by Bruce Eckel
- Fourth, “Head First Design Patterns” by Elisabeth and Eric Freeman, Kathy Sierra, and Bert Bates, writers who have managed to turn the sleeping-pill-topic into a fun read with code samples in Java, Fain said.
- Fifth, “SQL for Smarties” by Joe Celko, a book that has lots of tips and tricks on how to communicate with your relational DBMS.
- Sixth, “Java Concurrency in Practice” by Brian Goetz, Joshua Bloch, et al., a first-rate book on Java internals and one that will teach you everything you need to know to design highly-available and well-performing Java applications, according to Fain.
Fain also recommends subscribing to Dr. Heinz Kabutz’s Java Specialist newsletter.
BottomLine: ‘Just Write the Code that Makes Sense’