Wednesday, April 05, 2006

Getting Java to Compile

Well, with a new Linux installation comes a new set of problems. I was initially unable to compile any Java programs short of a single file containing a single "main" function (no object definitions). I kept receiving the error message below:

javac ./
java ./Javimapper
Exception in thread "main" java.lang.NoClassDefFoundError: ./Javimapper

I eventually fixed the problem by referring to the following website:

Upon reading the webpage above, I simply typed in the following and I was able to compile and run the program just fine:
java -classpath ./ Javimapper


Blogger Anna said...

Great and Useful Article.

Online Java Training | Online Java Training

2:15 AM  

Post a Comment

<< Home