Computer Science Canada Weird xlint error with my linkedlist adding method |
Author: | gsquare567 [ Sat Dec 02, 2006 10:59 pm ] | ||||
Post subject: | Weird xlint error with my linkedlist adding method | ||||
check this:
where getSprites() returns a LinkedList of type AnimatedSprite, and bullets[] is an array of animatedsprite. what could be the problem? ps, this is 28x plus another error... read here:
|
Author: | wtd [ Sat Dec 02, 2006 11:51 pm ] |
Post subject: | |
Of you're using Java 1.5 and collections, you'll need to be familiar with generics. |
Author: | gsquare567 [ Sat Dec 02, 2006 11:57 pm ] |
Post subject: | |
thanks for the help... now can anyone tell me why these are coming up? |
Author: | OneOffDriveByPoster [ Sun Dec 03, 2006 12:29 am ] |
Post subject: | |
gsquare567 wrote: thanks for the help... now can anyone tell me why these are coming up?
Check your method signature for getSprites(). wtd is right, get used to generics if you are using Java 1.5. |
Author: | wtd [ Sun Dec 03, 2006 9:34 am ] | ||||||||
Post subject: | |||||||||
We know of what we speak.
|
Author: | gsquare567 [ Sun Dec 03, 2006 2:34 pm ] | ||||
Post subject: | |||||
thanks, but it still doesn't work... heres how i declare the LinkedList:
and heres how i call it:
i still get the same message, and can you also look at the very last error, something about serialVersionUID? |
Author: | OneOffDriveByPoster [ Sun Dec 03, 2006 4:30 pm ] | ||
Post subject: | |||
Check the method signature; what is different from your declaration of sprites? Your code below:
Re: serialVersionUID: http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html |
Author: | gsquare567 [ Sun Dec 03, 2006 6:32 pm ] |
Post subject: | |
OH NO WAY MAN U R GOD! public LinkedList<AnimatedSprite> getSprites()... your a genious! |
Author: | gsquare567 [ Sun Dec 03, 2006 6:56 pm ] |
Post subject: | |
umm hmm... got rid of the "recompile with -Xlint", but now wen i run the internet file, the applet wont work. says "Loading Java Applet Failed"... i did everything required to run an applet, so why isnt it working? |
Author: | gsquare567 [ Mon Dec 04, 2006 1:19 pm ] |
Post subject: | |
any1? |
Author: | wtd [ Mon Dec 04, 2006 1:22 pm ] |
Post subject: | |
Which browser are you using? |
Author: | gsquare567 [ Mon Dec 04, 2006 6:37 pm ] |
Post subject: | |
firefox, but it worked b4 for 2 other games. i even copied the htm file for the other two and just renamed it + the "code = " parameter |
Author: | gsquare567 [ Mon Dec 04, 2006 10:07 pm ] | ||
Post subject: | |||
heres another problem, might be connected... i cant make a jar file. heres the error message:
ps, i include a manifest called manifest.txt plus all the classes needed. the manifest is 3 lines, Main-Class: GalacticWar + 2 blank lines ![]() |
Author: | Aziz [ Tue Dec 05, 2006 9:10 am ] |
Post subject: | |
using generics would cause that problem, try and step back a few steps in your code (ie. undo a bit, then add in the <> bit). Also, make sure your browser has an up-to-date JRE plug-in installed. The latest is 6 (or 1.6) but that's a prerelease, so 5 (update 9) should be fine |
Author: | gsquare567 [ Tue Dec 05, 2006 3:49 pm ] |
Post subject: | |
i based my entire game on the LinkedList which is where i store the sprites or objects on the screen... so i'll try downloading the latest plugin and update, i'll get back to you to tell you if it still doesnt work. |
Author: | gsquare567 [ Tue Dec 05, 2006 4:03 pm ] |
Post subject: | |
nope, didnt work. still says "Applet GalacticWar notinited". i dled the jdk 5 update 10... |
Author: | gsquare567 [ Wed Dec 06, 2006 7:16 pm ] | ||||||||
Post subject: | |||||||||
BUMP... and, added a lil info if it helps you solve this complex error ![]() ok. i re-dled the whole jse and got update 10. heres the shiz lol: HTML CODE
FIRST LINES OF MAIN JAVA CODE
MANIFEST FILE CODE
PS thanks a lot for helping me man. if you actually solve this problem... well... iunno i'll thank you. ![]() |
Author: | gsquare567 [ Thu Dec 07, 2006 8:06 pm ] |
Post subject: | |
whats with this wtd hasnt responded on the hour! is he sick or sumtin? |
Author: | gsquare567 [ Sun Dec 10, 2006 2:32 pm ] |
Post subject: | |
anyone??? |
Author: | gsquare567 [ Wed Dec 13, 2006 9:57 pm ] | ||||
Post subject: | |||||
ok, this is REALLY buggin me, so im just taking random guesses, hoping someone can help. so it says applet notinited, i thought, well maybe its the init method. well, here it is, i checked EVERYTHING i could, but there is something missing/incorrect. help! please!
and here is the method implemented by the subclass.
i checked that all files were written correctly, although i wasnt sure if a MIDI file's extension was mid or midi so i tried both, and neither worked, so i assume it doesnt matter. also, the au extension is for an AU file, and png is for PNG... so i know those are correct. what could be the problem? just throw things PLEASE! |
Author: | Neville [ Wed Dec 13, 2006 11:40 pm ] |
Post subject: | |
I would start by debugging as much as you can. Do you use an IDE with built in debugging? This way you could step through and see where it is failing. If not, try writing an output file with little messages to see how far along your init() goes before it fails. That way you can narrow down the problem. It's most likely an exception being thrown somewhere. |