Tons of test improvements + Java detection for chart app

you meant 'invalid' right? typo I guess :)