1

Can anyone help me on this topic, i am a beginner with javafx 2.0 and really want to crack this. I have a method called draw(Stage primaryStage) which contains different shape codes. However when i try running the code i get this message

code too large private void draw(Stage primaryStage){...

I have tried reducing the amount of shapes produced and it seems to work fine, but realistically all the shapes in the method are needed and preferably in the same class. Is there a solution or a work around this issue..??

Thank you.

Chika.

mre
  • 43,520
  • 33
  • 120
  • 170
Chika
  • 103
  • 1
  • 1
  • 4
  • Possible duplicate - http://stackoverflow.com/questions/2407912/code-too-large-compilation-error-in-java – mre Oct 31 '11 at 16:57

2 Answers2

0

If you seriously have a method that exceeds 64KB of bytecode, then you have a serious design flaw and need to seriously consider refactoring. Seriously.

mre
  • 43,520
  • 33
  • 120
  • 170
0

For similar activities, try to use methods which creates your shapes and sets it's properties based on the passed parameters.

dipacs
  • 197
  • 3