score:1
ok, i figured it out. guis aren't meant to be run in junit tests, because as soon as the tests are completed, the program will exit, and the gui will immediately close. for some reason, the program was staying open when i ran the junit test in windows, but that's not really supposed to happen.
because, in the current project that i'm working on, it makes more sense for me to open the gui in a junit test, i implemented the following workaround: i had the method that ran the gui simply wait until the gui is closed before it continued to execute. to do this, i used the mechanism described here.
Source: stackoverflow.com
Related Query
- Java GUI not displaying in eclipse on Ubuntu
- Ubuntu 11.04 Eclipse Java not running
- Servlet running on Tomcat in Eclipse but not displaying on Ubuntu Server Tomcat
- Eclipse IDE for Java Dev on ubuntu 10.04 not working
- Eclipse java debugging: source not found
- How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9
- Eclipse "this compilation unit is not on the build path of a java project"
- Java "constant string too long" compile error. Only happens using Ant, not when using Eclipse
- "Source folder is not a Java project" error in eclipse
- I get "Source not found" when debugging my Java code in Eclipse
- Getting "Project facet Java version 1.8 is not supported." in Eclipse Luna
- Eclipse autocomplete not working in some Java files
- Tools jar does not exist Eclipse JAVA
- Maven project not being treated as Java in Eclipse
- eclipse not inserting "diamond" operator in a java 8 project
- I updated java and eclipse does not work
- How can I use the java Eclipse Abstract Syntax Tree in a project outside Eclipse? (ie not an eclipse plugin)
- How to get Eclipse to jump to failed JUnit test when test is not a Java method
- Eclipse Java Content Assist not working
- Import existing java project in eclipse but design view not exist for JFrame?
- Java 9: Module java.xml.bind is not accessible in Eclipse
- I installed Java 7 but Eclipse keep saying that 1.6 is not suitable for this product
- apache tomcat 9.x not working with eclipse & Java 10.0.1
- Java JFrame Window not appearing when run from Eclipse
- Ant not working in Eclipse Kepler (Java Virtual Machine Launcher - A Java Exception has occured)
- eclipse not working - No java virtual machine was found
- Eclipse not able to open java files -> Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass
- How to get Java API Javadocs to show up in Eclipse in Ubuntu
- Is it possible to mark a part of java code in eclipse to be not auto formatted?
- Eclipse cannot find Java on Ubuntu
More Query from same tag
- Kindle Fire SDK not found in Eclipse Android SDK Manager
- Eclypse:the method add(int fragment) in the type fragmenttransaction is not applicable
- SVN update not working
- error while loading maven project into eclipse
- How to generate C++ constructor / copy constructor with Eclipse on Mac OS
- App crashes after splash screen
- changing common variable value between two java projects not reflecting at run-time
- Downgrade java version in Eclipse
- Python: FileNotFoundError: [Errno 2] No such file or directory - How to add file to the right directory
- How does Eclipse show the startup interface so fast
- Eclipse configuration to launch a Maven project with Google Web Toolkit
- How can we redirect a Java program console output to multiple files?
- Default JRE path not set on eclipse plugin project in MAC
- How do I add mySQL JDBC Driver when creating a Driver definition?
- Should classes with same names in the same packages in different deployment units conflict in Java
- Unable to start flight recorder via JMC 6 within eclipse oxygen (4.7)
- How to Hide Context Menu in Eclipse?
- How to copy java file to a workspace programmatically?
- Maven Build Failure, Failed to collect dependencies at org.springframework:spring-core:jar:4.0.2.RELEASE
- Download Eclipse with no packages?
- Having trouble running code in Eclipse using JOGL
- How can I start the Eclipse IDE with server mode jvm in Linux?
- How to add a file path for a file input stream in eclipse
- Formatting and Aligning output of PrintWriter
- Tomcat Server Timeout in Eclipse
- Android Eclipse library project and the library project's type resolution for project specific config files
- How can I fix adb in eclipse?
- Deleting Git repository has deleted my project
- How do I make use of the apple extensions for Java using Eclipse
- Emulator does not load