HADOOP-8951. RunJar to fail with user-comprehensible error message if jar missing. Contributed by Steve Loughran.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1400921 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
35ec20b7c6
commit
0dc2681900
|
@ -269,6 +269,9 @@ Trunk (Unreleased)
|
|||
HADOOP-8918. test-patch.sh is parsing modified files wrong.
|
||||
(Raja Aluri via suresh)
|
||||
|
||||
HADOOP-8951. RunJar to fail with user-comprehensible error
|
||||
message if jar missing. (stevel via suresh)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HADOOP-7761. Improve the performance of raw comparisons. (todd)
|
||||
|
|
|
@ -126,6 +126,10 @@ public class RunJar {
|
|||
int firstArg = 0;
|
||||
String fileName = args[firstArg++];
|
||||
File file = new File(fileName);
|
||||
if (!file.exists() || !file.isFile()) {
|
||||
System.err.println("Not a valid JAR: " + file.getCanonicalPath());
|
||||
System.exit(-1);
|
||||
}
|
||||
String mainClassName = null;
|
||||
|
||||
JarFile jarFile;
|
||||
|
|
Loading…
Reference in New Issue