| 208 | #endif |
| 209 | |
| 210 | std::string GetClassPath() { |
| 211 | // combine class path from command line flags and JAVA_FUZZER_CLASSPATH env |
| 212 | // variable |
| 213 | std::string class_path = absl::StrFormat("-Djava.class.path=%s", FLAGS_cp); |
| 214 | const auto class_path_from_env = std::getenv("JAVA_FUZZER_CLASSPATH"); |
| 215 | if (class_path_from_env) { |
| 216 | class_path += absl::StrCat(ARG_SEPARATOR, class_path_from_env); |
| 217 | } |
| 218 | |
| 219 | class_path += absl::StrCat(ARG_SEPARATOR, getInstrumentorAgentPath()); |
| 220 | return class_path; |
| 221 | } |
| 222 | |
| 223 | JVM::JVM() { |
| 224 | std::string class_path = GetClassPath(); |
no test coverage detected