We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Does the version of Java matter
Page Index Toggle Pages: 1
Does the version of Java matter? (Read 1983 times)
Does the version of Java matter?
Feb 21st, 2010, 9:53pm
 
Does the version of Java on my computer matter, when I run processing? I was under the impression that Processing was completely self contained. Could the libraries I am using on my machine be causing errors in a sketch or exported application.
Re: Does the version of Java matter?
Reply #1 - Feb 21st, 2010, 10:38pm
 
Processing isn't self contained, but you won't be exporting elements of your own JRE when you export from Processing.  If I recall right, Processing requires Java 1.4.  I've also found it doesn't like IcedTea much.

Edit: sorry, noticed on downloads page that for Windows, there are two options: standard, and without Java.
Re: Does the version of Java matter?
Reply #2 - Feb 21st, 2010, 11:08pm
 
Hmmm I think that I should offer more explanation and be clearer  with my question.

I am running on Debian 64-bit  Lenny and I am trying to use the OPENGL lib included with Processing. When I try to run sketches using OPENGL they don't render at all. When I try to run the sketch on Debian-32 bit  OPENGL will at least display a rendering(albeit with out commands like hint() &emmisive() working this was a lie someone should turn the lights in my head on) . What I am trying to drive at is

Does the version of Java on my computer matter at all when running Processing sketches (sketches from within Processing environment)  or does Processing use elements of the native Java lib.

Could the version of Java on my computer cause  Processing errors while running a sketch?
Re: Does the version of Java matter?
Reply #3 - Feb 22nd, 2010, 4:10pm
 
Yes, Java version will make a difference...but what errors are you hitting exactly?  Any hints from the Java console?

Edit: Just read your other post.  I think the "Wrong ELF error"  was fixed in Processing 1.0.9 -- are you using the latest version?
Re: Does the version of Java matter?
Reply #4 - Feb 22nd, 2010, 7:23pm
 
I have downloaded the latest version of Processing and have also tried to compile the latest Processing build. I was not successful in either case.

The console itself doesn't offer any hints as to why Im not rendering. There is just no error the applet pops up I get a Grey background and then nothing at all.

I tried searching through the bugs page and couldn't find any thing related to the
"Wrong ELF error"  

Do you know of the link of a bug report involving this error?

I didn't completely rule out there being a problem with my system it self yet and of course.
I have to right an English paper ::sigh:: wright now so...
After I do this paper

I'm going to fresh install a version of Debian-64bit and rule out the issue being me. Until then I don't want to press the issue.
Re: Does the version of Java matter?
Reply #5 - Feb 23rd, 2010, 2:39am
 
there was a hint in the stacktrace that you posted elsewhere:

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: /home/brokenjames/sketchbook/OPENGL_yourGoingTFW/application.linux/libgluegen-rt

.so: /home/brokenjames/sketchbook/OPENGL_yourGoingTFW/application.linux/libgluegen-rt

.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)

it's using 32-bit jogl libraries on a 64-bit operating system.

Re: Does the version of Java matter?
Reply #6 - Feb 23rd, 2010, 5:23pm
 
I am going to ask how then do I point the Processing environment towards the version of Jogl that I want it to use?
Re: Does the version of Java matter?
Reply #7 - Feb 23rd, 2010, 6:00pm
 
http://www.flickr.com/photos/stopandfocus/4383824906/

Got it all sorted out finally Smiley
Still a bit quirky in deb 64-bit but everything is a little quirky in Linux.
---------------------------------------------

import processing.opengl.*;

class Sphere_the_Sphere {

 float sphereX=-5;
 float sphereY=-5;
 float sphere_rot;

 void omg_silly(float sphereX,float sphereY,float sphere_rot){

   this.sphereX=sphereX;
   this.sphereY=sphereY;
   this.sphere_rot=sphere_rot;
 }    

 void drawsphere(){
   pushMatrix();
   translate(width/2,height/2);
   rotateY(radians(sphere_rot));
   translate(sphereX,sphereY);
   sphere(3);
   popMatrix();
 }
}
//------------------------------------------------------------------------------
------------
int num=4000;
Sphere_the_Sphere[] ball = new Sphere_the_Sphere[num];
void setup(){
 size(300,300,OPENGL);
 hint(ENABLE_OPENGL_4X_SMOOTH);
 for(int i=0; i<num; i++){
   ball[i]=new Sphere_the_Sphere();
 }
}
float height_;   // this is the current height if the ellipse
float min_height=-100; // this is the ellipses lowest posible point
float max_height=100; //this is the ellipses hightest posible point
float sphereX;  // this is the ellipses calculated distance from the center of the sphere
float sphereY;
float degreez=0;
float sphere_rot=0;
int i=0;
int ww=0;
//------------------------------------------------------------------------------
-------------
void draw(){
 noStroke();
 lights();
 emissive(0, 26, 51);
 background(0);
 for(int dd=0;dd<num;dd++){
   degreez=degreez+2.7;
   if (degreez>=180){
     degreez=0;
     sphere_rot+=5;
     //  println(sphere_rot);
   }
   sphere_rot=sphere_rot+2.7;
   if (sphere_rot>=360){
     sphere_rot=0;
   }
   sphereY=cos(radians(degreez));    ///// these are the y values of the arc
   sphereX=sin(radians(degreez));    /////  these are the x values of the arc
   degreez=constrain(degreez,0,180);
   sphereX=map(sphereX,-1,1,min_height,max_height);
   sphereY=map(sphereY,-1,1,min_height,max_height);
   if(ww<num-1){
     ww++;
     ball[ww].omg_silly(sphereX,sphereY,sphere_rot);
   }
   //-----------------------------------------------------------------------------
---
   println(dd);
 }
 for(int zed=0 ; zed<num; zed++){
   ball[zed].drawsphere();
 }
 println("finish");
 save("spheres");
 noLoop();
}
//// debug for positions of all spheres
/*
for(int ded=0 ; ded<num; ded++){
println(ball[ded].sphereX );
println(ball[ded].sphereY) ;
println(ball[ded].sphere_rot);
println("---------------------------");
}
*/
Re: Does the version of Java matter?
Reply #8 - Feb 24th, 2010, 3:11am
 
> Got it all sorted out finally

can you say what you did to help the next person with the same problem? (if you can remember)

there are amd64 libraries in the processing download. did you use those? do they work with intel processors?

the one time i tried 64 bit linux (2 years ago) was a bit of a mess (flash support!) and i went back to 32 bit a couple of weeks later. maybe i should install one as a additional boot partition for stuff like this as it does seem to be causing issues.
Re: Does the version of Java matter?
Reply #9 - Feb 25th, 2010, 12:59am
 
Well I was hesitant to explain how I got it working because I really didn't do anything to fix it. Really all I did was figure out a simple hack I could do to make it work correctly.

I was trying to render something from a single frame one pass with a piece of code like this ....

import processing.opengl.*;
size( 300,300,OPENGL );
background(0);
lights();
translate(width/2,height/2);
sphere(30);


....when it didn't I assumed it was totally broke and exported it as an application to see if I could get some out put on errors. When I did this I ran into an entirely different and unrelated problem Undecided

Later on I for what ever reason ran the same piece of code inside of a setup and draw loop and everything worked correctly

import processing.opengl.*;
[color=#ff0000]void setup(){
 size( 300,300,OPENGL );
}
void draw(){
 background(0);
 lights();
 translate(width/2,height/2);
 sphere(30);
}


this worked correctly. Then I tried adding noLoop() to the end of the above program and again no render. So I decided for, what ever reason, when I run a sketch from inside processing it incorrectly renders the initial frame as being blank and then on the next passes it renders everything correctly its only this initial frame that has the problem.  I then ran this code to confirm thats what was going on....



import processing.opengl.*;
void setup(){
 size( 300,300,OPENGL );
}
int run;
void draw(){
 if ( run == 1){
   background(0);
   lights();
   translate(width/2,height/2);
   sphere(30);
 }
 if ( run == 2 ){
   println("finish");
   noLoop();
 }
 run++;
}


again everything went fine it ran a 1st pass which was expectedly blank and then rendered everything like it should have on the second pass.

One more thing to note is that if you run this piece of code......


import processing.opengl.*;

void setup(){
 size( 300,300,OPENGL );
}

int run;
void draw(){
 lights();
 translate(width/2,height/2);
 sphere(30);
 }


the background screen flickers wildly while the created GL object renders correctly as soon as you add in background(0)  to the code everything works correctly with no flicker.


For right now thats really all I have on the matter. I did not have time to check out why when exported as an application it was erroring out with something about damn elfs and fairies  Roll Eyes but I feel like thats an easy fix and its just using/referencing the wrong libraries.

Im going to submit both of these issues this as a bug since I didn't run into anything on it in the dev section when I checked. Thankfully I have the feeling we might see better Linux support for processing down along some ways especially if this thing is going to be android friendly.(Hell besides being the 64-bit version which true is a big difference Debian and android use the same kernel)

Page Index Toggle Pages: 1