packaged/unpackaged JNI access

Heitzso heitzso@growthmodels.com
Wed Mar 8 16:50:00 GMT 2006


Here's the forum link that also discusses this problem
http://forum.java.sun.com/thread.jspa?threadID=528805&messageID=2542539

> My app's java classes all live in:
>    com/visassist/cuelinereader
> such as
>    com/visassist/cuelinereader/CueLineReader.java
> and I have a 'package' line at the top such as
>    package com.visassist.cuelinereader;
> so CueLineReader.class is a packaged class.
> Starting it up on a 'java' line requires me to
> spec the package path out to the class.
>
> In comparison, the Quadmore java/jni/c setup does
> not use any package path.  There is no
> 'package' line in their code.  Hence it is an
> unpackaged class.  Not sure how else to refer
> to it.  Not meaning it has been unpacked, but rather
> it never lived in a package hierarchy.
>
> As of 1.4, I believe, it is no longer possible to mix
> packaged and unpackaged classes.  The class
> loader refuses to find an unpackaged class from
> within a packaged class.
>
> This problem is discussed somewhat at the
> quadmore site
>    http://www.quadmore.com/JAVA_to_SAPI/
>
> I also ran across a sun forum discussion that
> mentions it and the reflection kludge but am not
> able to quickly google back to that web page. Prior JVMs allowed the 
> mix.  Current do not.
>
>>>>>>> Heitzso>     Does gcj follow the 1.4 spec and block access across
>>>>>>> Heitzso>     packaged and unpackaged classes?
>>>>>>>
>>>>>>> I'm afraid I don't understand the question.
>>>>>>> What do you mean by a 'packaged' class?
>>>>>>>
>>>>>>> Tom
>>>>>>>           
>>>>>>
>



More information about the Java mailing list