This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error when using java.util.ArrayList  RSS feed

 
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: 24216
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!