# native methods and ClassLoaders

Godmar Back (gback@fast.cs.utah.edu)
Mon, 13 Apr 1998 10:49:24 -0600 (MDT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Enrique Martinez: "request .."
- Previous message: Robert Weingruber: "Question"
- Next in thread: Li Gong: "Re: native methods and ClassLoaders"

    From: gback@fast.cs.utah.edu (Godmar Back)

    Message-Id: <199804131649.KAA22431@fast.cs.utah.edu>

    Subject: native methods and ClassLoaders

    To: java-security@web2.javasoft.com

    Date: Mon, 13 Apr 1998 10:49:24 -0600 (MDT)

Hi,

this is a question concerning JDK 1.1.5.

* Can a class defined by a class loader via defineClass have any
native methods?

* Clearly, some classes cannot be redefined(*): calling defineClass for
java/lang/Object, for instance, will cause an "UnknownError" be thrown.
Other classes, such as java.lang.Throwable cannot be redefined because
then the verifier will find an athrow instruction doesn't throw a
Throwable. I strongly suspect that java.lang.Class can't be
redefined, either. Here's my question:
Even though I read the JDK documentation, the language specification
and the VM specification I could not find any statement telling me just
exactly *what* classes can or cannot be redefined. Is this an oversight,
or is this intentionally vague and left to the implementation?

Thank you,

Godmar (gback@cs.utah.edu)

ps: please cc: me on the reply.

(*) By "redefined" I mean to call defineClass with the bytes read from
classes.zip.

- Next message: Enrique Martinez: "request .."
- Previous message: Robert Weingruber: "Question"
- Next in thread: Li Gong: "Re: native methods and ClassLoaders"