I can make a mov OK but got wrong framerate for avi

Hi,
I modified the jpegtoMovie.java to generate a avi file.
I set up a int[] buffer to store the rgb values and stream it out
to a file. When the format is QuickTime, everything is fine, however
when I changed to AVI format, the windows media player played it really
fast. Windows shows it got a framerate of 1000 and a duration of 0.
I tried to modify the data source to return a duration other then unknown, but it doesn't work.
Any one got any ideas? Attached is the source
Thank you!
Gang
import java.io.*;
import java.util.*;
import java.awt.Dimension;
import javax.media.*;
import javax.media.control.*;
import javax.media.protocol.*;
import javax.media.protocol.DataSource;
import javax.media.datasink.*;
import javax.media.format.VideoFormat;
* This program takes a list of JPEG image files and convert them into
* a QuickTime movie.
public class movieAdapter implements ControllerListener, DataSinkListener {
private boolean doIt(int width, int height, int frameRate, MediaLocator outML) {
     ImageDataSource ids = new ImageDataSource(width, height, frameRate);
     Processor p;
     try {
     System.err.println("- create processor for the image datasource ...");
     p = Manager.createProcessor(ids);
     } catch (Exception e) {
     System.err.println("Yikes! Cannot create a processor from the data source.");
     return false;
     p.addControllerListener(this);
     // Put the Processor into configured state so we can set
     // some processing options on the processor.
     p.configure();
     if (!waitForState(p, p.Configured)) {
     System.err.println("Failed to configure the processor.");
     return false;
     // Set the output content descriptor to QuickTime.
     p.setContentDescriptor(new ContentDescriptor(FileTypeDescriptor.MSVIDEO));
     // Query for the processor for supported formats.
     // Then set it on the processor.
     TrackControl tcs[] = p.getTrackControls();
     Format f[] = tcs[0].getSupportedFormats();
     if (f == null || f.length <= 0) {
     System.err.println("The mux does not support the input format: " + tcs[0].getFormat());
     return false;
     tcs[0].setFormat(f[0]);
     System.err.println("Setting the track format to: " + f[0]);
     // We are done with programming the processor. Let's just
     // realize it.
     p.realize();
     if (!waitForState(p, p.Realized)) {
     System.err.println("Failed to realize the processor.");
     return false;
     // Now, we'll need to create a DataSink.
     DataSink dsink;
     if ((dsink = createDataSink(p, outML)) == null) {
     System.err.println("Failed to create a DataSink for the given output MediaLocator: " + outML);
     return false;
     dsink.addDataSinkListener(this);
     fileDone = false;
     System.err.println("start processing...");
     // OK, we can now start the actual transcoding.
     try {
     p.start();
     dsink.start();
     } catch (IOException e) {
     System.err.println("IO error during processing");
     return false;
     // Wait for EndOfStream event.
     waitForFileDone();
     // Cleanup.
     try {
     dsink.close();
     } catch (Exception e) {}
     p.removeControllerListener(this);
     System.err.println("...done processing.");
     return true;
* Create the DataSink.
private DataSink createDataSink(Processor p, MediaLocator outML) {
     DataSource ds;
     if ((ds = p.getDataOutput()) == null) {
     System.err.println("Something is really wrong: the processor does not have an output DataSource");
     return null;
     DataSink dsink;
     try {
     System.err.println("- create DataSink for: " + outML);
     dsink = Manager.createDataSink(ds, outML);
     dsink.open();
     } catch (Exception e) {
     System.err.println("Cannot create the DataSink: " + e);
     return null;
     return dsink;
private Object waitSync = new Object();
private boolean stateTransitionOK = true;
* Block until the processor has transitioned to the given state.
* Return false if the transition failed.
private boolean waitForState(Processor p, int state) {
     synchronized (waitSync) {
     try {
          while (p.getState() < state && stateTransitionOK)
          waitSync.wait();
     } catch (Exception e) {}
     return stateTransitionOK;
* Controller Listener.
public void controllerUpdate(ControllerEvent evt) {
     if (evt instanceof ConfigureCompleteEvent ||
     evt instanceof RealizeCompleteEvent ||
     evt instanceof PrefetchCompleteEvent) {
     synchronized (waitSync) {
          stateTransitionOK = true;
          waitSync.notifyAll();
     } else if (evt instanceof ResourceUnavailableEvent) {
     synchronized (waitSync) {
          stateTransitionOK = false;
          waitSync.notifyAll();
     } else if (evt instanceof EndOfMediaEvent) {
     evt.getSourceController().stop();
     evt.getSourceController().close();
private Object waitFileSync = new Object();
private boolean fileDone = false;
private boolean fileSuccess = true;
* Block until file writing is done.
private boolean waitForFileDone() {
     synchronized (waitFileSync) {
     try {
          while (!fileDone)
          waitFileSync.wait();
     } catch (Exception e) {}
     return fileSuccess;
* Event handler for the file writer.
public void dataSinkUpdate(DataSinkEvent evt) {
     if (evt instanceof EndOfStreamEvent) {
     synchronized (waitFileSync) {
          fileDone = true;
          waitFileSync.notifyAll();
     } else if (evt instanceof DataSinkErrorEvent) {
     synchronized (waitFileSync) {
          fileDone = true;
          fileSuccess = false;
          waitFileSync.notifyAll();
public static void main(String args[]) throws Exception{
//jpegCreator.main(null);
     //if (args.length == 0)
     // prUsage();
     // Parse the arguments.
     int i = 0;
     int width = -1, height = -1, frameRate = 1;
     Vector inputFiles = new Vector();
     String outputURL = null;
width=128;
height=128;
outputURL="test.avi";
     // Generate the output media locators.
     MediaLocator oml;
     if ((oml = createMediaLocator(outputURL)) == null) {
     System.err.println("Cannot build media locator from: " + outputURL);
     System.exit(0);
     movieAdapter imageToMovie = new movieAdapter();
     imageToMovie.doIt(width, height, frameRate, oml);
     System.exit(0);
static void prUsage() {
     System.err.println("Usage: java JpegImagesToMovie -w <width> -h <height> -f <frame rate> -o <output URL> <input JPEG file 1> <input JPEG file 2> ...");
     System.exit(-1);
* Create a media locator from the given string.
private static MediaLocator createMediaLocator(String url) {
     MediaLocator ml;
     if (url.indexOf(":") > 0 && (ml = new MediaLocator(url)) != null)
     return ml;
     if (url.startsWith(File.separator)) {
     if ((ml = new MediaLocator("file:" + url)) != null)
          return ml;
     } else {
     String file = "file:" + System.getProperty("user.dir") + File.separator + url;
     if ((ml = new MediaLocator(file)) != null)
          return ml;
     return null;
// Inner classes.
* A DataSource to read from a list of JPEG image files and
* turn that into a stream of JMF buffers.
* The DataSource is not seekable or positionable.
private class ImageDataSource extends PullBufferDataSource {
     private ImageSourceStream streams[];
     ImageDataSource(int width, int height, int frameRate) {
     streams = new ImageSourceStream[1];
     streams[0] = new ImageSourceStream(width, height, frameRate);
     public void setLocator(MediaLocator source) {
     public MediaLocator getLocator() {
     return null;
     * Content type is of RAW since we are sending buffers of video
     * frames without a container format.
     public String getContentType() {
     return ContentDescriptor.RAW;
     public void connect() {
     public void disconnect() {
     public void start() {
     public void stop() {
     * Return the ImageSourceStreams.
     public PullBufferStream[] getStreams() {
     return streams;
     * We could have derived the duration from the number of
     * frames and frame rate. But for the purpose of this program,
     * it's not necessary.
     public Time getDuration() {
System.out.println("dur is "+streams[0].nextImage);
//return new Time(1000000000);
return DURATION_UNKNOWN;
     public Object[] getControls() {
     return new Object[0];
     public Object getControl(String type) {
     return null;
* The source stream to go along with ImageDataSource.
class ImageSourceStream implements PullBufferStream {
     final int width, height;
     final VideoFormat format;
     int nextImage = 0;     // index of the next image to be read.
     boolean ended = false;
     public ImageSourceStream(int width, int height, int frameRate) {
     this.width = width;
     this.height = height;
final int rMask = 0x00ff0000;
final int gMask = 0x0000FF00;
final int bMask = 0x000000ff;
format=new javax.media.format.RGBFormat(new Dimension(width,height),Format.NOT_SPECIFIED,
Format.intArray,frameRate,32,rMask,gMask,bMask);
     * We should never need to block assuming data are read from files.
     public boolean willReadBlock() {
     return false;
     * This is called from the Processor to read a frame worth
     * of video data.
     public void read(Buffer buf) throws IOException {
     // Check if we've finished all the frames.
     if (nextImage >= 100) {
          // We are done. Set EndOfMedia.
          System.err.println("Done reading all images.");
          buf.setEOM(true);
          buf.setOffset(0);
          buf.setLength(0);
          ended = true;
          return;
     nextImage++;
     int data[] = null;
     // Check the input buffer type & size.
     if (buf.getData() instanceof int[])
          data = (int[])buf.getData();
     // Check to see the given buffer is big enough for the frame.
     if (data == null || data.length < width*height) {
          data = new int[width*height];
          buf.setData(data);
java.awt.Color clr=java.awt.Color.red;
if(nextImage>30)clr=java.awt.Color.GREEN;
if(nextImage>60)clr=java.awt.Color.BLUE;
for(int i=0;i<width*height;i++){
data=clr.getRGB();
     buf.setOffset(0);
     buf.setLength(width*height);
     buf.setFormat(format);
     buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);
     * Return the format of each video frame. That will be JPEG.
     public Format getFormat() {
     return format;
     public ContentDescriptor getContentDescriptor() {
     return new ContentDescriptor(ContentDescriptor.RAW);
     public long getContentLength() {
     return 0;
     public boolean endOfStream() {
     return ended;
     public Object[] getControls() {
     return new Object[0];
     public Object getControl(String type) {
     return null;

Hi
I'm trying to make a movie from the JpegImagesToMovie class. But i get a null point exception :(
java.lang.NullPointerException
     at com.sun.media.multiplexer.video.QuicktimeMux.writeVideoSampleDescription(QuicktimeMux.java:936)
     at com.sun.media.multiplexer.video.QuicktimeMux.writeSTSD(QuicktimeMux.java:925)
     at com.sun.media.multiplexer.video.QuicktimeMux.writeSTBL(QuicktimeMux.java:905)
     at com.sun.media.multiplexer.video.QuicktimeMux.writeMINF(QuicktimeMux.java:806)
     at com.sun.media.multiplexer.video.QuicktimeMux.writeMDIA(QuicktimeMux.java:727)
     at com.sun.media.multiplexer.video.QuicktimeMux.writeTRAK(QuicktimeMux.java:644)
     at com.sun.media.multiplexer.video.QuicktimeMux.writeMOOV(QuicktimeMux.java:582)
     at com.sun.media.multiplexer.video.QuicktimeMux.writeFooter(QuicktimeMux.java:519)
     at com.sun.media.multiplexer.BasicMux.close(BasicMux.java:142)
     at com.sun.media.BasicMuxModule.doClose(BasicMuxModule.java:172)
     at com.sun.media.PlaybackEngine.doClose(PlaybackEngine.java:872)
     at com.sun.media.BasicController.close(BasicController.java:261)
     at com.sun.media.BasicPlayer.doClose(BasicPlayer.java:229)
     at com.sun.media.BasicController.close(BasicController.java:261)
     at movieclear.MovieManager.JpegImagesToMovie.controllerUpdate(JpegImagesToMovie.java:179)
     at com.sun.media.BasicController.dispatchEvent(BasicController.java:1254)
     at com.sun.media.SendEventQueue.processEvent(BasicController.java:1286)
     at com.sun.media.util.ThreadedEventQueue.dispatchEvents(ThreadedEventQueue.java:65)
     at com.sun.media.util.ThreadedEventQueue.run(ThreadedEventQueue.java:92)
Please please help me out.. I'm totally stuck in this thing. A MOV file is created, but it's a 0kb file.
Please help me out..
Sootie.

Similar Messages

  • I can make a WiFi connection but pages will not load. WiFi works for a laptop using windows

    I can make a WiFi connection but pages will not load.  WiFi works ok on a laptop using Windows.  I have reset the WiFi settings but this makes no difference.

    Thanks, Linc, but  that almost helped:
    Because the retina 15 only has a wifi connection (no ethernet), that's the connection I'm stuck with for the notebook. But on the 27iMac, I did have both ethernet and wifi enabled. When I turned the wifi off on the 27, therer was a brief moment when both computers were showing their counterparts when I tried to make a network connection. BUT, after a few seconds of 'searching', the computer I was trying to connect to disappeared from the Network list.
    So I tried the opposite; the retina can only connect thru wifi, so that's a given. I swithched my ethernet off and then enabed the wifi on the 27 and ....same thing: When I try a network connection, there are a few seconds of 'searching', then the ony option I'm left with is share screen, which doesn't work either.
    I've read the 'dropped' network is a problem with the retina, but the odd thing is that I never lose my internet connection—that continues to work fine, as does Air Drop—but I can't seem to connect, network-wise.
    Any ideas about the dropped network?

  • I went from an I-Phone 3GS to I-Phone 5, I can make phone calls out but I can't access the internet when I am away from my WI-FI connection... any ideas?

    I went from an I-Phone 3GS to I-Phone 5, I can make phone calls out but I can't access the internet when I am away from my WI-FI connection... any ideas?

    but in the home with wireless internet access , it is continued when off, sometimes can not working,
    What does "it is continued when off" mean?
    And the same for "somtimes can not working"?

  • My iphone 4 can make and receive calls but I cannot hear the person on the other end...they can hear me.  I have tried plugging headphones in and resetting...any other ideas?

    My iphone 4 can make and receive calls but I cannot hear the person on the other end...they can hear me.  I have tried plugging headphones in and resetting...any other ideas?

    If you need to use the phone now, try using speaker phone until you can take it to an Apple store and have them further look into the problem.

  • HT3523 I can play an .mov file but cannot open it to move it to another drive/disc/etc. When we try to open it, we get a message that says "The movie file for "beanmine.mov" cannot be found. Without this file, the movie cannot play properly."

    We can play a .mov file (a full-length film created in final cut pro) but cannot actually open it in QuickTime. We get the error message saying that a file is missing, and the movie can't play properly without the file. The thing is, we can play the film, we just can't open it to move it to another drive. Help?
    Also, can the lost file (which was deleted) be recovered from a Mac HD or an external hard drive?
    Help!

    We can play a .mov file (a full-length film created in final cut pro) but cannot actually open it in QuickTime. We get the error message saying that a file is missing, and the movie can't play properly without the file. The thing is, we can play the film, we just can't open it to move it to another drive. Help?
    Sounds like you created a "Reference" file here. I.e., a "Reference" file is a file that tells the player how to play the data contained in a "Resource" file. When you try to open the "Reference" file in the QT Player app, the first thing the player does is check to see if the "Resource" data file is is still available where it is supposed to be. (I.e., moving/deleting the resource file or moving reference file without moving the resource file to maintain the relative path between the two will generate the error message you mentioned.)
    Also, can the lost file (which was deleted) be recovered from a Mac HD or an external hard drive?
    That depends. Deleting a file does not actually erase the data immediately. Instead, the operating system just tells the system directory that the space containing the movie data is available for reuse if/when needed. As time passes, the chance that some of the data sectors will be re-written by other data continuously increases. To restore the file normally requires use of a special utility that both locates and restores all of the linked sectors containing the "deleted" movie data in their correct order. Other methods of restoring files would depend on the software you routinely have active on your system. For instance, do you use "TimeMachine?" or orther software that automatically backs up your data periodically? If so, then follow the instructions for your particular application to recover a deleted file.

  • Handoff-Can make calls on Mac but cannot receive

    Handoff worked at first, but after a while something happened and I can no longer receive calls on my MacPro (Late 2013) or my MacBook Pro (mid 2012), using iPhone 5S. I can make calls fine, but when calls come in, it makes no sound on the MacPro screen & there is no dialog box for me to answer.

    Hello MarkCutler,
    After reviewing your post, it sounds like the Mac is not receiving calls. I would recommend that you read these articles, they may be helpful in troubleshooting your issue.
    OS X Yosemite: Use your Mac to make and receive phone calls
    Turn on or off iPhone Cellular Calls on your Mac
    Get help using Continuity with iOS 8 and OS X Yosemite - Apple Support
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • I have a problem with my ipad. I can make online documentation before but when I updated my iOS, I can't longer make notes. How can I fix this problem?

    I have a problem with my ipad. Before I can make online documentation but when I updated my iOS, I can no longer make notes. How can I fix this?

    What does "online documentation" mean exactly?  Are you using the Notes app to try to create notes in iCloud, for example?
    If so, that should still work in iOS 7.1.
    If not, please tell us specific symptoms of what is (or is not) happening.

  • I can make calls on yosemite but can't receive calls !

    I just upgraded my macbook pro retina late 2013 to Yosemite
    I have an iPhone 6 running iOS 8.0.2
    here's the problem
    when someone is calling me I can answer the call from my mac but when I want to make calls (from mac) I can't and it says Your iPhone must use the same iCloud and FaceTime account.
    my iPhone is using the same iCloud and FaceTime account !! then what's the problem?! what should I do?

    On the iPhone, Settings > FaceTime > iPhone Cellular Calls must be turned on. Here is a complete list from Connect your iPhone, iPad, iPod touch, and Mac using Continuity
    Phone calls
    With Continuity, you can make and receive cellular phone calls from your iPad, iPod touch, or Mac when your iPhone is on the same Wi-Fi network.
    To make and receive phone calls, here's what you need:
    Sign in to the same iCloud account on all your devices, including your Mac.
    Your iPhone and your iPad or iPod touch need to use iOS 8 or later. Your Mac needs to use OS X Yosemite.
    All devices must be on the same Wi-Fi network.
    All devices must be signed in to FaceTime using the same iCloud account. This means any device that shares your Apple ID will get your phone calls. Look below for instructions on how to turn off iPhone cellular calls.
    Wi-Fi Calling needs to be off. Go to Settings > Phone. If you see Wi-Fi Calling, turn it off.

  • HT203167 rented gravity last night but got tired waiting for it to download. woke up this morning and cant find it anywhere does anyone know where it might of went

    rented gravity last night but fell asleep waiting for it to download. woke up this morning and cant find it anywhere. Have any ideas where to look?

    What did you rent it on, a computer's iTunes or an iOS device ? If a computer's iTunes then it should have downloaded into the Movies part of your iTunes library (if you select that then is there a 'rentals' tab on it with that film in it ?) ; if you rented it on an iOS device then it should be in its Videos app.

  • HT1577 Is there a way I can make my movies download faster in itunes?

    Have closed all other applications and genius is off. Everything else downloads really fast but the movies are killing me - up to about 3 hours and counting. Then it's slow to put on my ipod. Have tried HD and SD, no difference whatsoever. Help!
    I have previously downloaded a movie and put it on my ipod within about 30 mins but for the past month or two itunes movie downloads are REALLY slow. I've read other forums that say similar but no one has got a solution yet. I thought I'd put it out there again - does anyone know what it is?
    I am using a brand new imac with tonnes of memory, broadband internet is obv the likely cause but EVERYTHING else is fast, only itunes movies are slow. Is there a setting that's been changed, perhaps in one of the software updates?
    I'm a new mac user so go easy on the tech advise please, I'm still in windows mode...
    Cheers

    Hi emburg,
    I'm sorry to hear you are having issues with the speed of your movie downloads. 
    It would be helpful to know what your download speed currently is.
    The link below will provide a few troubleshooting steps that you can try improve the download speed:
    iTunes: How to resume interrupted iTunes Store downloads
    ...You can also try the following steps to troubleshoot the download issue.
    Restart your computer or device.
    Check for updates for your Mac or PC and install any software updates. Also, check for and install updates for any security software you may have (anti-virus, anti-malware, firewall, and so on).
    If using Wi-Fi for Internet access, try using a different Wi-Fi network when downloading. If you are connecting to a home network, try restarting your Wi-Fi router. Also, check for and install any firmware updates for your Wi-Fi router. (Refer the manufacturer's website for your router to get information on updating its firmware).
    If you are on a computer, try using an ethernet cable for wired Internet access instead of using Wi-Fi.
    Resuming downloads from a computer
    Open iTunes.
    Choose Store > Check for Available Downloads.
    Enter your account name and password.
    Click the "Check Downloads" button.
    Click the Resume or Resume All button, or the resume arrow  to resume the download.
    I hope this information helps ....
    Have a great day!
    - Judy

  • Using Apple TV. I can watch a movie preview but unable to watch movie because DCP compatible. Why?

    I can watch the preview but says can't purchase the movie because it is not HDCP compatible. Why?

    Apple are not here, only fellow users. It's not Apple's choice as to what films are available for rent, it's the film studios that specify which countries Apple can have their films available for sale and/or rental and in what format (HD and/or SD).

  • HELP! Can make outgoing VoIP calls but no incoming

    I am hoping someone can help me out here!  I am trying to get a Cisco Small Business unified communication device to connect through my DSL service.  I am using a SIP trunk registration through ViaTalk and can register on their server and make outgoing calls without issue.  I have yet to be able to receive incoming calls.  I spent 6+ hours on the phone with Cisco tech support and they tell me it is my router blocking the incoming traffic.  I set my modem/router up with a DMZ, have tried to forward all port, disabled SIP ALG and still nothing.  When I called ViaTalk to see if they noticed incoming calls on their SIP server they said that everything looked good except that the port that is used for the communication seems to be altered.  Does anyone know if this is something that Verizon may/may not be doing?  Outgoing calls are handled on port 5060, but the ViaTalk tech support said that the request was coming through on the incoming side on port 56739.  I am using a Netgear DGND3300 because the Westell 7500 is better used as a paper weight.

    Thanks for the catch dslr ... I spend so much time over in the FiOS section, I totally missed this was in the DSL section.
    So, with that said, has the OP had any luck getting the log files for us to look at?   We should be seeing traffic coming from ViaTalk when incoming calls come in and that's what we need to see.
    Also, not clear if you have the Verizon gear still in the loop here or are justing usng the Netgear.  If the Verizon modem is in the picture, is it operating in bridge mode (not router mode)?

  • Can Make Voice/Sms calls, but cannot recieve any Voice or SMS on Iphone 4

    My wife and I recieved our new IPhone 4's last wednesday. We are both new to at&t and Iphones. Had our numbers ported over from verizon. Since then when we are at home our phones seem to make outgoing calls and send txt msg's just fine. But both are only sporadically recieving calls and txt msg's. We are showing 5 bars on the E network, also have wifi hooked up to them from our router. I've tried full restores, reset network connection, had tech support re-register both phones, and power cycle them many times. It seems briefly after after resetting all network settings the missing txt will all flood in for a moment then it's back to just every now and then receiving them. I've also tried turning everything off in my house that cause interference which didn't help either.
    Has any else had similar issues? And no this is not even holding on to the phone when this happens.

    Bump

  • Any applications that can make a Pages document open in MS Office for Mac?

    I purchased MS Office for Mac and stupidly deleted Pages from my Macbook. I don't have the Mac OS installation disk, and was wondering if there is a utility to open a Pages document?
    Thanks for any help.

    Basically, none. You can either unzip it or reveal its package contents and then pick out pieces of the document, but this won't preserve formatting.
    (56672)

  • Can anyone tell me where I got wrong in my jni conde?

    I am new to jni.
    I want to pass a class from java to C, and after some data value inserting, this class will be returned to Java.
    But the exception occured: java.lang.UnsatisfiedLinkError.
    I can't see where the error is.
    So anyone can give me any suggestions??
    I'll paste my test code as follows:
    TestSCJNI.java
    import java.lang.*;
    public class TestSCJNI {
              static {
              System.loadLibrary("TestSCJNI");
         private native ServiceComp test_queryServiceComp(ServiceComp _sc);
         ServiceComp sc;
         public TestSCJNI(){
              sc = new ServiceComp();
         public static void main(String[] args) {
              TestSCJNI t = new TestSCJNI();
              t.sc = t.test_queryServiceComp(t.sc);
              System.out.println("tsId" + t.sc.tsId + "NwID" + t.sc.orginNwId);
         class ServiceComp {
              char tsId;
              char orginNwId;
              char svId;
    }TestSCJNI.c
    #include <stdio.h>
    #include <stdlib.h>
    #include <jni.h>
    #include "TestSCJNI.h"
    JNIEXPORT jclass JNICALL Java_TestSCJNI_test_queryServiceComp(JNIEnv *env, jobject obj, jobject sc) {
         jclass t = (*env)->GetObjectClass(env,sc);
         (*env)->SetCharField(env,t,"tsId",12);
         (*env)->SetCharField(env,t,"orginNwId",0);
         (*env)->SetCharField(env,t,"svId",3);
         //t.orginNwId = 0;
         //t.svId = 3;
         return t;
    } Thanks for any help!

    yes. The procedure I run the program are :
    1. javac *.java
    javah -jni TestSCJNI
    2. gcc -c TestSCJNI.c
    3. gcc �shared -o libTestSCJNI.so TestSCJNI.o
    4. java -Djava.library.path=. TestSCJNI
    I supposed that the procedure is right...
    Or something incorrect in the procedure??This is just a wild guess, but what happens if you replace step
    2) and 3) by one new step? like this:
    gcc TestSCJNI.c -o libTestSCJNI.so -shared -I<include stuff here>
    I suspect that gcc generates position dependent code if it just has
    to compile a compilation unit. The -shared flag implies the -fPIC
    flag for compilation if I'm not mistaken ...
    kind regards,
    Jos

Maybe you are looking for

  • Transactional Caches and Write Through

    I've been trying to implement the use of multiple caches, each with write through, all within a transaction.      The CacheFactory.commitTransactionCollection(..) method only seems to work correctly if the first transactionMap throws an exception in

  • I can move clips around, but can't select within them

    I've trashed the prefs, used command-shift-a. I know it's something simple, but I've looked in 3 books and haven't found it. HELP! /john

  • SRM 7.0 ROS: Temporary Business Association Management

    Hi Guru, It is possible manage with SRM 7.0 component ROS the qualification process for a Temporary Business Association. For me a Temporary Business Association has the following meaning: This is a system of collaboration between companies lasting f

  • My iPhone 4 screen just stopped working.

    My screen was working 5 minutes ago, now it does not. I can recieve incomming calls but can only answer using my headset due to the screen not working. Any solutions to get the screen working again would be appriciated.

  • Read current background job name

    Hello, I would like to know if there exists a way to find out the name of the background job where your ABAP program is currenctly running in. Does there exist a function that I can call ? Best Regards, Erwin