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

  • Home
  • SEARCH
  • 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 395527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:27:46+00:00 2026-05-12T16:27:46+00:00

Is it possible to enter an infinite loop at compile time? My program seems

  • 0

Is it possible to enter an infinite loop at compile time?

My program seems to enter an infinite loop when I attempt to compile it. I have a class with a class constructor that calls the method gameRun(). gameRun() calls itself at the end of its execution, but should have the appropriate checks to be able to break from it during run time… However when I attempt to compile the class, I actually seem to get an infinite loop then.

My understanding of compilation is that it does not actually execute the code… Which would mean it would be impossible to enter an infinite loop unless there is actually a serious bug in the compiler’s source. Is this correct?

I am writing in Java, and am using BlueJ (a beginner’s IDE which I am growing out of) as my IDE.

Thanks in advance.

……………………………….

Thanks to you all for so many helpful responses. Just thought I’d post an update, as this seems to have perked some interest, and I am curious about it myself.

I have not done a whole lot with BlueJ or this error since I posted the original error, becuase I had taken the source files from the project, and was able to successfully compile and run them with eclipse. This suggests to me that it is a BlueJ (or related) problem. I have continued to work on this project with eclipse without any more problems of this nature. I will follow up with more detail on the problem when I am able to use the machine with the original project on it again. (Nothing should have been changed since)

……………………………….

As an afterthought… Is there any way I can link this question to an account I have created and registered since this was posted? I can’t find a way to do that, and it would make keeping track of this more convenient…

  • 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-05-12T16:27:46+00:00Added an answer on May 12, 2026 at 4:27 pm

    It would be theoretically possible to do if, for example, to compile a file, the compiler first had to have finished compiling that file. (Ahhh… Recursion).
    But I’d imagine checking for that kind of madness would be the first thing a real-world compiler would handle.

    But I wouldn’t think it would happen on a method/function, unless (postulating) the compiler was trying to resolve tail-recursion to an simpler implementation, and failing. But, again I can’t imagine that would be an issue with a modern Java compiler, even if it exists at all. Certainly I’d imagine that the compiler would eventually give up and post an error rather than infinite looping.

    It’s far more likely to be the IDE than the compiler. At a guess, the IDE might be trying to trace a warning/error to its source in the code in order to highlight it and getting trapped. Does BlueJ have text-highlighting on compiler errors/warnings? You could try turning it off.

    Although, as many others have already suggested, the first real test is to compile from the command line using

    javac *.java
    

    Or whatever files your code uses.

    EDIT: Sorry I never got back to you. For future reference, to compile from the command line (I’m assuming Windows as your OS):

    1. Open the command line by going to the start menu and select Run…
    2. Type cmd into the Run dialogue, and click OK.
    3. This should bring up a cmd.exe console.
    4. From here, use the “cd” command to change directory to the directory containing your java files.
      (cd “My Documents\Java\Monster Battle\core”)
    5. Once you’re in the right directory, type “javac *.java”. This will run the compiler without needing to deal with the IDE. It should pause while compiling, and when it’s done, you get the command prompt back.
    6. If you type “javac *.java -verbose” you get full output, in case you get your infinite loop.

    If that works fine, it’s an IDE bug. Send them a bug report. If it doesn’t, congratulations! You’ve found something really interesting, that will probably tie up some poor Sun developer for a month.

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

Sidebar

Ask A Question

Stats

  • Questions 322k
  • Answers 322k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Editting again based on your feedback... I think you'd best… May 14, 2026 at 12:47 am
  • Editorial Team
    Editorial Team added an answer Since I want to display a page in only one… May 14, 2026 at 12:47 am
  • Editorial Team
    Editorial Team added an answer From your Spring example URL you forgot: <!-- and this… May 14, 2026 at 12:47 am

Related Questions

I need to have a FileSystemWatcher run in an infinite loop to monitor a
In a Flex DataGrid's first row, the itemRenderer will initialize twice. Tracing the results
I have created a very simple application where I am trying to insert a
I'm writing a program which is supposed to read two strings that can contain

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.