Re: java.lang.VirtualMachineError: Illegal CONSTANT_Class reference




"Alex Hunsley" <lard@xxxxxxxxxxxxxxxxxxxxx> wrote in message news:4475c9c2$0$652$5a6aecb4@xxxxxxxxxxxxxxxxxxxx
Going slightly nutso here...
I'm working on a MIDP Java project. It compiles fine, but at runtime I get the following:

java.lang.VirtualMachineError: Illegal CONSTANT_Class reference

This happens when I assign a newly instantiated object to a private class member. I've googled for this error, and found a few scant references to it, but couldn't glean much about it.

If I use Antenna with ant to build the project it doesn't seem to have this problem (not entirely surprisingly).
Does this ring any bells with anyone?


The nitty gritty details:
Using EclipseME plugin in Eclipse 3.1.2 with the Sun Wireless Toolkit 2.2.
(Project settings: compiler compliance level 1.4, .class file compatabillity set to 1.1, source compatability is 1.3.)

The Javadocs say: "VirtualMachineError: Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating."

Could it be that you've found a bug in the JVM you're using?

- Oliver

.



Relevant Pages

  • java.lang.VirtualMachineError: Illegal CONSTANT_Class reference
    ... It compiles fine, but at runtime I get the following: ... java.lang.VirtualMachineError: Illegal CONSTANT_Class reference ... Using EclipseME plugin in Eclipse 3.1.2 with the Sun Wireless Toolkit 2.2. ... compiler compliance level 1.4, .class file compatabillity set to 1.1, source compatability is 1.3.) ...
    (comp.lang.java.programmer)
  • Re: C++/CLI is the way to go
    ... Delphi implements reference counted objects. ... So far to the mystery that nearly everything compiles to .NET seamlessly. ... other languages do with the references. ... CLR, or make that portion of the language incompatible with other CLR ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Which to use VB.NET or C#?
    ... > You can simply create your class libraries in a separate project and reference them. ... > You can then just recompile them if you wish. ... Also, precompiling a Web site compiles only that site, not any child sites. ... If a Web site contains a child folder that is marked as an application in IIS, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Namespaces - broad question
    ... that way, to make it simpler to reference them during development, instead ... use with one aspx page. ... > When VS.NEt compiles your web project, it places all the classes in one ... How can you write a page that inherits ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: share code with .net framework project
    ... reference different versions of components, ... source files, including a desktop project file and a device project file. ... The downside to this method is that it requires developers to keep both ... >> versions compiles everything but the stuff inside the DESKTOP ...
    (microsoft.public.dotnet.framework.compactframework)