diff --git a/src/bin/java.cpp b/src/bin/java.cpp index d6c941c..8449c20 100644 --- a/src/bin/java.cpp +++ b/src/bin/java.cpp @@ -24,10 +24,10 @@ int main(int argc, const char **argv) { std::vector arguments; // skip argv[0] and main class name argv += 2; - while (argv[0]) { - arguments.push_back(strings::fromStdString(argv[0])); - ++argv; + while (*argv) { + arguments.push_back(strings::fromStdString(*argv++)); } + JavaMainThread javaMainThread(mainClassName, arguments); javaMainThread.create(nullptr);