Commit d6383631 by Tom Tromey Committed by Tom Tromey

* gnu/gcj/runtime/FirstThread.java (getMain): Fixed indentation.

From-SVN: r71998
parent 1358cdc5
2003-10-01 Tom Tromey <tromey@redhat.com>
* gnu/gcj/runtime/FirstThread.java (getMain): Fixed indentation.
2003-10-01 Andrew Haley <aph@redhat.com> 2003-10-01 Andrew Haley <aph@redhat.com>
* java/lang/natClass.cc (initializeClass): Check for otable and * java/lang/natClass.cc (initializeClass): Check for otable and
......
// FirstThread.java - Implementation of very first thread. // FirstThread.java - Implementation of very first thread.
/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation /* Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation
This file is part of libgcj. This file is part of libgcj.
...@@ -57,22 +57,21 @@ final class FirstThread extends Thread ...@@ -57,22 +57,21 @@ final class FirstThread extends Thread
private String getMain (String name) private String getMain (String name)
{ {
String mainName = null; String mainName = null;
try { try
{
JarFile j = new JarFile (name); JarFile j = new JarFile(name);
Attributes a = j.getManifest().getMainAttributes();
Attributes a = j.getManifest().getMainAttributes(); mainName = a.getValue(Attributes.Name.MAIN_CLASS);
}
mainName = a.getValue(Attributes.Name.MAIN_CLASS); catch (Exception e)
{
} catch (Exception e) { // Ignore.
// empty }
}
if (mainName == null) if (mainName == null)
{ {
System.err.println ("Failed to load Main-Class manifest attribute from\n" System.err.println("Failed to load Main-Class manifest attribute from "
+ name); + name);
System.exit(1); System.exit(1);
} }
return mainName; return mainName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment