Loading...
Logo
Processing Forum
Hello, I'm having trouble with a sketch I downloaded.  

I'm getting an error "the package 'com.sun.opengl.util' does not exist.  you may be missing a library"

I found this thread 

that suggests it is bundled in with processing.  In the thread, it is suggested that adding 
import processing.opengl.*;
 at the start of the sketch should solve the problem, andf i assume since that's the end of the thread that it worked for that person.  It hasn't worked for me, however.  What am I missing here?

Thank you in advance.

Replies(12)

Your installation of Processing may be missing JOGL. Can you try running the built-in examples under Libraries -> OpenGL?
Ah, it appears to be a problem with Processing 2 Alpha.  Opening the sketch in 1.5 fixes the issue.  Erm, how can I update the patch to match Processing's new features?  

For reference, I'm attempting to run MSA Visuals' patch called "MSA Fluid"


Or, maybe I should just write to them? 

Or maybe I should just stick to 1.5 for now :D
same problem here. did you find a solution?

Did it maybe also got added to the core?
If so, how would i access GLUT for example?

Memo hasn't updated that library for a few years, and maybe never will - he's made a much more extensive implementation of it for openFrameworks.

That being said, it wouldn't hurt to write him, as now that the OpenGL renderer in Processing has been improved, maybe he would be interested in making it compatible with 2.0... 

Also, it is an open source lib... anyone could update it and recompile for 2.0 if they invested enough time in it... ?!?

and @mr.t - no, this library did not get added to the core, and I don't see that happening (maybe toxiclibs one day  )... 
the MSA library uses OpenGL, and thus GLUT, but that's a separate question... (pls start a new topic or search the forums first)
Hey Jesse! I understood the topic here is:

"I'm getting an error "the package 'com.sun.opengl.util' does not exist.  you may be missing a library" on processing Alpha.

Not necessairy MSA fluid.

My problem is the same. Trying to include opengl.util again.
Goal different yes. As I need GLUT and zombience MSA fluid.

But I don't see the problem here.
 
Ok, sorry, my bad.

Well then, can you start again by providing some details on your situation (OS, Java Version, Graphics Card, Processing Version, sample code, error messages...) Et cetera... 


Ok. sorry if i wasn't clear enough.
I thought this is a much more fundamental issue.

i am on Lion with a fairly new MBP.
java 1.7

Processing I tried are the last 2.0b3 and 2.0b5
As mentioned this problem appears only with the alphas. 1.5.1 is fine.

Copy code
  1. import com.sun.opengl.util.*;
  2. GLUT glut;

  3. glut = new GLUT();

gives me:

The package " com.sun.opengl* does not exist. You might be missing a library.

I explored a bit the OpenGL jars in the b5.
While GLUT was indeed in the package com.sun.opengl.util in Processing 1.5.1, it seems to be located now in com.jogamp.opengl.util.gl2. I suppose it corresponds to the move from OpenGL 1 to OpenGL 2...
thanx philho! that's a good hint.

but when I import the com.jogamp.opengl.util.gl2
it wierdly tells me:

No library found for com.jogamp.opengl.util.gl2

(and what's up whith the colors here in the forum actually!?)

but it does compile initializing the GLUT.

Then again it throws me an error on the PGraphicsOpenGL.
Which I don't get when not importing com.jogamp.opengl.util.gl2 and not initializing GLUT.

pgl.gl cannot be resolved or is not a field

What I am trying to do is get an old sketch ported to the beta which needs all of these:

Copy code
  1. import codeanticode.glgraphics.*;
  2. import processing.opengl.*;
  3. import javax.media.opengl.*;
  4. import javax.media.opengl.glu.GLU;
  5. import com.sun.opengl.util.*;

  6. PGraphicsOpenGL pgl;
  7. GL gl;
  8. GLU glu;
  9. GLUT glut;
  10. void setup() {
  11.   size(800, 600,OPENGL);
  12.   glut = new GLUT();
  13.   glu = new GLU();
  14.   pgl = (PGraphicsOpenGL) g;
  15.   gl = pgl.gl;
  16. }

But i guess it's not that straight forward, to port the old OpenGL to the new OpenGL 2, is it?

" and what's up whith the colors here in the forum actually!?"
https://forums.zoho.com/topic/color-button-is-broken

" i guess it's not that straight forward, to port the old OpenGL to the new OpenGL 2"
Probably. I never took the time to really learn to use OpenGL, so I can't answer.
Hi All, I am sorry if I am asking again or missing some of the info that was already said.
But I think I was confuse when the conversation went to a more deep level.

I am trying to execute the example of MSAfluidDemo in the last version of P5 (2.0.1) and I got the same error :

No library found for com.sun.opengl.util
Libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder.


If I understood well, the opengl settings for this library has not been updated for this version ?
There is anyway to make it works ?

Thanks!

Try it with 1.5.1?