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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:02:54+00:00 2026-05-31T02:02:54+00:00

So, here is my situation : I’ve got a Java application that is sending

  • 0

So, here is my situation :

I’ve got a Java application that is sending arrays of data to a C++ DLL using a JNI method from a “JavaToCpp” class.

Once the C++ DLL have received all the data, it begins performing several actions on it.

I’m running the “JavaToCpp” class using a new thread, for my Java interface not to be frozen during the (long) (C++) procedures/subroutines.

I implemented two methods to stop the working (C++) procedures/subroutines :

  • The first one “STOP” : is creating a file which is going to be read by the C++ DLL so it can cleanly stop the running procedures/subroutines.
  • The second one “KILL” : is supposed to shutdown / kill the running C++ procedures/subroutines directly

The problem is that, after looking for a while, I did not find any good trick to perfom it.

So if anyone’s got an idea on how to kill a Thread while procedures/subroutines are being running …

  • 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-31T02:02:56+00:00Added an answer on May 31, 2026 at 2:02 am

    The only way in to “kill” a Thread in Java is the deprecated stop() method.

    Before you plan to use it, read and understand why it’s deprecated. If you understand it, you won’t use it.

    So no, there’s no good way to kill a thread. But why are you talking about C++ processes (or did you mean procedures, i.e. subroutines)? Because if you use a separate process (not thread) to do the native part, the you could easily stop it: use ProcessBuilder and Process.destroy(). There are other advantages too in using processes instead of threads to invoke native stuff. One benefit is that an unstable native process won’t kill your Java process.

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

Sidebar

Related Questions

There is a situation here, I'm developing an Android application, using Java. I'm pretty
Here's the situation - I've got a shell that loads an external .swf. Now,
Very odd situation here. I'm trying to launch a .application file using Response.Redirect. In
A simple situation here, If I got three threads, and one for window application,
I have a situation here i am taking input from user using scanf can
I have a peculiar situation here in an application I've programmed using a Substance
Here's the situation: I am trying to launch an application, but the location of
Here's the situation: I'm developing a simple application with the following structure: FormMain (startup
Very strange situation here: I'm using L2S to populate a DataGridView. Code follows: private
i got a tricky situation here. im trying to center 3 divs inside my

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.