This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
this is probably going to look like a stupid question. i have a piece of code i got from the "Programmers Guide to Java Certification" textbook. It compiles fine, but doesn't run. it starts with a line: package com.acme; import java.util.*; ..... ..... ..... now, if i comment out the package statement it runs fine and does what it is supposed to do. if i leave it as is it gives the error: Exception in thread "main" java.lang.NoClassDefFoundError: Exercise1 (wrong name: com/acme/Exercise1 ) The file is named Exercise1.java and I run it from the directory c:\javafiles\Chapter2 my Classpath is set to c:\jdk1.3\bin;.; are there any more environment variables I need to set up or what is the problem here? thanks sedate
Joined: Feb 20, 2002
thanks guys, found the answer from another thread. i'm quite surprised the people at uni never thought to teach this. guess that's why we are supposed to get off our buts and actually do stuff :-) happy programming all!