Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » code segment has wrong length
code segment has wrong length [message #180416] Wed, 15 November 2006 19:45 Go to next message
Eclipse User
Originally posted by: mika.villafinn.net

I hope this is the right group.

I have a problem and I have asked about it from JFreeChart forums and I
get cople of answers but it didn't help so I ask here.

When I launch my application from eclipse it works fine but when I
create jar file and launch it - it starts and everything else works but
charts which are created with JFreeChart-packages.

I put the error here what it gives :
Exception in thread "AWT-EventQueue-0" java.lang.ClassFormatError: Code
segment
has wrong length in class file org/jfree/chart/ChartFactory

Do somebody know what is the problem and if someone knows it
.....please,please tell it to me.

Mika Suomi
mika@villafinn.net
Re: code segment has wrong length [message #180890 is a reply to message #180416] Sun, 19 November 2006 11:09 Go to previous message
Asaf Yaffe is currently offline Asaf Yaffe
Messages: 333
Registered: July 2009
Senior Member
Mika Suomi wrote:
>
> When I launch my application from eclipse it works fine but when I
> create jar file and launch it - it starts and everything else works but
> charts which are created with JFreeChart-packages.
>
> I put the error here what it gives :
> Exception in thread "AWT-EventQueue-0" java.lang.ClassFormatError: Code
> segment
> has wrong length in class file org/jfree/chart/ChartFactory
>

This error suggests that there are problems in the compilation process
of class org.jfree.chart.ChartFactory.
1. Did you compile this class from source code or using it as a binary
you downloaded from somewhere? If this is the case, then contact the
vendor of this class.
2. If you did compile from source - did you use the Eclipse compiler to
create your JAR file(s), or an external compiler (some version of
javac...) launched from a build script (such as Ant)? If you used the
Eclipse compiler, then you may have found a bug in the Eclipse Java
compiler (unlikely). If you used an external compiler, try switching to
another one (a newer version?) and check again.

Another possible cause for this problem is that the binary code of
org.jfree.chart.ChartFactory was modified during execution by a tool
such as a profiler or a debugger (a technique known as Byte Code
Instrumentation). Are you using such a tool? If so, contact the tool vendor.

HTH!
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, Platform Project (JVMTI Profiler)
Previous Topic:where are codes generated by WTP tools
Next Topic:JFace/SWT
Goto Forum:
  


Current Time: Thu Oct 30 13:49:17 GMT 2014

Powered by FUDForum. Page generated in 0.10962 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software