Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » [xpost] dll's, path, and jmf in swt
[xpost] dll's, path, and jmf in swt [message #455241] Tue, 19 September 2006 06:49 Go to next message
Wouter van Atteveldt is currently offline Wouter van AtteveldtFriend
Messages: 9
Registered: July 2009
Junior Member
[crossposted from eclipse.platform.swt]

Dear all,

I want to add video playback in my Eclipse RCP app and thought that using
JMF (java media framework) using SWT_AWT would be a good way to do this.

If I run a standalone pure awt java program to create a player and display
it it works fine, so jmf is installed correctly and java can find the needed
dll's.

However, if I turn it into a SWT app using SWT_AWT, I get a
"javax.media.NoPlayerException: Cannot find a Player for ..". I can print
the duration and format of the datasource so it has no trouble locating the
URL and parsing the format.

My guess is that JMF needs a number of dll's, which are found in the
standalone java since they are on the path, but as a SWT application it can
no longer find the dll's. Currently, I run the test player as an "SWT
Application" in eclipse, but my goal is to turn it into a RCP view.

How do I configure the path for dll's in an Eclipse RCP / SWT program? Am I
doing something else wrong?

Any help greatly appreciated,

Wouter

----

public class testswt {
public static void main(String[] args) throws Exception {
System.out.println("Creating player");
URL u = new File("d:/video/tv/Video/test.mpg").toURL();
DataSource ds = new URLDataSource(u);
ds.connect();
System.out.println(u + " " + ds.getDuration().getSeconds() + " " +
ds.getContentType());
Player p = Manager.createRealizedPlayer(ds); // <<------------ LINE 35
error occurs here --------------<<
p.start();
System.out.println("showing frame");
Display display = new Display ();
final Shell shell = new Shell(display);
Composite comp = new Composite(shell, SWT.EMBEDDED);
Frame x = SWT_AWT.new_Frame(comp);
x.add(p.getVisualComponent());
p.start();
shell.setLayout(new GridLayout());
comp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
}

---

Creating player
file:/d:/video/tv/Video/test.mpg 9.223372036854776E9 video.mpeg
Exception in thread "main" javax.media.NoPlayerException: Cannot find a
Player for: javax.media.protocol.URLDataSource@253498
at javax.media.Manager.createPlayerForSource(Manager.java:1512)
at javax.media.Manager.createPlayer(Manager.java:500)
at javax.media.Manager.createRealizedPlayer(Manager.java:579)
at testswt.main(testswt.java:35)
Re: [xpost] dll's, path, and jmf in swt [message #455262 is a reply to message #455241] Tue, 19 September 2006 13:55 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Running an SWT app causes -Djava.library.path to be defined (so SWT can
pick up the native libs). Maybe this is interfering with your app.

If you have a Java jar and an SWT app, you can associate a "native
libraries" directory with the jar file included in the project
properties>Java Build Path>Libraries tab. Just expand the jar.

In RCP you would create a plugin with your JMF jars and libraries. In
the MANIFEST, you can include the location within your plugin of the
native libraries, and eclipse will take care of making sure they're
loaded on the correct path.

See posts like
http://www.eclipse.org/newsportal/article.php?id=12052&g roup=eclipse.platform.rcp#12052

Later,
PW


Re: [xpost] dll's, path, and jmf in swt [message #455268 is a reply to message #455262] Tue, 19 September 2006 14:26 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Paul Webster wrote:
> See posts like
> http://www.eclipse.org/newsportal/article.php?id=12052&g roup=eclipse.platform.rcp#12052

Trying to open this link I get the information that it does not exist.
Is that a quotation error or a temporary internet instability? ;-)
(Joke aside for the moment, I really would like to read the
corresponding thread)

Greetings from Bremen,

Daniel
Re: [xpost] dll's, path, and jmf in swt [message #455273 is a reply to message #455268] Tue, 19 September 2006 15:54 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Daniel Krügler wrote:
> Paul Webster wrote:
>> See posts like
>> http://www.eclipse.org/newsportal/article.php?id=12052&g roup=eclipse.platform.rcp#12052
>
>
> Trying to open this link I get the information that it does not exist.
> Is that a quotation error or a temporary internet instability? ;-)
> (Joke aside for the moment, I really would like to read the
> corresponding thread)
>
> Greetings from Bremen,
>
> Daniel


I still worked for me, but here's another way into the same thread:
http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg12036.html

Later,
PW


Re: [xpost] dll's, path, and jmf in swt [message #455313 is a reply to message #455273] Wed, 20 September 2006 15:56 Go to previous messageGo to next message
Sebastian Gruber is currently offline Sebastian GruberFriend
Messages: 1
Registered: July 2009
Junior Member
Paul Webster schrieb:
> Daniel Krügler wrote:
>> Paul Webster wrote:
>>> See posts like
>>> http://www.eclipse.org/newsportal/article.php?id=12052&g roup=eclipse.platform.rcp#12052
>>
>>
>>
>> Trying to open this link I get the information that it does not exist.
>> Is that a quotation error or a temporary internet instability? ;-)
>> (Joke aside for the moment, I really would like to read the
>> corresponding thread)
>>
>> Greetings from Bremen,
>>
>> Daniel
>
>
> I still worked for me, but here's another way into the same thread:
> http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg12036.html
>
> Later,
> PW

hi

I implemented exactly the same (I used SWT_AWT to embed JMF's player
component into an RCP view) and it worked. This did the trick for me: I
copied all the JMF DLLs (jm*.dll) from my C:\Windows\system32 directory
to the bin directory of the Java runtime. After that, it worked. I was
rendering a live captured webcam but I don't think that makes a difference.

Good luck,

Sebastian
Re: [xpost] dll's, path, and jmf in swt [message #455328 is a reply to message #455313] Thu, 21 September 2006 09:19 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Sebastian Gruber wrote:
> I implemented exactly the same (I used SWT_AWT to embed JMF's player
> component into an RCP view) and it worked. This did the trick for me: I
> copied all the JMF DLLs (jm*.dll) from my C:\Windows\system32 directory
> to the bin directory of the Java runtime. After that, it worked. I was
> rendering a live captured webcam but I don't think that makes a difference.

Sorry, but copying system libraries into required directory sounds like
an awful solution for me, at least ;-)

I was interested in the approach discussed in the thread mentioned by
Paul Webster, because there was used an alternative (via
Bundle-NativeCode) compared to the standard solution, which recommends
to put the native libraries into the root of the plug-in. Although
the last option usually is quite simple to realize, it can easily
break in complex use-cases. Currently I don't know whether the
Bundle-NativeCode can be applied in cases, where the standard procedure
breaks down, and I would be strongly interested, if someone could share
his or her knowledge concerning this.

In our case we would like to pack JMagick

http://www.yeo.id.au/jmagick/

into an Eclipse plug-in. Although we put the required ImageMagick native
libraries into the plug-in root, we stumbled across the problem, that
this was not sufficient (Some kind of "Handle could not be found"
error). Currently we ended up with a half-baked solution, where the
*additional* installation of ImageMagick is required. I really would
appreciate, if someone could point out, that this is not necessary,
because one could package *all* ImageMagic&JMagick libraries into one
(or two ;-) plug-ins...

Greetings from Bremen,

Daniel Krügler
Re: [xpost] dll's, path, and jmf in swt [message #455391 is a reply to message #455262] Sun, 24 September 2006 16:33 Go to previous messageGo to next message
Wouter van Atteveldt is currently offline Wouter van AtteveldtFriend
Messages: 9
Registered: July 2009
Junior Member
Thanks for the reply!

I got it to work by including a native libraries dir in my libraries tab.
Strange enough, including this plugin in another plugin causes this plugin
to not find the jars from the user library on its classpath, so now I have
the jars as normal included jars and use the user library only for the
native dir...

Wouter

"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:eeot0t$rvk$1@utils.eclipse.org...
> Running an SWT app causes -Djava.library.path to be defined (so SWT can
> pick up the native libs). Maybe this is interfering with your app.
>
> If you have a Java jar and an SWT app, you can associate a "native
> libraries" directory with the jar file included in the project
> properties>Java Build Path>Libraries tab. Just expand the jar.
>
> In RCP you would create a plugin with your JMF jars and libraries. In the
> MANIFEST, you can include the location within your plugin of the native
> libraries, and eclipse will take care of making sure they're loaded on the
> correct path.
>
> See posts like
> http://www.eclipse.org/newsportal/article.php?id=12052&g roup=eclipse.platform.rcp#12052
>
> Later,
> PW
Re: [xpost] dll's, path, and jmf in swt [message #459636 is a reply to message #455241] Tue, 05 December 2006 08:50 Go to previous message
Eclipse UserFriend
Originally posted by: lms15_84.yahoo.com

MAKE MONEY QUICK!
At 5:08 AM on Jan 30, 2004, Unregistered Guest wrote:
Greetings: I am a retired attorney. A few years ago a man came to me with a letter. He asked me to verify the fact that this was legal to do. I told him I would review it and get back to him. When I first read the letter my client brought me, I thought it was some “off-the-wall” idea to make money. A week and a half later we met in my office to discuss the issue. I told him the letter he originally brought me was not 100% legal. My client then asked me to alter it to make it perfectly legal. I asked him to make one small change in the letter. I was still curious about the letter, so he explained to me how it works. I thought it seemed like a long shot, so I decided against participating. But before my client left, I asked him to keep me updated on his results. About two months later, he called me to tell me he had received over $800,000 in cash. I didn’t believe him, so he asked me to try this idea and find out for myself. I thought about it for a couple of days and decided I really didn’t have anything to lose, so I asked him for a copy of the letters. I followed the instructions exactly, mailed 200 copies, and sure enough, the money started coming in! It arrived slowly at first, but coming. I kept a precise record of the earnings, and in the end, it totaled $978,493! I could hardly believe it. I met with my friend for lunch to find out exactly how it worked. He told me there are quite a few similar letters around, but this one is different because there are six names at the end of the letter, not five like some others. This fact alone results in your name being in far more returns. The other fact was the help I gave him, making sure the whole thing was legal, since no one wants to take the risk of doing something illegal. By now you are surely curious to know what small changes to make. If you sent a letter like this one out, in order to be completely legal, you must actually sell something in order to receive a dollar in return. So when you send a dollar to each of the names on the list, you must include these words, “PLEASE PUT ME ON YOUR MAILING LIST” and include your name and address. This is the key to the program. The item you will receive for the dollar you sent to the six people below is the letter. At the time I first tried this idea, I was earning a good living as a lawyer. But everyone in the legal profession will tell you there is a lot of stress that comes with the job. I told myself if things worked out, I would retired from my practice and play golf. I decided to try the letter again, but this time I sent 500 copies. Three months later , I had totaled $2,341,178! Here are a few reasons a person might give for not trying this program: Ø Some people think they can never make a lot of money with anything this simple. Ø Some are afraid they will be ridiculed for trying Ø Some dream of large sums of money, but do nothing to actually achieve it. Ø Some are just plain lazy. Ø Some are afraid of losing their investment. They think this program is designed to beat them out of a few dollars. The system works if you will just try it. But you must follow the simple instructions exactly, and in less than three months, you will receive $800,000 GUARANTEED! Keep what you are doing to yourself for awhile. Many will tell you it won`t work and will try to talk you out of your dreams. Let them know of your success after it works. LETTERS FROM PARTICIPANTS IN THIS PROGRAM: My name is David Rhodes. In 1992 my car was repossessed and bill collectors were housing my. I was laid off and my unemployment ran out. In October of 1992, I received a letter telling me how to earn $800,000 anytime I wanted. Of course, I was skeptical. But because I was so desperate and virtually had nothing to lose, I gave it a try. In January 1993, my family and I went on a 10-day cruise. The next month I bought a brand new Mercedes with cash! I am currently building a home in Virginia and I will never have to work again. This money program really works perfectly every time. I have never failed to receive less than $500,000. This is a legitimate, money-making opportunity. It does not require you to sell anything or to come in contact with people. And , best of all, you only leave the house to mail the letters. If you have always believed that someday you would get the lucky break, then simply follow the instructions and make dreams come true. Larry McMahon, Norfolk, VA Six months ago, I received this letter and ignored it. Five more came within a period of time and I ignored them also. I was tempted, but I was convinced that they were just a Hoax. After three weeks of deliberating, I decided to give it a try ( not expecting much ). Two weeks went by and nothing happened. The fourth week was unbelievable! I cant say I received $800,000 but I received $400,000. For the first time in years, I am debt free. I am doing this again, only this time starting with 500 post. I strongly recommend that you follow the instructions exactly as outlined in this letter. INSTRUCTIONS 1. Immediately send $1.00 to each of the six people on the list at the end of this letter. Wrap the dollar bill in a note saying “ Please add me to your mailing list” and include your name and address. 2. Copy this letter. You do not have to type it 200 times. Simply place your cursor at the top of the page, hold it and drag it all the way down to the end of the letter. Then click on "edit" and select "copy". Now open up a notepad file on your computer and put the cursor at the top of the page in the notepad, click on 'edit' and then select 'paste' it will copy the letter for you onto your computer. 3. Remove the name next to the #1 on the list and move the rest of the names up one position (#2 becomes #1, #3 becomes #2, etc…..) Then place your name in the #6 position. Then save it, make sure it is saved as a txt. file. 4. When you have completed the instructions, take this letter and then go to (Google,Yahoo,...) and type in (Making Money Massege board,or post massege,...)and start posting your copy to 200 message boards,or more this is only the minimum, you can post as much as you like...The more copies you send the better the results. Keep a copy of this letter so you can use it a second time. Post it out again in six months, but Post it with the addresses you receive with each dollar. It will work better the second time. NOTE: This service is 100% legal - (Refer to title 18 section 1302 of the U.S. Postal & lottery laws) How does it work? When you send out 200 Posts, it is estimated that at least 15 people will respond and send you a $1.00. ($15.00) Those 15 will Post 200 Posts each and 225 people send you $1.00 ($225.00) Those 225 people Post 200 Posts each and 3,375 people send you $1.00 ($3,375.00) Those 3,375 post 200 posts each and 759,375 people send you $1.00 ($759,375.00) At this point your name drops off the list, but so far you have received $813,615.00. P.S. When your money begins to come in, give the first 10% to charity with spirit and share a good fortune!
1. Jacob, Maxime 660 Prevost Street Trois-Rivières, Qc G8Y-4A5 Canada
2. Jose E. Cruz 4440 N.E. 14 Ave. Pompano Beach, FL 33064 USA
3. Cristian Mery El Boldo 8682 906-0272 PUDAHUEL CHILE This really really works,I tried it once and I'm doing it again, first to be honest I only posted 145 posts and I didn't recive alot only 6,689.00$ in 3 months,at least this means that it realy works ,so this time I'm posting 604 posts and I've got so far in 2 month 15,640.00$ this is realy like a dream come true. So go on and try it trust me you've got nothing to lose.... important tip - Cover money by paper fully by which it can not been seen in light , because postal employees do some cheat some times....ok PD: Send this letter to all your email contacts, friends and all the newsgroups you could find. The more you get The best for BOTH of us. Good Luck!
4. Joseph Dushin, 264 B South Bridge Road Singapore 058813
5. Carey Tri, 8756 Brunell Way, Inver Grove Heights, MN 55076
6, Lance Suire 802 Cheneau Rd, Kaplan, LA 70548
Previous Topic:Re: Contribute to the application coobar
Next Topic:About dialog
Goto Forum:
  


Current Time: Tue Apr 16 09:52:45 GMT 2024

Powered by FUDForum. Page generated in 0.07261 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top