facebook

"bad class file" in JSP alidation with Java 5.0 (M

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #234515 Reply

    flan
    Member

    I just upgraded my Web project to use the Java 5.0 syntax. I am now getting validation errors in my JSPs when they reference classes compiled with the 5.0 compiler.

    An example error is:

    cannot access com.foo.Baz: bad class file: D:\dev\pql_web\WebRoot\WEB-INF\classes\com\foo\Baz.class.
    NOTE: No JSP line number was avaliable so line 1 was used for the marker.

    This appears to be because the validator uses Eclipse’s VM to validate the JSPs. This is bad because it links the project configuration to Eclipse’s environment. The validator should use the Workspace or Project JDK.

    Thanks,

    Ian

    #234550 Reply

    Scott Anderson
    Participant

    Ian,

    Yes, it looks like the validator is using an older JDK from your PATH, rather than the 1.5 version you have configured. Since they’re backward compatible, to correct the issue you’ll need to add your JDK 1.5 bin directory to the front of your external environment’s PATH and then restart Eclipse.

    #240210 Reply

    Darren Hague
    Member

    Alternatively, just change the command line parameters when you launch Eclipse, e.g.:
    “C:\Program Files\eclipse3.1\eclipse\eclipse.exe” -vm “C:\Program Files\Java\jdk1.5.0_04\jre\bin\javaw”

    Cheers,
    Darren

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: "bad class file" in JSP alidation with Java 5.0 (M

You must be logged in to post in the forum log in