Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8315283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:05:49+00:00 2026-06-08T21:05:49+00:00

I have an instance variable, like so: PathFinder finder; (this is using Kevin Glass’

  • 0

I have an instance variable, like so:

PathFinder finder;

(this is using Kevin Glass’ A* tutorial, so the PathFinder class is in the same file, link here: http://cokeandcode.com/index.html?page=tutorials/tilemap2)

Anyways, when I do

finder = new AStarPathFinder(currentMap, 1000, true);

I get a Exception in thread “”AWT-EventQueue-0″ java.lang.ExceptionInInitializerError”.

currentMap is an instance of my Map class, and yes it is initialized. 1000 represents the maximum tile distance that will be searched, and the boolean represents diagonal movement true/false. Oh well I’ll just throw the constructor at you:

public AStarPathFinder(TileBasedMap map, int maxSearchDistance, boolean allowDiagMovement) {
    this(map, maxSearchDistance, allowDiagMovement, new ClosestHeuristic());
}

I know it has something to do with static initializers, but I’m not too sure what else. Oh, and I tried to initialize an instance of the same AStarPathFinder class in another class, and I got the same result.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:05:50+00:00Added an answer on June 8, 2026 at 9:05 pm

    I read the full stack trace, and the error was that the parameters for a method in the parent class and in the child class wasn’t the same, somehow the IDE just didn’t make any notification.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In java can an instance variable and a method have the same name without
I have a custom class that has as an instance variable of a coordinate:
Let's say we have a class foo which has a private instance variable bar
I have a set of class instances which have a BOOL instance variable called
Assume that I have a global variable user in application....like this: # GET /users.xml
I have a Perl class that contains a hash instance variable for storing other
I'm developing something for iOS with cocos2d. Now I have this CCLabelBMFont instance variable
Say I have defined a variable like this (C++): static const char str[] =
So I have a a text file that looks something like this: public >ret
I have a JSON file with parsed data stored in a @colors instance variable,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.