embedded java applet

View: New views
5 Messages — Rating Filter:   Alert me  

embedded java applet

by juan restrepo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Is there a way to embed a java applet, including gui controls?
I will settle for any elegant or otherwise solution.

many thanks

J Restrepo

--
Prof. Juan M. Restrepo
Department of Mathematics
Physics Department

http://www.physics.arizona.edu/~restrepo

Mathematics Department
University of Arizona
Tucson AZ 85721, U.S.A.

520 621 4367
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Latex-beamer-users mailing list
Latex-beamer-users@...
https://lists.sourceforge.net/lists/listinfo/latex-beamer-users

Re: embedded java applet

by Steve Schwartz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Juan,

On Sat, 2007-12-08 at 12:43 -0700, juan restrepo wrote:
> Is there a way to embed a java applet, including gui controls?
> I will settle for any elegant or otherwise solution.

Since I haven't seen anyone else offer a solution, have you tried using
a hyperref with a "run" command? All you need is a script that will
launch something to play your java applet. It isn't exactly "embedded",
in that it runs on top of your presentation, but if you have an external
program that allows you to control the geometry of the applet window,
etc., it should work. I don't use java so can't help directly, but I use
this to "embed" movies all the time. Here's my brief howto for movies,
which must be pretty easy to adapt for audio, java, or anything else you
can launch from a command line:

In your latex source there is, for example:

\href{run:movie_script.sh}{Click Here}

where movie_script.sh is a shell script to launch an external viewer,
e.g. a file with the single line:

mplayer -geometry 30%:100% -nofs -xy 2 -loop 0 movie.mpg

Then you need:

In ~/.mailcap:
application/x-sh; /bin/sh %s

to invoke sh to run your shell script. You can also use /bin/bash or
some other shell interpreter. You also need to associate the .sh
ending with a shellscript:

In ~/.mime.types:
application/x-sh sh

[There is a slight security problem with the above, in that it sets your
system up to automatically execute any .sh file, which could be
dangerous if it is malicious. If you are worried about this, then only
add the mimetype entry when you need it (tedious) or use an obscure file
suffix, e.g.,

latex: \href{run:movie_script.my123movies}{Click Here}
scriptname:  movie_script.my123movies
mailcap:  application/x-shmy123mov123movies; /bin/sh %s
mime.type: application/x-shmy123movies my123movies
]

As an alternative, if you don't need a detailed script to do what you
want, you can launch any file directly by associating the appropriate
mimetype, e.g.,

In ~/.mailcap:
video/*; mplayer [options] %s

You will obviously need to teach .mime.types about suffices for video
files. Then you can run the movie directly:

\href{run:mymovie.mpg}{Click Here}

Finally, there are various movie or multimedia packages out there, which
I've never got to work under linux and/or haven't tried.

HTH

Steve

--
+-------------------------------------------------------------------+
Professor Steven J Schwartz      Phone: +44-(0)20-7594-7660
Space and Atmospheric Physics    Fax:   +44-(0)20-7594-7772
The Blackett Laboratory          E-mail: s.schwartz@...
Imperial College London          Office: Huxley 6M70
London SW7 2BW, U.K.             Web: http://www.sp.ph.ic.ac.uk/~sjs
+-------------------------------------------------------------------+


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Latex-beamer-users mailing list
Latex-beamer-users@...
https://lists.sourceforge.net/lists/listinfo/latex-beamer-users

Re: embedded java applet

by eschter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Steve Schwartz-2 wrote:
In your latex source there is, for example:

\href{run:movie_script.sh}{Click Here}

where movie_script.sh is a shell script to launch an external viewer,
e.g. a file with the single line:

mplayer -geometry 30%:100% -nofs -xy 2 -loop 0 movie.mpg
I tried to do something like this in windows to launch a java animation. I have a file java_script.bat with the command

java -jar animation.jar

which does its work if launched by double clicking on it.
In my latex source I write

\href{run:java_script.bat}{Click Here}

but when I try to launch the animation from the beamer presentation, I get an error message "Unable to access jarfile animation.jar"

Has anyone any ideas?
Thank you in advance.

Ester


Re: embedded java applet

by Hans Meine-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Donnerstag 14 Februar 2008, eschter wrote:
> In my latex source I write
>
> \href{run:java_script.bat}{Click Here}
>
> but when I try to launch the animation from the beamer presentation, I get
> an error message "Unable to access jarfile animation.jar"
>
> Has anyone any ideas?

Make sure that you run acroread from the right working dir.  In particular,
make sure that the file is not opened within an opened instance of acroread
with a different CWD.

--
Ciao, /  /                                                    .o.
     /--/                                                     ..o
    /  / ANS                                                  ooo


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Latex-beamer-users mailing list
Latex-beamer-users@...
https://lists.sourceforge.net/lists/listinfo/latex-beamer-users

signature.asc (196 bytes) Download Attachment

Re: embedded java applet

by Rosie80 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I'm trying to run a shell script from a latex-generated pdf file.
In the latex code, I use
\href{run:shell.sh}{here}
I include the hyperref package
but when I click on the hyperref within the generated pdf file, I open the shell script in a text editor instead of executing it.
Does anybody knows what I am doing wrong?



Bugzilla from hans_meine@gmx.net wrote:
On Donnerstag 14 Februar 2008, eschter wrote:
> In my latex source I write
>
> \href{run:java_script.bat}{Click Here}
>
> but when I try to launch the animation from the beamer presentation, I get
> an error message "Unable to access jarfile animation.jar"
>
> Has anyone any ideas?

Make sure that you run acroread from the right working dir.  In particular,
make sure that the file is not opened within an opened instance of acroread
with a different CWD.

--
Ciao, /  /                                                    .o.
     /--/                                                     ..o
    /  / ANS                                                  ooo

 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Latex-beamer-users mailing list
Latex-beamer-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/latex-beamer-users