[x3d-public] Java problem raises its head again. code too large

John Carlson yottzumm at gmail.com
Sun Dec 31 08:32:36 PST 2023


(Ignore annotation note)

>From X3dToJava.xslt (Don’s generated Java)
=======================================================
$ javac -J-Xss1g -J-Xmx4g -cp /c/Users/john/pythonSAI/X3DJSAIL.4.0.full.jar
net/x3djsonld/data/GrampsAnimations.java
Note: Annotation processing is enabled because one or more processors were
found
  on the class path. A future release of javac may disable annotation
processing
  unless at least one processor is specified by name (-processor), or a
search
  path is specified (--processor-path, --processor-module-path), or
annotation
  processing is enabled explicitly (-proc:only, -proc:full).
  Use -Xlint:-options to suppress this message.
  Use -proc:none to disable annotation processing.
net\x3djsonld\data\GrampsAnimations.java:76469: error: code too large
                private MFVec2f getTextureCoordinate_14_561_point()
                                ^
net\x3djsonld\data\GrampsAnimations.java:68: error: too many constants
public class GrampsAnimations
       ^
2 errors
===========================================================
>From JavaSerializer.js: (my generated Java)
===========================================================
john at DESKTOP-8OPL3IE MINGW64 ~/X3DJSONLD/src/main/java (master)
$ javac -J-Xss1g -J-Xmx4g -cp /c/Users/john/pythonSAI/X3DJSAIL.4.0.full.jar
net/coderextreme/data/GrampsAnimations.java
Note: Annotation processing is enabled because one or more processors were
found
  on the class path. A future release of javac may disable annotation
processing
  unless at least one processor is specified by name (-processor), or a
search
  path is specified (--processor-path, --processor-module-path), or
annotation
  processing is enabled explicitly (-proc:only, -proc:full).
  Use -Xlint:-options to suppress this message.
  Use -proc:none to disable annotation processing.
net\coderextreme\data\GrampsAnimations.java:47: error: code too large
    public X3D initialize() {
               ^
1 error
============================================================
It appears like I again have hit the limit on the size of the initialize
method, which I thought I had conquered, a long time ago.  Probably by
removing large files from the build, which I may do again.

The size of the initialize method in both cases is around 850 lines.  Ouch!

Ideas for splitting up this Java scenegraph/object model welcome.  My first
idea is to split off ROUTEs and OrientationInterpolators, or combine
children into array of children, instead of using addChild.
============================================================
There appear to be compilers that don't have this problem:
Java: Code too large for Oracle's javac is not so for Eclipse - Stack
Overflow
<https://stackoverflow.com/questions/43973395/java-code-too-large-for-oracles-javac-is-not-so-for-eclipse>

Source available on request.



John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231231/ad30dd57/attachment.html>


More information about the x3d-public mailing list