mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-11 14:11:31 +08:00
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
This commit is contained in:
parent
576c9028f0
commit
7896beb27a
@ -1,3 +1,12 @@
|
||||
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>
|
||||
|
||||
* configure: Rebuilt.
|
||||
|
@ -1,6 +1,6 @@
|
||||
// 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
|
||||
|
||||
This file is part of libgcj.
|
||||
@ -552,6 +552,7 @@ _Jv_JNI_FindClass (JNIEnv *env, const char *name)
|
||||
}
|
||||
|
||||
r = loader->loadClass (n);
|
||||
_Jv_InitClass (r);
|
||||
}
|
||||
catch (jthrowable t)
|
||||
{
|
||||
|
9
libjava/testsuite/libjava.jni/findclass2.c
Normal file
9
libjava/testsuite/libjava.jni/findclass2.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <findclass2.h>
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_findclass2_searchClass (JNIEnv *env, jclass klass)
|
||||
{
|
||||
(*env)->FindClass (env, "findclass2$inner");
|
||||
}
|
19
libjava/testsuite/libjava.jni/findclass2.h
Normal file
19
libjava/testsuite/libjava.jni/findclass2.h
Normal file
@ -0,0 +1,19 @@
|
||||
/* 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__ */
|
BIN
libjava/testsuite/libjava.jni/findclass2.jar
Normal file
BIN
libjava/testsuite/libjava.jni/findclass2.jar
Normal file
Binary file not shown.
24
libjava/testsuite/libjava.jni/findclass2.java
Normal file
24
libjava/testsuite/libjava.jni/findclass2.java
Normal file
@ -0,0 +1,24 @@
|
||||
// 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();
|
||||
}
|
||||
}
|
1
libjava/testsuite/libjava.jni/findclass2.out
Normal file
1
libjava/testsuite/libjava.jni/findclass2.out
Normal file
@ -0,0 +1 @@
|
||||
hello
|
Loading…
x
Reference in New Issue
Block a user