Issue
Background: I use a command line based user-interface to use ( = mostly test ) utility classes. When I use the NetBeans IDE I make use of 'Eric's console' which enables command line i/o from within NetBeans.
Question: I want to check if a class has been run from within the NetBeans IDE or not. Is this possible and if so how to implement this?
Solution
Inspect System.getProperty("user.dir")
which is where the application is run from.
Answered By - Joop Eggen
Answer Checked By - Marilyn (JavaFixing Volunteer)