Portable ImageJ

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Portable ImageJ

lechristophe
Hi,

I'd like to know if it's possible to set up a portable version of ImageJ
on a USB stick :

- If Java is on the stick, it ensures reproducibility across computers.
But it will not possible to have a USB key that work both on Windows and
Mac computers, because Java is different on those machines, right ? In
this case, I'm more interested by a Mac USB stick.

- How to tell ImageJ (Mac version) to use a Java VM that is on the key ?
I don't want to use any command line instruction, a "launch ImageJ"
script could be OK for the user.

- Mac only question : the MBF implementation of ImageJ by Tony Collins
uses a IJ_prefs.txt file that has to be put in the Library folder on
Macs. I couldn't find if the location of this IJ_prefs.txt file can be
set in ImageJ (I mean, I looked by opening the ImageJ package under OSX
and reading the plist file). The idea is to read the IJ_prefs.txt file
from the USB key, because I don't want the user to mess with his Library
folder.

Thank you for your help,


--
Christophe Leterrier

Postdoc
INSERM UMR641 Neurobiology of ionic channels
IFR Jean Roche - Mediterranee University
Marseille, France
Reply | Threaded
Open this post in threaded view
|

Re: Portable ImageJ

dscho
Hi,

On Tue, 30 Jan 2007, Christophe Leterrier wrote:

> I'd like to know if it's possible to set up a portable version of ImageJ
> on a USB stick :
>
> - If Java is on the stick, it ensures reproducibility across computers.
> But it will not possible to have a USB key that work both on Windows and
> Mac computers, because Java is different on those machines, right ? In
> this case, I'm more interested by a Mac USB stick.

In theory, it would be possible to include JVMs for Linux, Mac _and_
Windows, starting the one which applies to the current machine.

You'd do it like this:

relative/path/to/jvm/java -Dplugins.dir=path/to/plugins -jar ij.jar

However, AFAICT the Mac Java (still) is distributed by Apple, and I don't
know if they allow you to just install it on a stick, too.

Furthermore, back when I still had an iBook, I could not upgrade to a
newer JVM, since it required a newer MacOSX, which I was not ready to buy.

> - How to tell ImageJ (Mac version) to use a Java VM that is on the key ?
> I don't want to use any command line instruction, a "launch ImageJ"
> script could be OK for the user.

I saw somebody do an (MacOSX) Icon for a Java program, but I cannot
remember how. Sorry.

Hth,
Dscho
Reply | Threaded
Open this post in threaded view
|

Re: Portable ImageJ

Alan Dipert
Hello,
I've used this software:
http://launch4j.sourceforge.net/index.html

to wrap Jars so they behaved like Windows applications.  Supposedly launch4j
can do the same on Mac OS X, but I haven't messed with it an awhile so I'm
not sure.  Hope this helped,

Alan

On 1/30/07, Johannes Schindelin <[hidden email]> wrote:

>
> Hi,
>
> On Tue, 30 Jan 2007, Christophe Leterrier wrote:
>
> > I'd like to know if it's possible to set up a portable version of ImageJ
> > on a USB stick :
> >
> > - If Java is on the stick, it ensures reproducibility across computers.
> > But it will not possible to have a USB key that work both on Windows and
> > Mac computers, because Java is different on those machines, right ? In
> > this case, I'm more interested by a Mac USB stick.
>
> In theory, it would be possible to include JVMs for Linux, Mac _and_
> Windows, starting the one which applies to the current machine.
>
> You'd do it like this:
>
> relative/path/to/jvm/java -Dplugins.dir=path/to/plugins -jar ij.jar
>
> However, AFAICT the Mac Java (still) is distributed by Apple, and I don't
> know if they allow you to just install it on a stick, too.
>
> Furthermore, back when I still had an iBook, I could not upgrade to a
> newer JVM, since it required a newer MacOSX, which I was not ready to buy.
>
> > - How to tell ImageJ (Mac version) to use a Java VM that is on the key ?
> > I don't want to use any command line instruction, a "launch ImageJ"
> > script could be OK for the user.
>
> I saw somebody do an (MacOSX) Icon for a Java program, but I cannot
> remember how. Sorry.
>
> Hth,
> Dscho
>
Reply | Threaded
Open this post in threaded view
|

Re: Portable ImageJ

Volker Baecker
In reply to this post by dscho
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

> I saw somebody do an (MacOSX) Icon for a Java program, but I cannot
> remember how. Sorry.

I did this. I created an applescript, that calls a linux shell script,
that starts the java application.
I saved the applescript as application and created an alias that I moved
to the desktop.
That worked fine, but maybe there is a simpler way to do it.

Cheers,
Volker
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFv4yrxZKX7A/4oMERAsGSAKCVKZGB3xJvRUvxk2FC4vNIlUFbUgCfcsVl
odzB/tWOztokx6bSCwVDMAY=
=Z//2
-----END PGP SIGNATURE-----

--
passerelle antivirus du campus CNRS de Montpellier
--
Reply | Threaded
Open this post in threaded view
|

Re: Portable ImageJ

ctrueden
Hi Christophe,

Maybe I am missing something, but you should be able to just copy over
the files from the various ImageJ distributions. For Mac OS X, you
would copy the ImageJ.app bundle to the USB stick. For Windows, copy
ImageJ.exe. For Linux, the run script (though you might want to create
a desktop file for your preferred window manager). Also copy over
ij.jar, and the various folders (plugins, macros, etc.). As long as
there is enough room on the USB drive, everything should work the same
double-clicking from there.

Regarding IJ_Prefs.txt, I checked the source, and ImageJ looks for the
file in the user's home directory. There does not appear to be an easy
way to reconfigure that.

Out of curiosity, for Mac OS X, why would you want to put a version of
Java on the key instead of using the system Java?

-Curtis

On 1/30/07, Volker Bäcker <[hidden email]> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> > I saw somebody do an (MacOSX) Icon for a Java program, but I cannot
> > remember how. Sorry.
>
> I did this. I created an applescript, that calls a linux shell script,
> that starts the java application.
> I saved the applescript as application and created an alias that I moved
> to the desktop.
> That worked fine, but maybe there is a simpler way to do it.
>
> Cheers,
> Volker
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFv4yrxZKX7A/4oMERAsGSAKCVKZGB3xJvRUvxk2FC4vNIlUFbUgCfcsVl
> odzB/tWOztokx6bSCwVDMAY=
> =Z//2
> -----END PGP SIGNATURE-----
>
> --
> passerelle antivirus du campus CNRS de Montpellier
> --
>
Reply | Threaded
Open this post in threaded view
|

Re: Portable ImageJ

Gabriel Landini
On Tuesday 30 January 2007 19:54:03 Curtis Rueden wrote:
> Regarding IJ_Prefs.txt, I checked the source, and ImageJ looks for the
> file in the user's home directory. There does not appear to be an easy
> way to reconfigure that.

What about creating a knoppix dvd with IJ installed (+ macros and plugins).
Is that possible?

Cheers,
G.
Reply | Threaded
Open this post in threaded view
|

Re: Portable ImageJ

ctrueden
Hi Gabriel,

On 1/30/07, Gabriel Landini <[hidden email]> wrote:
> What about creating a knoppix dvd with IJ installed (+ macros and plugins).
> Is that possible?

Certainly possible, and I am guessing it would be quite easy, thought
I do not have experience with creating custom Knoppix CDs. According
to an article I found
(http://www.informit.com/articles/article.asp?p=417095&rl=1): "The
total process of creating a new version of Knoppix (called
remastering) broadly consists of copying a running Knoppix environment
to a host computer, chrooting into it, making any desired changes, and
then compressing the filesystem and turning it into a bootable ISO."
So it should be straightforward to set up ImageJ in a user's home
directory in the chroot environment, including all desired plugins and
preferences, then create the ISO from that.

-Curtis
Reply | Threaded
Open this post in threaded view
|

Re: Portable ImageJ

lechristophe
In reply to this post by Gabriel Landini
Maybe this could be a feature request if it's possible: store and read
IJ_Prefs.txt file in the ImageJ application folder under OS X, similar
to what is done in Windows. The ij.jar location has been modified in OS
X to be similar to XP (in IJ 1.36 I think), so it would be going in the
same direction, plus it would allow cross-plateform installs to be more
standardized.

I do not know if it would be possible/easy though.


Christophe Leterrier



Gabriel Landini a écrit :

> On Tuesday 30 January 2007 19:54:03 Curtis Rueden wrote:
>> Regarding IJ_Prefs.txt, I checked the source, and ImageJ looks for the
>> file in the user's home directory. There does not appear to be an easy
>> way to reconfigure that.
>
> What about creating a knoppix dvd with IJ installed (+ macros and plugins).
> Is that possible?
>
> Cheers,
> G.
>
Reply | Threaded
Open this post in threaded view
|

Re: Portable ImageJ

Justin McGrath
Under Linux ~ generally points to the home directory.  I don't know if
Mac has a similar convention, but I know Windows XP does (%HOME% I
think it is).  You might be able to use this to make ImageJ more
portable.  Just have the script copy IJ_Prefs.txt to the home
directory before starting ImageJ, then remove it when IJ is done.  Of
course it should check if there's a file there already and make a
backup and restore it when finished.

This has the advantage of still being portable, doesn't require
modifaction of the code, and still follows the conventions of the OSes
it's running on.

Justin
Reply | Threaded
Open this post in threaded view
|

Re: Portable ImageJ

Bob Nienhuis
In reply to this post by ctrueden
Puppy Linux fits nicely on a bootable memory stick.
<http://www.puppylinux.org/user/viewpage.php?page_id=1>

Bob Nienhuis
[hidden email]

On 1/30/07, Curtis Rueden <[hidden email]> wrote:

>
> Hi Gabriel,
>
> On 1/30/07, Gabriel Landini <[hidden email]> wrote:
> > What about creating a knoppix dvd with IJ installed (+ macros and
> plugins).
> > Is that possible?
>
> Certainly possible, and I am guessing it would be quite easy, thought
> I do not have experience with creating custom Knoppix CDs. According
> to an article I found
> (http://www.informit.com/articles/article.asp?p=417095&rl=1): "The
> total process of creating a new version of Knoppix (called
> remastering) broadly consists of copying a running Knoppix environment
> to a host computer, chrooting into it, making any desired changes, and
> then compressing the filesystem and turning it into a bootable ISO."
> So it should be straightforward to set up ImageJ in a user's home
> directory in the chroot environment, including all desired plugins and
> preferences, then create the ISO from that.
>
> -Curtis
>
Reply | Threaded
Open this post in threaded view
|

Re: Portable ImageJ

Bob Nienhuis
See also: "Linux On A Stick" from Linux Mag
<http://www.linux-magazine.com/issue/51/Memory_Stick_Linux.pdf>

Bob

On 1/31/07, Bob Nienhuis <[hidden email]> wrote:

>
> Puppy Linux fits nicely on a bootable memory stick.
> <http://www.puppylinux.org/user/viewpage.php?page_id=1>
>
> Bob Nienhuis
> [hidden email]
>
> On 1/30/07, Curtis Rueden <[hidden email] > wrote:
> >
> > Hi Gabriel,
> >
> > On 1/30/07, Gabriel Landini < [hidden email]> wrote:
> > > What about creating a knoppix dvd with IJ installed (+ macros and
> > plugins).
> > > Is that possible?
> >
> > Certainly possible, and I am guessing it would be quite easy, thought
> > I do not have experience with creating custom Knoppix CDs. According
> > to an article I found
> > (http://www.informit.com/articles/article.asp?p=417095&rl=1 ): "The
> > total process of creating a new version of Knoppix (called
> > remastering) broadly consists of copying a running Knoppix environment
> > to a host computer, chrooting into it, making any desired changes, and
> > then compressing the filesystem and turning it into a bootable ISO."
> > So it should be straightforward to set up ImageJ in a user's home
> > directory in the chroot environment, including all desired plugins and
> > preferences, then create the ISO from that.
> >
> > -Curtis
> >
>
>