Mercurial > hg > truffle
comparison src/share/vm/runtime/arguments.cpp @ 3601:3822c5969a8b
better error messages for missing MAXINE env var and exceptions thrown by the compiler
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Tue, 25 Oct 2011 14:44:32 +0200 |
parents | 7604c69a6301 |
children | d3ec27ea1b20 |
comparison
equal
deleted
inserted
replaced
3600:707bc4847b00 | 3601:3822c5969a8b |
---|---|
2022 } | 2022 } |
2023 const int BUFFER_SIZE = 1024; | 2023 const int BUFFER_SIZE = 1024; |
2024 char maxine_dir[BUFFER_SIZE]; | 2024 char maxine_dir[BUFFER_SIZE]; |
2025 char temp[BUFFER_SIZE]; | 2025 char temp[BUFFER_SIZE]; |
2026 if (!os::getenv("MAXINE", maxine_dir, sizeof(maxine_dir))) { | 2026 if (!os::getenv("MAXINE", maxine_dir, sizeof(maxine_dir))) { |
2027 fatal("Must set MAXINE environment variable to a Maxine project directory."); | 2027 jio_fprintf(defaultStream::output_stream(), "Error while starting Graal VM: The MAXINE environment variable needs to point to a Maxine repository.\n"); |
2028 vm_exit(0); | |
2028 } | 2029 } |
2029 if (PrintVMOptions) tty->print_cr("MAXINE=%s", maxine_dir); | 2030 if (PrintVMOptions) tty->print_cr("MAXINE=%s", maxine_dir); |
2030 SysClassPath scp_compiler(Arguments::get_sysclasspath()); | 2031 SysClassPath scp_compiler(Arguments::get_sysclasspath()); |
2031 sprintf(temp, "%s/com.oracle.max.cri/bin", maxine_dir); | 2032 sprintf(temp, "%s/com.oracle.max.cri/bin", maxine_dir); |
2032 scp_compiler.add_prefix(temp); | 2033 scp_compiler.add_prefix(temp); |
2033 sprintf(temp, "%s/com.oracle.max.criutils/bin", maxine_dir); | 2034 sprintf(temp, "%s/com.oracle.max.criutils/bin", maxine_dir); |
2034 scp_compiler.add_prefix(temp); | 2035 scp_compiler.add_prefix(temp); |
2035 sprintf(temp, "%s/com.oracle.max.base/bin", maxine_dir); | 2036 sprintf(temp, "%s/com.oracle.max.base/bin", maxine_dir); |
2036 scp_compiler.add_prefix(temp); | 2037 scp_compiler.add_prefix(temp); |
2037 sprintf(temp, "%s/com.oracle.max.asmdis/bin", maxine_dir); | 2038 sprintf(temp, "%s/com.oracle.max.asmdis/bin", maxine_dir); |
2038 scp_compiler.add_prefix(temp); | 2039 scp_compiler.add_prefix(temp); |
2039 sprintf(temp, "%s/com.oracle.max.asm/bin", maxine_dir); | 2040 sprintf(temp, "%s/com.oracle.max.asm/bin", maxine_dir); |
2040 scp_compiler.add_prefix(temp); | 2041 scp_compiler.add_prefix(temp); |
2041 sprintf(temp, "%s/com.oracle.max.graal.graph/bin", maxine_dir); | 2042 sprintf(temp, "%s/com.oracle.max.graal.graph/bin", maxine_dir); |
2042 scp_compiler.add_prefix(temp); | 2043 scp_compiler.add_prefix(temp); |
2043 sprintf(temp, "%s/com.oracle.max.graal.compiler/bin", maxine_dir); | 2044 sprintf(temp, "%s/com.oracle.max.graal.compiler/bin", maxine_dir); |
2044 scp_compiler.add_prefix(temp); | 2045 scp_compiler.add_prefix(temp); |
2045 sprintf(temp, "%s/com.oracle.max.graal.nodes/bin", maxine_dir); | 2046 sprintf(temp, "%s/com.oracle.max.graal.nodes/bin", maxine_dir); |
2046 scp_compiler.add_prefix(temp); | 2047 scp_compiler.add_prefix(temp); |
2047 sprintf(temp, "%s/com.oracle.max.graal.snippets/bin", maxine_dir); | 2048 sprintf(temp, "%s/com.oracle.max.graal.snippets/bin", maxine_dir); |
2048 scp_compiler.add_prefix(temp); | 2049 scp_compiler.add_prefix(temp); |
2049 sprintf(temp, "%s/com.oracle.max.graal.criutils/bin", maxine_dir); | 2050 sprintf(temp, "%s/com.oracle.max.graal.criutils/bin", maxine_dir); |
2050 scp_compiler.add_prefix(temp); | 2051 scp_compiler.add_prefix(temp); |
2051 sprintf(temp, "%s/com.oracle.max.graal.extensions/bin", maxine_dir); | 2052 sprintf(temp, "%s/com.oracle.max.graal.extensions/bin", maxine_dir); |
2052 scp_compiler.add_prefix(temp); | 2053 scp_compiler.add_prefix(temp); |
2053 sprintf(temp, "%s/com.oracle.max.graal.hotspot/bin", maxine_dir); | 2054 sprintf(temp, "%s/com.oracle.max.graal.hotspot/bin", maxine_dir); |
2054 scp_compiler.add_prefix(temp); | 2055 scp_compiler.add_prefix(temp); |
2055 sprintf(temp, "%s/com.oracle.max.graal.graphviz/bin", maxine_dir); | 2056 sprintf(temp, "%s/com.oracle.max.graal.graphviz/bin", maxine_dir); |
2056 scp_compiler.add_prefix(temp); | 2057 scp_compiler.add_prefix(temp); |
2057 scp_compiler.expand_endorsed(); | 2058 scp_compiler.expand_endorsed(); |
2058 Arguments::set_compilerclasspath(scp_compiler.combined_path()); | 2059 Arguments::set_compilerclasspath(scp_compiler.combined_path()); |
2059 } | 2060 } |
2060 | 2061 |
2061 if (AggressiveOpts) { | 2062 if (AggressiveOpts) { |
2062 // Insert alt-rt.jar between user-specified bootclasspath | 2063 // Insert alt-rt.jar between user-specified bootclasspath |
2063 // prefix and the default bootclasspath. os::set_boot_path() | 2064 // prefix and the default bootclasspath. os::set_boot_path() |