Java/JMF on Linux - where to export paths for browsers?

  • Thread starter Robert Mark Bram
  • Start date
R

Robert Mark Bram

Hi All!

I have this in my .bash_profile to get JMF to work through a browser.. as
per in

export JAVA_HOME=/usr/java/j2sdk1.4.2_02/
export JMFHOME=/usr/java/JMF-2.1.1e
export CLASSPATH=$JMFHOME/lib/jmf.jar:.:${CLASSPATH}
export LD_LIBRARY_PATH=$JMFHOME/lib:${LD_LIBRARY_PATH}
export PATH=/usr/java/j2sdk1.4.2_02/bin:$PATH:$HOME/bin

This is to get JMF to work through a browser as per instructions here:
http://java.sun.com/products/java-media/jmf/2.1.1/setup-linux.html

$ set | egrep -i 'java|jmf'
CLASSPATH=/usr/java/JMF-2.1.1e/lib/jmf.jar:.:/usr/java/JMF-2.1.1e/lib/jmf.jar:.:
JAVA_HOME=/usr/java/j2sdk1.4.2_02/
JMFHOME=/usr/java/JMF-2.1.1e
LD_LIBRARY_PATH=/usr/java/JMF-2.1.1e/lib:/lib:
PATH=/usr/java/j2sdk1.4.2_02/bin:/usr/java/j2sdk1.4.2_02/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/robertmarkbram/bin:/home/robertmarkbram/bin

This doesn't work - I ended up using a workaround:
$ su
Password:

/home/robertmarkbram
# cp /usr/java/JMF-2.1.1e/lib/jmf.jar /usr/java/j2sdk1.4.2_02/jre/lib/ext/

/home/robertmarkbram
#mkdir /usr/java/j2sdk1.4.2_02/jre/lib/ext/i386

/home/robertmarkbram
# cp /usr/java/JMF-2.1.1e/lib/*.so /usr/java/j2sdk1.4.2_02/jre/lib/ext/i386

But my question is why didn't my paths work? Should the paths be in
another file?

Rob
:)
:>
:]
 
M

Mike

Hello. Is it possible that somewhere along the line that a shell
without a login is spawned somewhere that didn't read that
..bash_profile?

Are multiple users trying to use JMF? Is the browser running as a
differnt user or something?
Have you tried creating a /etc/profile.d/jmf.sh file and putting you
export's there?
 
R

Robert Mark Bram

Hi Mike!

Thank you for your reply!
Hello. Is it possible that somewhere along the line that a shell
without a login is spawned somewhere that didn't read that
.bash_profile?

I can confirm that when I launch Konsole it reads .bash_profile - and I
launch the browser from the Konsole too.
Are multiple users trying to use JMF?

Just me atm..
Is the browser running as a
differnt user or something?

When I check with ps, I see that the UID is mine..
Have you tried creating a /etc/profile.d/jmf.sh file and putting you
export's there?

I can try this -- how will the browser use this though?
 
M

Mike

How about trying java -Djava.library.path=$LD_LIBRARY_PATH ?

Or how about trying to make it open another terminal that echo's the
execution?

Or how about wrapping the java command in an strace or ltrace?
strace java ...

I did a JNI project a few times and I can't remember what I did, I
think I ended up loading the library using System.load(new
File(System.mapLibraryName("mystuff")).getCanonicalPath()), to bypass
any OS related fidgiting of paths.
I wonder if you could hack something in your code to load the lib in
the hopes that once the JMF portion runs that the library is
considered already loaded.
 
R

relaxedrob

Hi Mike!
Or how about trying to make it open another terminal that echo's the
execution?

How can I make a browser do this? This sounds like the perfect debugging idea.

Rob
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top