Bug 185210 - NoClassDefFoundError: ava/lang/String (not 'java')
Summary: NoClassDefFoundError: ava/lang/String (not 'java')
Status: RESOLVED DUPLICATE of bug 169596
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-02 15:54 EDT by Gabriel Matter CLA
Modified: 2007-05-07 11:18 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel Matter CLA 2007-05-02 15:54:10 EDT
The Eclipse compiler can cause a java.lang.NoClassDefFoundError: ava/lang/String (not 'java/lang/String') when the compiled class is exeuted.

This test class demonstrates the bug:

public class TestEclipseCompiler {
  public static void main(String[] args) {
    boolean test = true;
    cells(new String[] {""}[0], (test ? "" : ""));
  }
  private static void cells(String s, String s2) {
  }
}

Running 'TestEclipseCompiler' causes the Error:
   Exception in thread "main" java.lang.NoClassDefFoundError: ava/lang/String

(This Error does not occur when using javac/JDK 1.6)
Comment 1 Olivier Thomann CLA 2007-05-02 21:46:14 EDT
Could you please provide the build id?
I could not reproduce with 3.2.2 or HEAD.
Comment 2 Gabriel Matter CLA 2007-05-03 05:38:00 EDT
I use Eclipse Build id: M20060921-0945 and

java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Server VM (build 1.6.0_01-b06, mixed mode)
Comment 3 Philipe Mulet CLA 2007-05-03 07:30:19 EDT
Cannot reproduce either. 
Are you using a vanilla Eclipse install ? 
Could you attach the classfile for TestEclipseCompiler ?
Comment 4 Olivier Thomann CLA 2007-05-07 11:18:00 EDT
Reproduced with 3.2.1 (which corresponds to your build id).
This is a dup of bug 169596. It is a consequence of not handling properly the anewarray bytecode. When aaload is used, the class name is not properly truncated.

*** This bug has been marked as a duplicate of bug 169596 ***