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 8297813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:32:52+00:00 2026-06-08T15:32:52+00:00

I am using Eclipse to write and test Java. I am a beginner so

  • 0

I am using Eclipse to write and test Java. I am a beginner so i don’t know anything about Eclipse.

The problem occurs when I try to run the Java file I just wrote. Instead of executing the file that is opened, it executes the file that I have successfully ran before. I have a few files in the same default package. The package explorer shows that the location of my package is: Aayush > src > default package

I want to run a file named logicaloperator.java but it runs ifstatement.java both are in the same default package and I use the 6th button on the toolbar to run it. When I hover over the run button it says : “run ifstatement” but it should be saying “run logicaloperator”.

  • 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-08T15:32:53+00:00Added an answer on June 8, 2026 at 3:32 pm

    1. Please see that you have included the main() method in this class file.

    2. If you still have the probs then right click on this java file in the package explorer and select Run

    3. Keep the class name which contains your main() method, and the File name with which
    you save your file in Eclipse as SAME.

    Its logicaloperators.java NOT logicaloperator.java……You have missed the “s”

    Eg:

    class logicaloperators{
    
    
          public static void main(String[] args){
    
       }
     }
    

    Save it as logicaloperators.java

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

Sidebar

Related Questions

I'm using Eclipse Indigo on win XP and trying to write a GWT test
I'm using maven / surefire / eclipse to write some code and later test
I am using eclipse (Java EE edition) to write Java servlets and I would
I am using Eclipse (3.5.1), on Ubuntu 9.10 to write some C++ code. I
When debugging Java code using Eclipse, for collection variables, I saw the modcount member.
I just started using Eclipse but already I have a small problem. At first
I'm using Eclipse 3.7 on Ubuntu. Often, after editing a file, I cannot save
I'm using Eclipse EPIC IDE to write some Perl CGI scripts which call some
I've just started using my Eclipse to test some jms codes. The thing is...
Now I try to write a Java Application what uses the Epson Java Pos

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.