This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Mock Exam Question

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've tried running this program but everytime it is is giving "Exception in thread main : java.lang.NoClassDefFound test. I'm compiling the program with -Xlint:unchecked option.



Plz help on this as I've exam on 28th and still I'm not doing good in generics.

Thanks
 
Ranch Hand
Posts: 2410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did it compile without any errors?

Also what is your CLASSPATH?
 
Asha Pathik
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It compiled with one warning but i think we can still run such a class file.

And I think this is my classpath:

C:\Program Files\Java\jre1.5.0_03\lib\ext\QTJava.zip

I got this from Control Panel->System->Advance->Environment Variables ->System Variables

Thanks
 
Keith Lynn
Ranch Hand
Posts: 2410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this.

java -cp . test
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably a good idea to unset the CLASSPATH altogether with:

Yes, that's "equals nothing"

It's interesting how installing QuickTime can mess things up. What happens to QT when you deinstall java 1.5.0_03 and install the latest 1.5.0_07 version? :roll:
[ June 26, 2006: Message edited by: Barry Gaunt ]
 
Asha Pathik
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Keith and Barry. It is working fine now and finally i'm able to run all my generics examples.

Thanks
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic