Re: [abc-users] problem : "Bad class file" producing .class file from the .ppg file

From: Khalid Al-Jasser <k.al-jasser@pgrad.unimelb.edu.au>
Date: Tue Aug 01 2006 - 06:49:57 BST

Hi again,,
Yes,, the problem still exist in abc 1.2
in the following, I will try to give a detailed description of the steps I
did:
___________________________________
the "bad class file" problem
Detailed description:
1- Installation:
install Abc 1.2 into the following directory
C:\Java\abc-1.2.0

2- Test a simple example with the eaj extension
>>abc -ext abc.eaj cflows.java OK
>>java cflows OK

3-try to modify the eaj extension
unzip the "abc-complete.jar" into abc folder --> C:\Java\abc-1.2.0\lib\abc
remove the "abc-complete.jar" from the CLASSPATH, and
add "C:\Java\abc-1.2.0\lib\abc" to the CLASSPATH instead.

try the example in step 2 again-- just to make sure that every thing is OK
---->Compile and run ---> OK

4- copy neccesary source files for the eaj extension (.java and .ppg files)

5- try to parse the eaj.ppg file to produce the Grm.class file
>>C:\Java\abc-1.2.0\lib\abc\eaj\parse>java ppg.PPG -o Grm.class eaj.ppg

this step goes OK but the class file it produces is different from the one
that comes with the abc distribution!!!
Old Grm.class size=107.522 KB --> can be decompiled
New Grm.class size=128.282 KB --> can't be decompiled

6- try to compile the eaj extension with the new "Grm.class" file
>> C:\Java\abc-1.2.0\lib\abc\eaj>javac *.java
>> ExtensionInfo.java:24: cannot access abc.eaj.parse.Grm
>> bad class file: C:\Java\abc-1.2.0\lib\abc\eaj\parse\Grm.class
>> <---------------
>> illegal start of class file
>> Please remove or make sure it appears in the correct subdirectory of the
>> classpath.
>> import abc.eaj.parse.Grm;
>> ^
>> 1 error

sorry for the long description,,, I wanted to make every thing clear.

QUESTIONS:
- Am I doing some thing wrong in my steps?
- Is the command (java ppg.PPG -o Grm.class eaj.ppg) that I used to parse
the .ppg file right?

any help will be greatly appreciated

best regards,
----------------------------
Khalid A. Al-Jasser
Dept. of Computer Science and Software Engineering
The University of Melbourne
Australia
Ph : (03) 83441357

----- Original Message -----
From: "Eric Bodden" <eric.bodden@mail.mcgill.ca>
To: <k.al-jasser@pgrad.unimelb.edu.au>
Cc: <abc-users@comlab.ox.ac.uk>
Sent: Tuesday, August 01, 2006 2:17 PM
Subject: RE: [abc-users] problem : "Bad class file" producing .class file
from the .ppg file

Ok, thanks for the feedback. So just let me know in case the problem
persists with abc 1.2. If so, please raise a bug in Bugzilla and include a
full set of the classed you process and the commandline you use if possible.

Cheers,
Eric

> -----Original Message-----
> From: Majordomo list server [mailto:majordomo@comlab.ox.ac.uk] On
> Behalf Of Khalid Al-Jasser
> Sent: Monday, July 31, 2006 6:38 PM
> To: abc-users@comlab.ox.ac.uk
> Subject: Re: [abc-users] problem : "Bad class file" producing .class
> file from the .ppg file
>
> Hi,
> thanks Eric for your reply.
> this is the configuration I use:
> Abc version 1.1.1
> Java version "1.4.2_05"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
> Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
> CLASSPATH=
> .;C:\Java\Java1.4\lib;C:\Java;C:\Java\AspectJ5\lib\aspectjrt.jar;C:\Jav
> a\abc-1.1.1\lib;C:\Java\abc-1.1.1\lib\abc-complete;C:\Java\abc-
> 1.1.1\lib\polyglot.jar
>
> every thing seems fine in this configuration as I was able to compile
> some
> abc programs and run them without any problems.
> I will give the abc 1.2 a try and see if the problem still exist!!
> Eric: sorry for the late reply,, I was ill in the past few days :-(
> best regards,
> Khalid Aljasser
> The University of Melbourne
> Australia
>
> ----- Original Message -----
> From: "Eric Bodden" <eric.bodden@mail.mcgill.ca>
> To: <abc-users@comlab.ox.ac.uk>
> Sent: Wednesday, July 26, 2006 11:04 PM
> Subject: RE: [abc-users] problem : "Bad class file" producing .class
> file
> from the .ppg file
>
>
> Hello.
>
> First of all, this error seems strange to me because it is definetely
> not
> what we are seeing here. It might have to do with an unusual classpath
> setup
> an hence different versions of different abc components being mixed up.
> What
> version of abc do you use? What does your classpath look like? Why are
> you
> not using our Ant build script (which should help avoid such path
> problems)?
>
> Hope that helps,
> Eric
>
> --
> Eric Bodden
> Sable Research Group
> McGill University, Montréal, Canada
>
>
>
> -----Original Message-----
> From: Majordomo list server on behalf of Khalid Al-Jasser
> Sent: Tue 7/25/2006 23:14
> To: abc-users@comlab.ox.ac.uk
> Subject: [abc-users] problem : "Bad class file" producing .class file
> from
> the .ppg file
>
> Hi,
> when I parse the grammar file i.e. .ppg file every thing goes ok
> >>java ppg.PPG -o Grm.class eaj.ppg -> ok
>
> but when I compile my extension, it gives this error "Bad class file"
> >>javac *.java
> > ExtensionInfo.java:72: cannot access abc.eaj.parse.Grm
> > bad class file: ...\abc-complete\abc\eaj\parse\Grm.class illegal
> start of
> > class file
> > Please remove or make sure it appears in the correct subdirectory of
> the
> > classpath.
> > Grm grm = new Grm(lexer, ts, nf, eq);
>
> please note that this error happens even if I don't do any modification
> to
> the .ppg file
>
> thanks
> Khalid A. Al-Jasser
> The University of Melbourne
> Australia
>
>
>
>
>
>
>
>
>
>
Received on Tue Aug 01 06:51:44 2006

This archive was generated by hypermail 2.1.8 : Mon Aug 28 2006 - 10:20:08 BST