Commit 7896beb2 by Marco Trudel Committed by Tom Tromey

jni.cc (_Jv_JNI_FindClass): Initialize class.

2007-01-18  Marco Trudel  <mtrudel@gmx.ch>

	* jni.cc (_Jv_JNI_FindClass): Initialize class.
	* testsuite/libjava.jni/findclass2.jar: New file.
	* testsuite/libjava.jni/findclass2.h: New file.
	* testsuite/libjava.jni/findclass2.java: New file
	* testsuite/libjava.jni/findclass2.c: New file.
	* testsuite/libjava.jni/findclass2.out: New file.

From-SVN: r120930
parent 576c9028
2007-01-18 Marco Trudel <mtrudel@gmx.ch>
* jni.cc (_Jv_JNI_FindClass): Initialize class.
* testsuite/libjava.jni/findclass2.jar: New file.
* testsuite/libjava.jni/findclass2.h: New file.
* testsuite/libjava.jni/findclass2.java: New file
* testsuite/libjava.jni/findclass2.c: New file.
* testsuite/libjava.jni/findclass2.out: New file.
2007-01-18 Tom Tromey <tromey@redhat.com> 2007-01-18 Tom Tromey <tromey@redhat.com>
* configure: Rebuilt. * configure: Rebuilt.
......
// jni.cc - JNI implementation, including the jump table. // jni.cc - JNI implementation, including the jump table.
/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 /* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation Free Software Foundation
This file is part of libgcj. This file is part of libgcj.
...@@ -552,6 +552,7 @@ _Jv_JNI_FindClass (JNIEnv *env, const char *name) ...@@ -552,6 +552,7 @@ _Jv_JNI_FindClass (JNIEnv *env, const char *name)
} }
r = loader->loadClass (n); r = loader->loadClass (n);
_Jv_InitClass (r);
} }
catch (jthrowable t) catch (jthrowable t)
{ {
......
#include <stdlib.h>
#include <findclass2.h>
JNIEXPORT void JNICALL
Java_findclass2_searchClass (JNIEnv *env, jclass klass)
{
(*env)->FindClass (env, "findclass2$inner");
}
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
#ifndef __findclass2__
#define __findclass2__
#ifdef __cplusplus
extern "C"
{
#endif
JNIEXPORT void JNICALL Java_findclass2_searchClass (JNIEnv *env, jclass);
#ifdef __cplusplus
}
#endif
#endif /* __findclass2__ */
// Test that FindClass initializes the class.
public class findclass2
{
public static class inner
{
static
{
System.out.println("hello");
}
}
public static native void searchClass();
static
{
System.loadLibrary("findclass2");
}
public static void main(String[] args)
{
searchClass();
}
}
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