You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by fiji kalathil <fi...@yahoo.com> on 2005/11/07 15:03:04 UTC

"class file has wrong version 48.0, should be 47.0"

Hi, 
 
i am using commons-net-1.4.0.jar in my proj 
 
i am getting the followinf compilation error
 
src/com/covad/ccbi/operations/InfBillingOps.java:5347: cannot access org.apache.commons.net.ftp.FTPClient
    [javac] bad class file: /home/fkp/DECEMBER-2005-dev/ccbi/lib/jakarta/commons-net-1.4.0.jar(org/apache/commons/net/ftp/FTPClient.class)
    [javac] class file has wrong version 48.0, should be 47.0
    [javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
    [javac]             FTPClient ftp = new FTPClient();
 
 
I can't compile the file.
 
please advice on this
 
thanks
Fiji
 

		
---------------------------------
 Yahoo! FareChase - Search multiple travel sites in one click.  

Re: [net] "class file has wrong version 48.0, should be 47.0"

Posted by Steve Cohen <sc...@javactivity.org>.
Mario Ivankovits wrote:
> For details: 
> http://www.javaworld.com/javaqa/2003-05/02-qa-0523-version-p2.html
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 
> 
Wow, as long as I'm in this game there's still stuff to learn.  Thank you.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [net] "class file has wrong version 48.0, should be 47.0"

Posted by Mario Ivankovits <ma...@ops.co.at>.
For details: 
http://www.javaworld.com/javaqa/2003-05/02-qa-0523-version-p2.html


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [net] "class file has wrong version 48.0, should be 47.0"

Posted by Steve Cohen <sc...@javactivity.org>.
Mario Ivankovits wrote:
> Hi!
> 
>> However, I'm not entirely sure how you are inferring that the problem 
>> here is 1.3 vs. 1.4.  You may know something I don't.  I'm not sure 
>> where the version 48.0 vs 47.0 is coming from.  I've never seen that 
>> before.
> 
> This happens if you compile with javac target=1.4 but running it in an 
> java 1.3 environment.
> If I remember correctly java 5.0 is version 49.0
> 
> To be safe for the future you could use "target=1.3" for your javac 
> command. So as long as you do not use a 1.4 api you should be safe.
> 
> Maven - project.properties:
> maven.compile.target = 1.3
> maven.compile.source = 1.3
> 
> 
> ---
> Mario
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 
> 
Good idea!

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


RE: [net] "class file has wrong version 48.0, should be 47.0"

Posted by James Carman <ja...@carmanconsulting.com>.
>From the commons-net project.properties file:

"maven.compile.target=1.4"

So, for some reason it is specifically targeting 1.4.

-----Original Message-----
From: Mario Ivankovits [mailto:mario@ops.co.at] 
Sent: Tuesday, November 08, 2005 7:55 AM
To: Jakarta Commons Developers List
Subject: Re: [net] "class file has wrong version 48.0, should be 47.0"

Hi!
> However, I'm not entirely sure how you are inferring that the problem 
> here is 1.3 vs. 1.4.  You may know something I don't.  I'm not sure 
> where the version 48.0 vs 47.0 is coming from.  I've never seen that 
> before.
This happens if you compile with javac target=1.4 but running it in an 
java 1.3 environment.
If I remember correctly java 5.0 is version 49.0

To be safe for the future you could use "target=1.3" for your javac 
command. So as long as you do not use a 1.4 api you should be safe.

Maven - project.properties:
maven.compile.target = 1.3
maven.compile.source = 1.3


---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [net] "class file has wrong version 48.0, should be 47.0"

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> However, I'm not entirely sure how you are inferring that the problem 
> here is 1.3 vs. 1.4.  You may know something I don't.  I'm not sure 
> where the version 48.0 vs 47.0 is coming from.  I've never seen that 
> before.
This happens if you compile with javac target=1.4 but running it in an 
java 1.3 environment.
If I remember correctly java 5.0 is version 49.0

To be safe for the future you could use "target=1.3" for your javac 
command. So as long as you do not use a 1.4 api you should be safe.

Maven - project.properties:
maven.compile.target = 1.3
maven.compile.source = 1.3


---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [net] "class file has wrong version 48.0, should be 47.0"

Posted by Steve Cohen <sc...@javactivity.org>.
Simon Kitching wrote:
> On Mon, 2005-11-07 at 06:03 -0800, fiji kalathil wrote:
> 
>>Hi, 
>> 
>>i am using commons-net-1.4.0.jar in my proj 
>> 
>>i am getting the followinf compilation error
>> 
>>src/com/covad/ccbi/operations/InfBillingOps.java:5347: cannot access org.apache.commons.net.ftp.FTPClient
>>    [javac] bad class file: /home/fkp/DECEMBER-2005-dev/ccbi/lib/jakarta/commons-net-1.4.0.jar(org/apache/commons/net/ftp/FTPClient.class)
>>    [javac] class file has wrong version 48.0, should be 47.0
>>    [javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
>>    [javac]             FTPClient ftp = new FTPClient();
>> 
>>
> 
> 
> Looks like the 1.4.0 release of commons-net was compiled using (or
> targeting) java 1.4 but you're using java 1.3. 
> 
> I suggest you check the release documentation to see whether the project
> explicitly requires java 1.4. If not, it might be a mistake; it's
> happened from time to time. You could always try downloading the source
> and recompiling with java 1.3; most jakarta projects can be built pretty
> easily.
> 
> BTW, when posting to this list please put the project name in the
> subject, eg "[net] class file has wrong version".
> 
> Regards,
> 
> Simon
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 
> 
You are correct, Simon.  There WAS a bug reported in 1.4.0 around this. 
   commons-net is NOT targeted at 1.4 and this somehow slipped through. 
  We have not done a release and maybe we should for this.

However, I'm not entirely sure how you are inferring that the problem 
here is 1.3 vs. 1.4.  You may know something I don't.  I'm not sure 
where the version 48.0 vs 47.0 is coming from.  I've never seen that before.

This user could try getting the nightly build and see if that fixes his 
problem.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [net] "class file has wrong version 48.0, should be 47.0"

Posted by Simon Kitching <sk...@apache.org>.
On Mon, 2005-11-07 at 06:03 -0800, fiji kalathil wrote:
> Hi, 
>  
> i am using commons-net-1.4.0.jar in my proj 
>  
> i am getting the followinf compilation error
>  
> src/com/covad/ccbi/operations/InfBillingOps.java:5347: cannot access org.apache.commons.net.ftp.FTPClient
>     [javac] bad class file: /home/fkp/DECEMBER-2005-dev/ccbi/lib/jakarta/commons-net-1.4.0.jar(org/apache/commons/net/ftp/FTPClient.class)
>     [javac] class file has wrong version 48.0, should be 47.0
>     [javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
>     [javac]             FTPClient ftp = new FTPClient();
>  
> 

Looks like the 1.4.0 release of commons-net was compiled using (or
targeting) java 1.4 but you're using java 1.3. 

I suggest you check the release documentation to see whether the project
explicitly requires java 1.4. If not, it might be a mistake; it's
happened from time to time. You could always try downloading the source
and recompiling with java 1.3; most jakarta projects can be built pretty
easily.

BTW, when posting to this list please put the project name in the
subject, eg "[net] class file has wrong version".

Regards,

Simon



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org