—
Wed,
29
Jan
2003
—
Adding the Java SDK to your path
I was told that a good thing to do is to create a .sh and .csh file in /etc/profile.d. The .sh file should have these two lines in them:
export JDK_HOME=<path to your jdk implementation — mine is /usr/java/j2sdk1.4.1_01>
export PATH=$PATH:$JDK_HOME/bin
My guess at what the .csh file should look like is this:
setenv JDK_HOME=<path to your jdk implementation — mine is /usr/java/j2sdk1.4.1_01>
setenv PATH=$PATH:$JDK_HOME/bin
This sets the path variables for all users on the system with .sh and .csh shells, and it creates the JDK_HOME variable which some programs need to function.
—
Wed,
29
Jan
2003
—
Java gives an Exception in thread “main” java.lang.NoClassDefFoundError
This happened to me in Red Hat 8.0 with Sun’s j2sdk1.4.1_01, though I think it happens with a lot of Java packages. My problem was that I was writing at the command line:
bash> java my_program.class
I should not have included the .class in my command line call. I just had to make sure that I was calling java from the directory where my class file was stored.
—
Wed,
29
Jan
2003
—
Welcome to Richard’s Obvious Answers to Dumb Questions
Summary: Herein the author lays out the original purpose for this blog.
I realize that a question I have is dumb when I spend a long time finding the solution, and it turns out to be obvious. The problem with obvious answers is that people rarely bother writing them down. Sometimes I forget an obvious answer and end up searching for it twice. No more! I’m going to record obvious answers here so that not only can I find them again, but you can too.
Beware, I am not an expert in anything listed on these pages, and the answers may be wrong. If you find a glaring error, please email me.
These pages were written in haste and are not proofread. Remember that.