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.
Hi, I've got jdk1.3.1 on W2000, just trying to run a simple helloworld to verify Java is running (then hook it up to PHP)... I have a simple class javaTest in c:\java when I type any of the following: java javaTest java c:\java\javaTest c:\jdk1.3.1\bin\java javaTest c:\jdk1.3.1\bin\java c:\java\javaTest I get the message: Exception in main...noClassDefFound... It's a clean, fresh install of Java, and I'm not sure where to look next. Any ideas please?? ...as an aside, something not directly related to this bboard, I encountered this when I tried hooking Java into the php.ini file so that PHP can access Java classes. When I use the line "extension=php.java.dll" it causes PHP to hang. any addidtional info on this would be appreciated.... Thanks a lot Frank Rizzo [ January 14, 2002: Message edited by: frank rizzo ]
If it is javac that can not find your class, then it is the path parameter that needs modifying. You need to be sure that it includes c:\jdk1.3.1\bin The path statement helps the system find the executables like javac.exe, the classpath helps locate the classes that might be pulled into a compile or execution. PS - applets are another issue. They have settings in the registry that tell them where to find the classes. Do you have the 1.3 plug-in for browsers installed? [ January 14, 2002: Message edited by: Cindy Glass ]
"JavaRanch, where the deer and the Certified play" - David O'Meara
Joined: Jan 14, 2002
Originally posted by Cindy Glass: If it is javac that can not find your class, then it is the path parameter that needs modifying. You need to be sure that it includes c:\jdk1.3.1\bin
Path includes c:\j2sdk1.4.0-beta3\bin\ (re-installed java just to see if it would work) When I try to run the program w/verbose, it loads everything up like normal, till it gets to my class, and then it can't find it. I CAN javac the file and it compiles correctly into my directory. btw thanks a lot for your suggestions.... is there anything else on the machine that you could think of, that would influence java from the command line?? Frank Rizzo