diff --git a/test/hotspot/jtreg/runtime/CommandLine/PrintClasses.java b/test/hotspot/jtreg/runtime/CommandLine/PrintClasses.java index 098dd3a3979..4eea1b9560e 100644 --- a/test/hotspot/jtreg/runtime/CommandLine/PrintClasses.java +++ b/test/hotspot/jtreg/runtime/CommandLine/PrintClasses.java @@ -62,6 +62,6 @@ public class PrintClasses { pb.command(new PidJcmdExecutor().getCommandLine("VM.classes", "-location")); output = new OutputAnalyzer(pb.start()); - output.stdoutContains(".*(file:/|jar:).*"); + output.stdoutShouldMatch("^.*(file:/|jar:).*$"); } }