Library for Processing Services

Asked

Viewed 219 times

-1

I have the source code below, but to work I need a library I can’t find, what I can do to solve?

import ddf.minim.*;
import ddf.minim.analysis.*;
import processing.opengl.*;
import javax.media.opengl.*;
import netscape.javascript.*;
import processing.video.*;

Bola bolinhas[];


PImage imagemparticula;

PGraphicsOpenGL pgl;
GL gl;

MovieMaker mm;

Minim minim;
AudioPlayer musica;
FFT fft;


void setup() {
  size(800, 600, OPENGL);
  //mm = new MovieMaker(this, width, height, "hiphop_processing.mov",30, MovieMaker.H263, MovieMaker.HIGH);

  mm = null;

  imagemparticula = loadImage("particula.png");

  minim = new Minim(this);
  musica = minim.loadFile("music.mp3");
  musica.play();
  musica.loop();

  fft = new FFT(musica.bufferSize(), musica.sampleRate());

  bolinhas = new Bola [fft.specSize()];

  for (int i=0; i<bolinhas.length; i++) {
    bolinhas[i] = new Bola();
  }
  hint(DISABLE_DEPTH_TEST);

  background( 0 );
  image( bg, 0, 0, width, height);
}

void draw() {
  //background(bg);
  fill( 0, 30 );
  //image( bg, 0, 0, width, height );
  rect( 0, 0, width, height );
  image( bg, 0, 0, width, height);



  fft.forward(musica.mix);

  float centroX = width / 2;
  float centroY = height / 2;

  pgl = (PGraphicsOpenGL) g;
  gl = pgl.beginGL();
  gl.glEnable(GL.GL_BLEND);
  gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE);
  pgl.endGL();

  fill(255);
  text("Press space to record a video", 20, 20);

  for (int i=0; i<bolinhas.length; i++) {
    bolinhas[i].mover();
    bolinhas[i].desenhar();
    bolinhas[i].elastico(centroX, centroY, 100);
    float val = fft.getBand( i ) + 1;
    float forcaX = random( -val, val );
    float forcaY = random( -val, val );
    bolinhas[i].forca(forcaX, forcaY);
  }
  if ( mm != null ) {   
    mm.addFrame();
  }
}

void keyPressed() {
  if (key == ' ') {
    if ( mm == null ) {
      mm = new MovieMaker(this, width, height, "hiphop_processing.mov",30, MovieMaker.H263, MovieMaker.HIGH);
    } 
    else {
      mm.finish();  // Finish the movie if space bar is pressed!
    }
  }
}
  • 1

    this and Processing and the library you ask for is NETSCAPE

  • 1

    @Barofscas Give more details about what you need (what error is occurring), because the information in your question is very vague.

  • the mistake it gives me is the lack of the library which I can not find internet

  • What is the name of the library?

  • NETSCAPE is the library name

  • Would that be here?

  • I can’t get it out of you

  • Can’t get down?

  • can’t

  • Try to download individually: Jsexception, Jsobject, Jsutil

  • and add these files where?

Show 6 more comments

1 answer

1

The missing lib Netscape.javascript is part of the Java JDK.

Netscape.Javascript

Simply go find the path to the plugin.jar file that is within a subfolder of the JDK installation, and add to the classpath of the IDE you use.

If you use older versions (JDK < 1.2), the plugin.jar file appears with the name Jaws.jar.

The path to add to classpath will be something like:

..\jdk1.X. X jre lib plugin.jar

..\jdk1.2.X jre lib Jaws.jar

  • but add where this?

  • Which IDE do you use? Eclipse, Netbeans, etc...

  • where do I see it? I use IDE I do not know

  • What program do you use to compile the code...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.