• Post Reply Bookmark Topic Watch Topic
  • New Topic

Package problems with classpath...sob!  RSS feed

 
JBaker
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having major problems with packages and my classpath. I'm using JDK1.4 under Windows XP Pro.
Here is my current directory structure.
My package class files are kept in H:\Java\commonfiles
My class file is kept in H:\Java\programs\OracleDataConnection
I run the executable class using....
java -classpath h:\Java\commonfiles\classes12.zip;h:\Java TryOracleConnection
The classes12.zip is the path to the JDBC drivers, which I am using to connect to an Oracle database. I can successfully connect to the database. I'm using a LinkedHashMap to store each record row returned and storing that in a List.
However, when I run my executable class, I get a ClassNoDefFound error on java/util/LinkedHashMap!
WTF? I've included "import java.util.*;" in both the package class file I'm using and the calling class (which gets the returned List). Just to be doubly sure, I've also included "import java.util.LinkedHashMap;" in both places as well.....but no luck.
I know I must be doing something wrong, but I can't help wishing my department had gone down the .NET route instead of Java. This is utterly insane just to get a simple program running. I'm starting to hate Java.
Please help?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps you're compiling under JDK 1.4, but running with JDK 1.3 or earlier; LHM was introduced in 1.4. Try "java -version" just to make sure.
 
JBaker
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That was it. Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!