prims.cc (_Jv_RunMain): Use JvNewStringUTF for command-line class name, not Latin1.
2006-05-31 Bryce McKinlay <mckinlay@redhat.com> * prims.cc (_Jv_RunMain): Use JvNewStringUTF for command-line class name, not Latin1. * gnu/java/lang/MainThread.java (run): Allow file separator char to be used in place of '.' as class-name separator. Don't chain ClassNotFoundException. From-SVN: r114300
This commit is contained in:
parent
f3d5aeebf4
commit
7d6d782d02
@ -1,3 +1,11 @@
|
||||
2006-05-31 Bryce McKinlay <mckinlay@redhat.com>
|
||||
|
||||
* prims.cc (_Jv_RunMain): Use JvNewStringUTF for command-line class
|
||||
name, not Latin1.
|
||||
* gnu/java/lang/MainThread.java (run): Allow file separator char to
|
||||
be used in place of '.' as class-name separator. Don't chain
|
||||
ClassNotFoundException.
|
||||
|
||||
2006-05-31 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||
|
||||
* java/lang/VMClassLoader.java (initialize): Set default library
|
||||
|
@ -39,6 +39,7 @@ exception statement from your version. */
|
||||
|
||||
package gnu.java.lang;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.jar.Attributes;
|
||||
import java.util.jar.JarFile;
|
||||
|
||||
@ -91,13 +92,14 @@ final class MainThread extends Thread
|
||||
{
|
||||
try
|
||||
{
|
||||
klass = Class.forName(klass_name, true,
|
||||
ClassLoader.getSystemClassLoader());
|
||||
ClassLoader cl = ClassLoader.getSystemClassLoader();
|
||||
// Permit main class name to be specified in file-system format.
|
||||
klass_name = klass_name.replace(File.separatorChar, '.');
|
||||
klass = cl.loadClass(klass_name);
|
||||
}
|
||||
catch (ClassNotFoundException x)
|
||||
{
|
||||
NoClassDefFoundError ncdfe = new NoClassDefFoundError(klass_name);
|
||||
ncdfe.initCause(x);
|
||||
throw ncdfe;
|
||||
}
|
||||
}
|
||||
|
@ -1524,7 +1524,7 @@ _Jv_RunMain (JvVMInitArgs *vm_args, jclass klass, const char *name, int argc,
|
||||
if (klass)
|
||||
main_thread = new MainThread (klass, arg_vec);
|
||||
else
|
||||
main_thread = new MainThread (JvNewStringLatin1 (name),
|
||||
main_thread = new MainThread (JvNewStringUTF (name),
|
||||
arg_vec, is_jar);
|
||||
}
|
||||
catch (java::lang::Throwable *t)
|
||||
|
Loading…
Reference in New Issue
Block a user