This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error when using java.util.ArrayList

 
Mathias Nilsson
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!
I'm having a hard time getting my falling block applet game to work.
First of all I have to compile my java files using -target 1.1.
When I use a class I've made to handle the squares in my game I get an error. It seams that I can't use ArrayList?
Does anyone have a solution to this problem?
Here is my Grid class. Why can't I use this in a applet.

Applet error: error: java.lang.NoClassFoundDefError : java/util/ArrayList
When I dont use the Grid class in my Applet it works fine.
[ April 14, 2004: Message edited by: Mathias Nilsson ]
 
Mathias Nilsson
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok! I Saw that ArrayList is java 1.2.
What type of collection do you recommend to store arrays of objects
in? I want the fastest one if it is possible.
// Mathias
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should be able to substitute java.util.Vector for ArrayList without much disruption.
 
Mathias Nilsson
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes! Thanks... I did that..
Is there a diffrence in performance on
Vector.add(); java 1.2
Vector.addElement(); java 1.1
Does the browsers support 1.2 or just 1.1?
// Mathias
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!