No media in JAR files ????????

But what the heck were you thinking ?
[http://javafx.com/docs/articles/porting-guide-javafx1-3.jsp]
MP3
MP3 files can no longer be loaded directly from .jar files. See JavaFX FAQ Section 5.3 for more information. [http://javafx.com/faq/#5.3]
*5.3 Can I include media in my JAR file?*
No. Distributing media in JAR files is not efficient and is therefore not supported at this time. However, explorations of this capability for small media files (such as short audio/video clips) might lead to this support in the future.
Media files tend to be large, so you'll want to carefully consider how to distribute media content to your audience. You don't want users to wait for long periods of time while downloading files, for instance, which would certainly be the outcome for media packaged in the JAR. Also, as media files are already compressed, packaging them in additional compressed formats like .zip or .tar files can actually result in increasing the file size.
You are strongly urged to leverage the streaming capability in JavaFX technology. Because JavaFX Media supports streaming audio/video, you can achieve very short download times (for just the application) and take advantage of the streaming capability to play media content. The streaming capability will result in much higher performance and improved usability of your applications.I think somehow you forgot to realize that the entire planet IS NOT connected 100% of time to fast speed internet and that we cannot afford to have our application stream media on the fly every time or on the first launch (and find a hack to store them locally).
We've already having as much trouble as possible trying to figure out how to deploy/distribute a real desktop or pure-offline JavaFX app with the runtime distribution issue (of which nothing was fixed in 1.3) without additionnal "stay online all the time" burden.
Additionnaly as this seems to only apply to the classes from the JavaFX API, it seems nothing prevents us from embedding the media in the JAR and using some Java+classpath code to extract them locally.
So in the end it looks more like some legal mumbo-jumbo side-effects put in place to prevent the Java store from beeing sued because some people put illegal video and musics in their apps stored over there that the very idiotic published explaination which is basically just BS (sorry).

+1
Not allowing to embed resources (MP3 are resources like icons or images or text files) is stupid and handicapping, particularly for small sound effect files we use in games.
Another step away from using JavaFX on (unconnected) desktop... :-(

Similar Messages

  • Weblogic.jar file location in  CC&B Media

    Hi Guys
    Can anyone let me know the weblogic.jar file location in CC&B 2.2 media.
    Thanks
    Aleem

    vinod hadlee wrote:
    Hi,
    We use weblogic 8.1 for our development purpose... and mostly work on ejb's. Every time a new ear file is created and deployed we need to specify the jar files needed to run that application in server classpath.... is there any alternate way so that v can avoid specifying these jar files in server classpath...One alternative is you could bundle the jars in the EAR itself in APP-INF/lib.
    Gerald

  • Loading an image into an Applet from a JAR file

    Hello everyone, hopefully a simple question for someone to help me with!
    Im trying to load some images into an applet, currently it uses the JApplet.getImage(url) method just before registering with a media tracker, which works but for the sake of efficiency I would prefer the images all to be contained in the jar file as oppossed to being loaded individually from the server.
    Say I have a class in a package eg, 'com.mydomain.myapplet.class.bin' and an images contained in the file structure 'com.mydomain.myapplet.images.img.gif' how do I load it (and waiting for it to be loaded before preceeding?
    I've seen lots of info of the web for this but much of it is very old (pre 2000) and im sure things have changed a little since then.
    Thanks for any help!

    I don't touch applets, so I can't help you there, but here's some Friday Fun: tracking image loading.
    import java.awt.*;
    import java.awt.image.*;
    import java.beans.*;
    import java.io.*;
    import java.net.*;
    import javax.imageio.*;
    import javax.imageio.event.*;
    import javax.imageio.stream.*;
    import javax.swing.*;
    public class ImageLoader extends SwingWorker<BufferedImage, Void> {
        private URL url;
        private JLabel target;
        private IIOReadProgressAdapter listener = new IIOReadProgressAdapter() {
            @Override public void imageProgress(ImageReader source, float percentageDone) {
                setProgress((int)percentageDone);
            @Override public void imageComplete(ImageReader source) {
                setProgress(100);
        public ImageLoader(URL url, JLabel target) {
            this.url = url;
            this.target = target;
        @Override protected BufferedImage doInBackground() throws IOException {
            ImageInputStream input = ImageIO.createImageInputStream(url.openStream());
            try {
                ImageReader reader = ImageIO.getImageReaders(input).next();
                reader.addIIOReadProgressListener(listener);
                reader.setInput(input);
                return reader.read(0);
            } finally {
                input.close();
        @Override protected void done() {
            try {
                target.setIcon(new ImageIcon(get()));
            } catch(Exception e) {
                JOptionPane.showMessageDialog(null, e, "Error", JOptionPane.ERROR_MESSAGE);
        //demo
        public static void main(String[] args) throws IOException {
            final URL url = new URL("http://blogs.sun.com/jag/resource/JagHeadshot.jpg");
            EventQueue.invokeLater(new Runnable(){
                public void run() {
                    launch(url);
        static void launch(URL url) {
            JLabel imageLabel = new JLabel();
            final JProgressBar progress = new JProgressBar();
            progress.setBorderPainted(true);
            progress.setStringPainted(true);
            JScrollPane scroller = new JScrollPane(imageLabel);
            scroller.setPreferredSize(new Dimension(800,600));
            JPanel content = new JPanel(new BorderLayout());
            content.add(scroller, BorderLayout.CENTER);
            content.add(progress, BorderLayout.SOUTH);
            JFrame f = new JFrame("ImageLoader");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setContentPane(content);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
            ImageLoader loader = new ImageLoader(url, imageLabel);
            loader.addPropertyChangeListener( new PropertyChangeListener() {
                 public  void propertyChange(PropertyChangeEvent evt) {
                     if ("progress".equals(evt.getPropertyName())) {
                         progress.setValue((Integer)evt.getNewValue());
                         System.out.println(evt.getNewValue());
                     } else if ("state".equals(evt.getPropertyName())) {
                         if (SwingWorker.StateValue.DONE == evt.getNewValue()) {
                             progress.setIndeterminate(true);
            loader.execute();
    abstract class IIOReadProgressAdapter implements IIOReadProgressListener {
        @Override public void imageComplete(ImageReader source) {}
        @Override public void imageProgress(ImageReader source, float percentageDone) {}
        @Override public void imageStarted(ImageReader source, int imageIndex) {}
        @Override public void readAborted(ImageReader source) {}
        @Override public void sequenceComplete(ImageReader source) {}
        @Override public void sequenceStarted(ImageReader source, int minIndex) {}
        @Override public void thumbnailComplete(ImageReader source) {}
        @Override public void thumbnailProgress(ImageReader source, float percentageDone) {}
        @Override public void thumbnailStarted(ImageReader source, int imageIndex, int thumbnailIndex) {}
    }

  • Add jar file to forms application standard java library

    Overall Problem
    I created a jar file using JDeveloper to be loaded as a bean in forms builder. But the jar file ended up being really large because I had to add some standard libraries that JDeveloper knew about but Forms didn't to this jar file, it takes forever to load in my forms application.
    Background
    Jdeveloper has a drop down list of standard libraries that aren't commonly used that a developer can have included/referenced into their java project.
    Oracle Forms Library
    One of the standard libraries in JDeveloper that can be referenced when compiling a project is the Oracle Forms library. I have to reference this library in my compilation of my java project in JDeveloper because some of the java code in this project requires the Oracle Forms library. When the jar file is created in JDeveloper the Oracle Forms Library isn't actuaally physically located anywhere in the jar file that is produced for deployment. But the jar file runs perfectly in my forms application. Forms builder and the forms application server seems to already know about the Oracle Forms library.
    Java Media Framework Library
    There is another standard library listed in JDevelopers drop down list that I recently chose to use in my Java Application, the Java Media Framework library. But my forms application couldn't find any of the Java Media Framework classes when it launched the jar file that was deployed from JDeveloper. Obviously the classes wern't physically located in the jar file I created, because I figured that the forms application server/forms builder would already know about about this standard library that JDeveloper knew about.
    Not very effective Solution
    So I physically put/included the whole Java Media Framework Library into my jar file and then my form launched fine. But it now takes forever to load. How can I add the Java Media Frame work library jar files as one of the standard libraries that the forms builder and application server already sees (Like the Oracle Forms Library) without having to put the library in the forms/java folder and wait for the this jar file to download to the user's cache?
    Side note: The Java Media Framework Library is allowing the ability to launch video from my form. Very useful tool!!! So it would be good if forms had this already added as a standard library like it is in JDeveloper. But I only see the ability to reference this library in DS 10gR2 for JDeveloper.
    Thanks,
    Michelle

    Yes I have successfully been able to run a javabean application that uses the Java Media Framework methods within a forms module. The video seems to play and interact normally in the forms environment (launched from a DS or the AS).
    Basic Requirements
    Develop the java application functionality look and feel, including adding funtionality calls to the JMF library where needed.
    Develop an Oracle Forms Interface wrapper that will be the initial class called from the bean area, to hande any communication between the bean and the form.
    Configure the deployment of the jar to physically include all the needed classes from the JMF library.
    Sign the jar file and make sure it is placed in the forms/java folder and referenced in the appropriate forms configuration files.
    Depending on the type of video that the will be played certain .dll files might need to be added to the users system folder. Using H264 (.mov) should work fine without any extra .dlls.
    Thanks,
    Michelle
    Message was edited by:
    mpoore

  • In which jar file SAP NW(EP) connector class available

    hi
    i want to know in which jar file the javaconnector class is available and i'm developing one plugin to connect sap ep to sap km repository to fetch docs from repository. for this i need some java classes so pls help me out from this problem.....
    regards

    Hallo Rupesh,
    you could have a look at the following jars:
    bc.crt_api.jar                               bc.rf.framework_api.jar                      bc.rf.repository.service.serviceacl_api.jar  bc.rf.runtime_api.jar                        bc.sf.framework_api.jar                     
    bc.sf.service.scheduler_api.jar             
    bc.util.private_api.jar                     
    bc.util.public_api.jar
    for repository actions and for Security take these two into account:
    com.sap.security.api.ep5.jar
    com.sap.security.api.jar
    Javadocs for the KM-API, e.g. SPS15:
    https://media.sdn.sap.com/javadocs/NW04/SPS15/km/index.html
    From there you can start and simply search for the class-files within SAP-jars if you need anything else.
    Hope it helps,
    regards
    Christian

  • How to get InputStream in jar file

    Could anyone give me a tip how I can play this sound file inside the application jar file?
    I have this package: *{color:#0000ff}com.sikgraf.ui{color}*
    with *{color:#ff6600}ArquivoMagneticoUI.class{color}* and {color:#ff6600}*applause.au*{color}
    I am tyring to get the InputStream but It's being painful and so far no success
    Here are the 3 ways I tried:
    InputStream is = ArquivoMagneticoUI.class.getResourceAsStream("applause.au");
    is = getClass().getResourceAsStream("applause.au");
    is = this.getClass().getClassLoader().getResourceAsStream("applause.au");All them return:
    java.lang.NullPointerException
            at java.io.FilterInputStream.mark(FilterInputStream.java:175)
            at com.sun.media.sound.WaveFileReader.getFMT(WaveFileReader.java:241)
            at com.sun.media.sound.WaveFileReader.getAudioInputStream(WaveFileReader.java:160)
            at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1094)What I am doing wrong?

    Thanks for your reply, I just figured out using URL:
        public static void playSound(int index) {
            String files[] = {"applause.au", "cash_register.au", "ding.au", "donkey_1.au", "duck_1.au", "siren_2.au"};
            String sound = "som/" + files[index];
            try {
                URL url = ArquivoMagneticoUI.class.getResource(sound);
                AudioInputStream ain = AudioSystem.getAudioInputStream(url);
                AudioFormat format = ain.getFormat();
                if (format.getEncoding() != AudioFormat.Encoding.PCM_SIGNED) {
                    format = new AudioFormat(
                            AudioFormat.Encoding.PCM_SIGNED,
                            format.getSampleRate(),
                            format.getSampleSizeInBits() * 2,
                            format.getChannels(),
                            format.getFrameSize() * 2,
                            format.getFrameRate(),
                            true);        // big endian
                    ain = AudioSystem.getAudioInputStream(format, ain);
                DataLine.Info info = new DataLine.Info(Clip.class, ain.getFormat(), ((int) ain.getFrameLength() * format.getFrameSize()));
                Clip clip;
                clip = (Clip) AudioSystem.getLine(info);
                clip.open(ain);
                clip.start();
            } catch (LineUnavailableException ex) {
                //Logger.getLogger(ArquivoMagneticoUI.class.getName()).log(Level.SEVERE, null, ex);
            } catch (UnsupportedAudioFileException ex) {
                //Logger.getLogger(ArquivoMagneticoUI.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                //Logger.getLogger(ArquivoMagneticoUI.class.getName()).log(Level.SEVERE, null, ex);
        }

  • Loading jar files and calling java stored procedure

    I am trying to load jai_core.jar, jai_codec.jar, mlibwrapper.jar and another class I created into my project schema. I am having problems with resolving all of the class using the "loadjava -resolve" command as well as using the "alter java class" command. The single class I authored is not in a valid state as well as the PL/SQL wrapper for the function I am calling.
    My questions are:
    1) Does the single class need to be in a valid state before the PL/SQL wrapper will compile and be in a valid state itself?
    2) Are there any special tricks to this becuase the code I am using below doesn't seem to be working correctly?
    3. Should I worry about "resolving/validating" all of the class from the jar file? I have read conflicting views on this topic.
    SQL> CREATE OR REPLACE FUNCTION get_image (p_fileName in varchar2, p_offset in number )
    2 RETURN blob AS LANGUAGE Java
    3 NAME 'gov.irs.rtr.image.ImageUtilityFunction.getImage (java.lang.String, int) RETURN oracle.sql.BLOB';
    4 /
    Warning: Function created with compilation errors.
    SQL> show err
    Errors for FUNCTION GET_IMAGE:
    LINE/COL ERROR
    0/0 PL/SQL: Compilation unit analysis terminated
    3/1 PLS-00311: the declaration of
    "gov.irs.rtr.image.ImageUtilityFunction.getImage
    (java.lang.String, int) RETURN oracle.sql.BLOB" is incomplete or
    malformed
    Any help would be greatly appreciated.
    Regards,
    Joey

    We are using Oracle 9.2.0.8 and I have written the single class in 1.3.1.
    The first loadjava commands I tried were:
    loadjava -user username/password -resolve -resolver '((* RTRPROD)(* PUBLIC))' jai_core.jar jai_codec.jar mlibwrapper_jai.jar
    loadjava loadjava -user username/password -resolve -resolver '((* RTRPROD)(* PUBLIC) (* -))' ImageUtility.class
    Then I tried:
    loadjava -user username/password -resolve -resolver '((* RTRPROD)(* PUBLIC) (* -))' jai_core.jar jai_codec.jar mlibwrapper_jai.jar
    errors : class javax/media/jai/operator/EncodeDescriptor
    ORA-29534: referenced object RTRPROD.com/sun/media/jai/codec/ImageCodec could not be resolved
    errors : class javax/media/jai/operator/FileStoreDescriptor
    ORA-29534: referenced object RTRPROD.com/sun/media/jai/codec/ImageCodec could not be resolved
    errors : class com/sun/media/jai/opimage/BMPRIF
    ORA-29534: referenced object RTRPROD.com/sun/media/jai/opimage/CodecRIFUtil could not be resolved
    errors : class com/sun/media/jai/opimage/CodecRIFUtil
    ORA-29534: referenced object RTRPROD.com/sun/media/jai/codec/ImageCodec could not be resolved
    errors : class com/sun/media/jai/opimage/EncodeRIF
    ORA-29534: referenced object RTRPROD.com/sun/media/jai/codec/ImageCodec could not be resolved
    errors : class com/sun/media/jai/opimage/FPXRIF
    ORA-29534: referenced object RTRPROD.com/sun/media/jai/opimage/CodecRIFUtil could not be resolved
    errors : class com/sun/media/jai/opimage/GIFRIF
    ORA-29534: referenced object RTRPROD.com/sun/media/jai/opimage/CodecRIFUtil could not be resolved
    errors : class com/sun/media/jai/opimage/IIPCRIF
    ORA-29534: referenced object RTRPROD.com/sun/media/jai/codec/ImageCodec could not be resolved
    This error messages goes on and on for 44 files.
    I have found out that JAI is part of the Oracle 9 Release 2 but is part of the InterMedia package that is not installed. I would imagine that the JAI libraries mentioned above would be included in InterMedai. However, there are several dependencies on packages distributed in the Sun JDK but not the Oracle Runtime.
    Regards,
    Joey

  • How to install a Application in *.jar file format?

    How to install a Application in *.jar file format?
    I have taken the *.jar file into the device into media folder. but device is not recognizing the file format
    could some one plz provide some suggestion to proceed with this?
    Thanks
    Mohamed Javeed

    I'm having the same problem.  I've put .jar into the 'system' folder but that doesn't seem to make the program work neverless see it on my device.  Help.

  • Jar file of - CreateResourceOrUpdateContentCommand

    Hi,
    Does anyone know the jar file for "CreateResourceOrUpdateContentCommand". When I googled it, the only reference I got was something similar to: <a href="https://media.sdn.sap.com/javadocs/NW04/SPS15/km/com/sapportals/wcm/rfadapter/ContentCreator.html">ContentCreator</a>. Even on that page, it is not specified, which jar contains this class. Nor is there any reference to it in the java docs. This class is used in the com.sapportals.wcm.control.edit.ResourceHtmlEditControl file. I am trying to edit the same to make some changes in the UI.
    Thanks in advance.
    Regards
    Ranjith

    Hi Ranjhit,
    I would suggest you to start using "JAR Class Finder" for searching the appropriate JARs . This tool really eases the search.Refer to the link <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2951">JAR CLass Finder</a> on how to use it in NDS,
    Regards,
    Sandip

  • Can't build Jar file from Sound Demo

    I've been trying to use the Sound Demo in JDK 1.3.1.02 for Windows (Windows 2000 Professional) as the basis for a program I'm writing. But I'm having some problems just being able to build it.
    problem 1 - There is a class called "Runner" that is present in the existing JavaSound.jar file, but doesn't have any corresponding .java file in the Src directory.
    I was able to work around this by using Jar to dump out the Runner.class files from the original JavaSound.jar file, then include it when I build a new one.
    problem 2 - But a bigger problem is that when I build a new Jar file, it only works if I keep the class files in the same directory as my new Jar file. If I delete them, the applet won't load & I get the error "java.lang.ClassNotFoundException: JavaSoundApplet.class".
    What's the deal with this? I'm referencing all those class files when I build the Jar file, and the manifest lists them. Why isn't it using the classes from within the Jar file?
    One last clue: The manifest from the "correct" jar file doesn't include the path to the classes, for example it lists "juke.class" while the manifest I built for my jar file lists "src/Juke.class".

    #1: I just downloaded the demo from here:
    http://java.sun.com/products/java-media/sound/samples/JavaSoundDemo/
    It did not contain a class called "Runner", so maybe we are not talking about the same demo?
    #2: You built your jar from outside of the src/ directory, so when you added the files, the jar tool preserves the folder path as well. Just build your jar from within the src/ directory and you'll be ok.
    -Ron

  • Exporting JOGL project in Eclipse to an executable jar file

    I'm currently using Eclipse on Windows as my IDE and I've gotten [JOGL |https://jogl.dev.java.net/] to work on it, however if I try to export the project (I've just got a simple example that runs perfectly through eclipse) to an jar file (either the JAR or Runnable JAR option) the jar file doesn't do anything. If I go to the command line and type "java -jar <the jar file> -Djava.library.path=<where the library files are>" it gives this error:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
            at java.lang.ClassLoader.loadLibrary(Unknown Source)
            at java.lang.Runtime.loadLibrary0(Unknown Source)
            at java.lang.System.loadLibrary(Unknown Source)
            at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)
            at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)
            at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)
            at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)
            at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)
            at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:111)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:109)
            at com.sun.opengl.impl.windows.WindowsGLDrawableFactory.<clinit>(WindowsGLDrawableFactory.java:60)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:106)
            at Snippet209.main(Snippet209.java:75)Clearly I'm missing something. I want to make a jar file that I can send to an arbitrary computer and it will run the JOGL program with no extra steps (or at least as few as possible). Any help would be greatly appreciated with some Duke stars ;-)

    Ok, sounds like it would work, although I've never done much with loading libraries like you describe, so I could use some extra notes on it.
    I got this code from here and followed the instructions on there too to get JOGL to work with Eclipse:
    * Copyright (c) 2000, 2005 IBM Corporation and others. All rights reserved.
    * This program and the accompanying materials are made available under the
    * terms of the Eclipse Public License v1.0 which accompanies this distribution,
    * and is available at http://www.eclipse.org/legal/epl-v10.html Contributors:
    * IBM Corporation - initial API and implementation
    * SWT OpenGL snippet: use JOGL to draw to an SWT GLCanvas For a list of all SWT
    * example snippets see http://www.eclipse.org/swt/snippets/
    * @since 3.2
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.media.opengl.GL;
    import javax.media.opengl.GLContext;
    import javax.media.opengl.GLDrawableFactory;
    import javax.media.opengl.glu.GLU;
    import org.eclipse.swt.SWT;
    import org.eclipse.swt.graphics.Rectangle;
    import org.eclipse.swt.layout.FillLayout;
    import org.eclipse.swt.opengl.GLCanvas;
    import org.eclipse.swt.opengl.GLData;
    import org.eclipse.swt.widgets.Composite;
    import org.eclipse.swt.widgets.Display;
    import org.eclipse.swt.widgets.Event;
    import org.eclipse.swt.widgets.Listener;
    import org.eclipse.swt.widgets.Shell;
    public class Snippet209
         static void drawTorus(GL gl, float r, float R, int nsides, int rings)
              float ringDelta = 2.0f * (float) Math.PI / rings;
              float sideDelta = 2.0f * (float) Math.PI / nsides;
              float theta = 0.0f, cosTheta = 1.0f, sinTheta = 0.0f;
              for (int i = rings - 1; i >= 0; i--)
                   float theta1 = theta + ringDelta;
                   float cosTheta1 = (float) Math.cos(theta1);
                   float sinTheta1 = (float) Math.sin(theta1);
                   gl.glBegin(GL.GL_QUAD_STRIP);
                   float phi = 0.0f;
                   for (int j = nsides; j >= 0; j--)
                        phi += sideDelta;
                        float cosPhi = (float) Math.cos(phi);
                        float sinPhi = (float) Math.sin(phi);
                        float dist = R + r * cosPhi;
                        gl.glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi);
                        gl.glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, r * sinPhi);
                        gl.glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi);
                        gl.glVertex3f(cosTheta * dist, -sinTheta * dist, r * sinPhi);
                   gl.glEnd();
                   theta = theta1;
                   cosTheta = cosTheta1;
                   sinTheta = sinTheta1;
         public static void main(String[] args)
              final Display display = new Display();
              Shell shell = new Shell(display);
              shell.setLayout(new FillLayout());
              Composite comp = new Composite(shell, SWT.NONE);
              comp.setLayout(new FillLayout());
              GLData data = new GLData();
              data.doubleBuffer = true;
              final GLCanvas canvas = new GLCanvas(comp, SWT.NONE, data);
              canvas.setCurrent();
              final GLContext context = GLDrawableFactory
                        .getFactory().createExternalGLContext();
              canvas.addListener(SWT.Resize, new Listener()
                   public void handleEvent(Event event)
                        Rectangle bounds = canvas.getBounds();
                        float fAspect = (float) bounds.width / (float) bounds.height;
                        canvas.setCurrent();
                        context.makeCurrent();
                        GL gl = context.getGL();
                        gl.glViewport(0, 0, bounds.width, bounds.height);
                        gl.glMatrixMode(GL.GL_PROJECTION);
                        gl.glLoadIdentity();
                        GLU glu = new GLU();
                        glu.gluPerspective(45.0f, fAspect, 0.5f, 400.0f);
                        gl.glMatrixMode(GL.GL_MODELVIEW);
                        gl.glLoadIdentity();
                        context.release();
              context.makeCurrent();
              GL gl = context.getGL();
              gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
              gl.glColor3f(1.0f, 0.0f, 0.0f);
              gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
              gl.glClearDepth(1.0);
              gl.glLineWidth(2);
              gl.glEnable(GL.GL_DEPTH_TEST);
              context.release();
              shell.setText("SWT/JOGL Example");
              shell.setSize(640, 480);
              shell.open();
              display.asyncExec(new Runnable()
                   int     rot     = 0;
                   public void run()
                        if (!canvas.isDisposed())
                             canvas.setCurrent();
                             context.makeCurrent();
                             GL gl = context.getGL();
                             gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
                             gl.glClearColor(.3f, .5f, .8f, 1.0f);
                             gl.glLoadIdentity();
                             gl.glTranslatef(0.0f, 0.0f, -10.0f);
                             float frot = rot;
                             gl.glRotatef(0.15f * rot, 2.0f * frot, 10.0f * frot, 1.0f);
                             gl.glRotatef(0.3f * rot, 3.0f * frot, 1.0f * frot, 1.0f);
                             rot++;
                             gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_LINE);
                             gl.glColor3f(0.9f, 0.9f, 0.9f);
                             drawTorus(
                                       gl, 1, 1.9f + ((float) Math.sin((0.004f * frot))),
                                       15, 15);
                             canvas.swapBuffers();
                             context.release();
                             display.asyncExec(this);
              while (!shell.isDisposed())
                   if (!display.readAndDispatch())
                        display.sleep();
              display.dispose();
    }I have set up a project in eclipse with that file in the default package. I have created a libs/ folder in the project and I have the following files in it:
    gluegen-rt.dll
    gluegen-rt.jar
    jogl.dll
    jogl.jar
    jogl_awt.dll
    jogl_cg.dll
    swt.jarMy project is using the 3 jar files as libraries and I don't need to explicitly say anything about the dll files.

  • Error deploying to .jar file

    Hi everyone,
    I am forms developer and as such i am a completly clueless as to how to do some basic things in this new tool i am trying to learn.
    As a start, i am building some simple ADF/Swing applications, everything goes fine until i reach the point when i want to deploy my little proyect. Here's what i have been doing based on what help i could find in this forum. Thanks in advance and sorry for my poor english.
    1) Create a deployment profile, i select all the dependencies using the "Dependency Analisis" option under file groups. Question: regarding the long list of dependencies shown in this section, is it necesary to include all the libraries listed? if i include everything the resulting jar file is 120Mb in size, and that is for a very simple form. Is this normal/correct.?
    2) After the jar is deployed i try to run it with "java -jar xxx.jar" but i get the following exceptions: It seems to be related to the manifest file, and i find it very weird that, when i look in the jar file, there are TWO manifest.mf under the same META-INF folder, one is all uppercase and is quite small, the second is lowercase and quite large in size. I dont know if this is what's causing the problem and i cant find any other person that is having this same issue.
    The error:
    Exception in thread "main" java.lang.SecurityException: no manifiest section for
    signature file entry javax/media/rtp/event/SessionEvent.class
    at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVe
    rifier.java:260)
    at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier
    .java:172)
    at java.util.jar.JarVerifier.processEntry(JarVerifier.java:239)
    at java.util.jar.JarVerifier.update(JarVerifier.java:194)
    at java.util.jar.JarFile.initializeVerifier(JarFile.java:300)
    at java.util.jar.JarFile.getInputStream(JarFile.java:362)
    at sun.misc.JarIndex.getJarIndex(JarIndex.java:92)
    at sun.misc.URLClassPath$JarLoader.<init>(URLClassPath.java:543)
    at sun.misc.URLClassPath$3.run(URLClassPath.java:320)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.misc.URLClassPath.getLoader(URLClassPath.java:309)
    at sun.misc.URLClassPath.getLoader(URLClassPath.java:286)
    at sun.misc.URLClassPath.getResource(URLClassPath.java:156)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:191)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    Thanks.

    Hello Avrom
    Thanks for the quick reply, in answer to your suggestion, in fact, as you recommended, excluding the manifest from the deployment profile solved "that" error but... (there's always a but, also, by excluding the manifest i had to include the classpath in the command line to indicate the "entry" point or main class), now i am receiving another error wich is completly unrelated (i think) to the previous one.
    Thank you very much.
    Fabian.
    The error:
    Exception in thread "main" java.lang.UnsupportedClassVersionError: view/NameOfMyCla
    ss (Unsupported major.minor version 50.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:1
    3)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

  • Downloading jar files

    Hi All,
    Can any one pls help me in dowloading the following jar files.
    Where can i find these links
    com.sun.jimi.core.*;
    com.sun.media.jai.codec.*;
    javax.media.jai.*;
    Thanks

    http://java.sun.com/products/java-media/jai/iio.html
    http://java.sun.com/products/jimi/

  • JOGL jar file confusion

    Some of the jogl.jar file contain following packages
    Packages
    net.java.games.cg
    net.java.games.gluegen.runtime
    net.java.games.jogl
    net.java.games.jogl.util
    another one contain following packages
    Packages
    com.sun.opengl.cg
    com.sun.opengl.util
    com.sun.opengl.util.j2d
    com.sun.opengl.util.texture
    com.sun.opengl.util.texture.spi
    javax.media.opengl
    javax.media.opengl.glu
    Which one is best and latest?

    Packages
    com.sun.opengl.cg
    com.sun.opengl.util
    com.sun.opengl.util.j2d
    com.sun.opengl.util.texture
    com.sun.opengl.util.texture.spi
    javax.media.opengl
    javax.media.opengl.glu
    This is the latest.......

  • How should I create JAR file which  contain JMF library and project classes

    Hi,
    I installed the JMF windows pack. I compiled and ran successfully myApplet (which use JMF librarie) in Internet Explorer on my machine. When I run this applet on some different machine, where JMF isn�t installed- it�s not running.
    There is an error:
    java.lang.NoClassDefFoundError: javax/media/ControllerListener
    I was trying to create jar file, which contain librarie JMF.jar and all other files which are require to run myApplet (*.jar, *.class, the files from folder �MyApplet�) and run it on the other computer. It still doesn�t work.
    Also I ran a JMF Customizer and created customize.jar but this file contains only JMF classes. I don�t know how add other files to it.
    How should I create a jar file which will contains all essential files to run myApplet on other machine (something like �All In One� J )
    I�m using Eclipse.
    Can somebody help me?.
    Thank You!
    Best regards:
    Peter

    Hi
    i want to make a jar file of application which is using JMF to play audio
    and video. it works well during compilation and execution but doesn't
    works in jar file.
    please help me how i make a jar file whic will run audio and video too
    your's truely
    abdul

Maybe you are looking for

  • OSX will not boot up

    I updated Safari from a prompt and clicked 'restart', as usual after updates. My iMac now only shows the blue screen with 'Starting Mac OS X', and this goes on forever - like an endless loop. I switched to a Windows computer to try the Internet for s

  • Submit button broken

    I have created a PDF form in LiveCycle with a button to submit to a ColdFusion URL. I tested & it worked. CF processed the PDF, emailed me the results through CF, and displayed the PDF data. Great! (that was Friday) Then...Monday came & the form does

  • How can we speed up delta Process?

    Hi All, As per control parameter settings we have max. no processes as 6 and 10 data packages for one Info doc and its the same for that particular infosource settings. but when we schedule the delta info package( R/3 - BW ODS) it is using only one p

  • Automating partition exchange

    I am looking to automate a partition exchange process because I am changing a column from a date to a timestamp. For each parition in a table I want to do the following steps: 1. PEX: SRC_TBL to TEMP_TBL 2. Make the date to timestamp change on the TE

  • CLASS BUILDER DOUBT

    Hi Experts, I am working on class builder.i've come across a situation.in a method i have to store  transaction number into a structure.where should i give the structure as tables statement is not allowed in oops.can anyone explain me how to do it? R