I use Apache's commons exec library to run another application from my java code on windows. That other application (tshark) might throw an ugly exception which makes windows pop up "an unhandled win32 exception occured in ..." window. Is there some way to swallow that exception in my java code, so the user won't encounter that window?
apache.commons.exec - swallow exception thrown by the executed process?
316 Views Asked by r0u1i At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in APACHE-COMMONS
- How to use CommonsMultipartResolver in Spring Boot
- Apache Commons FTP not writing to FileOutputStream with no error thrown
- Phonetic search for Indian languages
- Getting HTTP 302 when downloading file in Java using Apache Commons
- Package does not exist when compiling
- unable to resolve class org.apache.commons.net.ftp in grails
- convert Binary,Hex and Octa to java data types
- Guava Vs Apache Commons Hash/Equals builders
- SimplexSolver, binary or semi-continuous variables
- how to split a list into a given number of sub-lists?
- Apache HTTPClient Timeout at any moment
- Apache Digester XML parser annotations and composite model
- Do I have to add all commons api?
- Elegant way to validate keyset of a map with an enum?
- Calculate percentile from a long array?
Related Questions in APACHE-COMMONS-EXEC
- Why does "git pull" exec command get stuck and print nothing?
- How to access file path with spaces from command prompt in Java
- How to kill all of the sub-processes being created under my test suite?
- Kill process started by org.apache.commons.executor
- Use docker-machine create from java
- series of commands using commons-exec
- Apache Commons Exec produces too many quotes for arguments containing spaces?
- apache.commons.exec - swallow exception thrown by the executed process?
- How to execute /bin/sh with commons-exec?
- How to prevent log output from Apache Commons Exec
- Graceful kill of Apache Commons Exec process
- Apache commons exec run interactive terminal application
- Different output -- when running mathtext in command line and when the command is executed from a java program using apache-commons-exec
- Executing an external program using process builder or apache commons exec
- Apache commons exec causing high CPU usage
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Well, not easily.
If tshark/wireshark writes something to stderr when that window you want to get rid of pops up, then you may be able to destroy() the process you just spawned when you detect whatever matching string on stderr (that would get rid of tshark/wireshark entirely, not just of the unwanted window).
Anything else is doable, like automatically closing the error window, but that would require much more work (like for example using JNA to find windows title and closing the tshark/wireshark exception window you want to get rid of).