Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Java Error.(Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 64516)
Java Error. [message #1418182] Sat, 06 September 2014 17:27 Go to next message
The Crafter MC is currently offline The Crafter MCFriend
Messages: 3
Registered: September 2014
Junior Member
I'm following a tutorial on how to make a 3D game in java but for some reason it doesn't work and I get this: Sad

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 64516
at com.Block.BlockGame.Graphics.Screen.<init>(Screen.java:14)
at com.Block.BlockGame.Display.<init>(Display.java:30)
at com.Block.BlockGame.Display.main(Display.java:91)


The tutorial i'm following is 3D Game Programming By TheChernoProject. ( I can't post links)

I would put my code down here but I implemented more than what that tutorial teached me but that code isn't being a problem.
Re: Java Error. [message #1418344 is a reply to message #1418182] Sat, 06 September 2014 23:22 Go to previous messageGo to next message
The Crafter MC is currently offline The Crafter MCFriend
Messages: 3
Registered: September 2014
Junior Member
Any help?
Re: Java Error. [message #1418471 is a reply to message #1418344] Sun, 07 September 2014 04:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
You post (at least for me) at 7:42PM on a Saturday, and at 1:22AM you
wonder why there isn't an answer yet. Your post has no question mark
so you've not actually posted a question. The question isn't even about
JDT it's purely a Java question, and you don't show the code with the
problem. It's better if you post pure Java questions (as opposed to
questions specifically about how to use Eclipse's Java tools and API) to
something like http://stackoverflow.com/ and when doing so, clearly
state the question, and provide all the context someone would need to
answer the question.

On 07/09/2014 1:22 AM, The Crafter MC wrote:
> Any help?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Java Error. [message #1418758 is a reply to message #1418471] Sun, 07 September 2014 15:51 Go to previous messageGo to next message
The Crafter MC is currently offline The Crafter MCFriend
Messages: 3
Registered: September 2014
Junior Member
I posted this at 1 pm eastern standard time and since it was help with something i have made in Eclipse I was expecting to have some help with this.
Re: Java Error. [message #1418778 is a reply to message #1418758] Sun, 07 September 2014 16:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
It's weekend so best you expect people not to be working. It's also
best you formulate an actual question---typically that involves a
question mark somewhere---keeping in mind that this forum is for
questions about how to use the JDT's tools and APIs, not for questions
about what might be wrong with Java code that you've written yourself
and which does goodness knows what because you've decided not to show
any of the code. Doesn't it strike you that it's impossible for anyone
to guess what's wrong with your code without seeing it? Have you set a
breakpoint and used the debugger to see that's going on there? JDT has
some very useful features, for example, in the breakpoints view there is
a little "J!" icon, which you can use to set an exception breakpoint
which you could use to have your problem stop as soon as an
ArrayIndexOutOfBoundsException is throw. Then you can inspect the state
of your running problem to understand why you're trying to access
something beyond the end of the array.


On 07/09/2014 5:51 PM, The Crafter MC wrote:
> I posted this at 1 pm eastern standard time and since it was help with
> something i have made in Eclipse I was expecting to have some help
> with this.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Java Error. [message #1421267 is a reply to message #1418778] Thu, 11 September 2014 06:19 Go to previous messageGo to next message
shankha banerjee is currently offline shankha banerjeeFriend
Messages: 40
Registered: February 2013
Member
From the stack trace:

com.Block.BlockGame.Graphics.Screen.<init>(Screen.java:14)

Try to check what is the array you are trying to access. What is the index in the array. Is the length of array less than index.

As already suggested you can ask these questions in programming forums.

Thanks
Re: Java Error. [message #1498073 is a reply to message #1421267] Thu, 04 December 2014 06:46 Go to previous message
George Maravich is currently offline George MaravichFriend
Messages: 7
Registered: December 2014
Junior Member
Try checking the array index. ArrayIndexOutOfBoundsException is usually thrown to indicate that an array has been accessed with an illegal index. Very Happy
Previous Topic:HELP ME PLEASE (Some basic java)
Next Topic:What are the linker/builder/code completion/... directories?
Goto Forum:
  


Current Time: Fri Apr 19 23:38:11 GMT 2024

Powered by FUDForum. Page generated in 0.03219 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top