By navkartech
on Tue, 01/07/2014 - 06:27
I am trying to replace Teapot with my own 3D model(Banana) . While building my own Banana.java on the lines of Teapot.java, I copied all the arrays from banana.h to Banana.java. I recieved an error -"Too many constants, the constant pool for Banana would exceed 65536 enteries" . Any idea how to get rid of this error?
Error in eclipse when copying arrays from banana.h to Banana.jav
Hi, you cannot copy C++ code from a .h file to a Java file, unless you adjust the code to turn it into a Java equivalent.
Error in eclipse when copying arrays from banana.h to Banana.jav
By the statement " While building my own Banana.java on the lines of Teapot.java, I copied all the arrays from banana.h to Banana.java." - I meant
Error in eclipse when copying arrays from banana.h to Banana.jav
Ok, thanks for the clarification:
Error in eclipse when copying arrays from banana.h to Banana.jav
Yes. Reading cordinates and populating the array from a text file looks like a good option. Thanks a lot for the suggestion.
Error in eclipse when copying arrays from banana.h to Banana.jav
you're welcome.
Error in eclipse when copying arrays from banana.h to Banana.jav
Hi I need some help
Error in eclipse when copying arrays from banana.h to Banana.jav
but how to call the array file from the a java class . I have added the text file in the assest folder. Is there any mean to retrieve it from the folder and using it
Error in eclipse when copying arrays from banana.h to Banana.jav
Hi,
I am also generating .h file for my 3D object and then trying to copy the arrays into the java file. it compiles well and run too but then the app hangs up instead of loading the object. Can anyone tell me what is the problem with that ?
Thanks.
Error in eclipse when copying arrays from banana.h to Banana.jav
I read the solution below:
"You would neew to create the Java vertex arrays differently (e.g. reading the Banana.h as a text file, and extract the coordinates programmatically, and then build your arrays programmatically)."
Error in eclipse when copying arrays from banana.h to Banana.jav
Just implement a simple text parser in Java to read the comma-separated coordinates one by one, as they appear in the .h file.