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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:31:05+00:00 2026-06-06T04:31:05+00:00

I am confounded with a strange issue. Basically the situation is like this. I

  • 0

I am confounded with a strange issue. Basically the situation is like this. I implemented the runnable in my class, I pass the class in a new thread, I override my run() method within the class that implements runnable and then I start the thread. However, my start() method never calls my run() method. I’ve search the forums but I can’t seem to find another similar problem.

Below is my sample code:

public class EmailManager implements Runnable {
    PortalManagementSBLocal pmbr= this.lookupPortalManagementSB();
    Thread runner;
    String emailServerName = "";
    String smtpPort = "";
    String emailTo = "";
    String emailFrom = "";
    String mailer = "JavaMailer";
    String subject = "";
    String message = "";

    public EmailManager() {
    }//default constructor

    public EmailManager(String emailTo, String subject, String message){

        this.emailTo=emailTo;
        this.subject = subject;
        this.message = message;
        //need to make this dynamic
        this.emailFrom = pmbr.getEmailFrom();
        this.emailServerName = pmbr.getEmailServerName();
        this.smtpPort = pmbr.getEmailSMTPPort();
        //runner = new Thread(this,"Email");
        runner = new Thread(this);
        runner.start();
        System.out.println("***** Email Thread running...");


    }

    @Override
    public void run(){
        sendEmail(); //This is never called
    }

Would really appreciate any guidance! Thanks a ton!

  • 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-06T04:31:06+00:00Added an answer on June 6, 2026 at 4:31 am

    How do you know that this method is never called?

    The simple test below works. So there’s no problem creating a thread and running it from within the constructor. So there’s something else going on that’s preventing you from seeing that sendEmail() is being called.

    public class Test implements Runnable {
      Thread runner;
      public Test() {
        this.runner = new Thread(this);
        this.runner.start();
      }
    
      @Override
      public void run() {
        System.out.println("ya");   
      }
    
      public static void main(String[] args) {
        new Test();
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this has been asked but I'm still confounded. I'm trying to build
Im kinda new to Jquery, so this might be easy, then again i cant
This one has me confounded, so I'll try to go through the chronology so
I've got a simple question but it has got me confounded. The code below
I started learning Ruby on Rails and found myself confounded by the syntax, so
This is a weird question inasmuch as I've definitely had projects that work fine,
I have a table as follows <div id=div13 class=ctnr> <table id=mainTable13 class=dtable cellpadding=3 cellspacing=1
This is a very general and noob question, but I am a noob with
I am completely confounded by HTTParty's XML parsing of seemingly identical XML. I am
String building in Java confounds me. I abhore doing things like: url += u1=

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.