Created
April 7, 2010 20:49
-
-
Save vvs/359436 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/argparser.cpp b/argparser.cpp | |
index 89ec558..806d9cf 100644 | |
--- a/argparser.cpp | |
+++ b/argparser.cpp | |
@@ -302,7 +302,12 @@ bool ArgParser::parseArgs(int argc, char *argv[]) { | |
javaOptions.push_back("-server"); | |
nailgunServer = true; | |
} else if (it->compare(0, 2, "-J", 2) == 0) { | |
- javaOptions.push_back(it->substr(2)); | |
+ std::string javaOpt = it->substr(2); | |
+ if (javaOpt == "-ea") { | |
+ logMsg("Note: -ea option is specified, there will be no bootclasspath in order to enable assertions"); | |
+ noBootClassPath = true; | |
+ } | |
+ javaOptions.push_back(javaOpt); | |
} else if (strcmp(it->c_str(), "-Xhelp") == 0) { | |
printToConsole(HELP_MSG); | |
if (!appendHelp.empty()) { | |
@@ -533,8 +538,8 @@ void ArgParser::addToClassPath(const char *path, bool onlyIfExists) { | |
void ArgParser::addToBootClassPath(const char *path, bool onlyIfExists) { | |
logMsg("addToBootClassPath()\n\tpath: %s\n\tonlyIfExists: %s", path, onlyIfExists ? "true" : "false"); | |
- if (nailgunServer) { | |
- logMsg("NOTE: In 'ng-server' mode there is no bootclasspath, adding to classpath..."); | |
+ if (nailgunServer || noBootClassPath) { | |
+ logMsg("NOTE: In this mode there is no bootclasspath, adding to classpath..."); | |
return addToClassPath(path, onlyIfExists); | |
} | |
diff --git a/argparser.h b/argparser.h | |
index 157b4a9..cfa8203 100644 | |
--- a/argparser.h | |
+++ b/argparser.h | |
@@ -55,6 +55,7 @@ protected: | |
bool separateProcess; | |
bool nailgunClient; | |
bool nailgunServer; | |
+ bool noBootClassPath; | |
bool printCommandLine; | |
std::string platformDir; | |
std::string bootclass; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment