I wanted to create example plugin in ImageJ > Plugins > New > Plugin,
but all I see is this error: error: error reading /home/exo/data/down/imagej/jre/lib/ext/._vecmath.jar; cannot read zip file 1 error I'm using Archlinux, 64bit, Sun's java version 1.7.0_03. Thanks for any help |
On Sunday 19 Feb 2012 19:05:38 Tomas Meszaros wrote:
> I wanted to create example plugin in ImageJ > Plugins > New > Plugin, > but all I see is this error: > > error: error reading > /home/exo/data/down/imagej/jre/lib/ext/._vecmath.jar; cannot read zip file I wonder if this has to do with the location of java. Under linux you need to make sure that you have installed the JDK package and also that the run file which calls IJ points to the java location. Something like (all in one line): /usr/lib64/jvm/java-1.6.0/bin/java -Xmx900m -cp ij.jar:/usr/lib64/jvm/java-1.6.0/lib/tools.jar ij.ImageJ $* Cheers Gabriel |
In reply to this post by Tomas Meszaros
I have run into this one on my Xubuntu system. The problem is that the
code has come from a disk accessed by a MacOSX system. MacOSX has the nasty habit of creating hidden files that cause problems on our Linux boxes. These ._a-real-lib.jar files are the problematic ones that accompany each real-lib.jar file. It is a real pain to go through all the directories and remove them manually. I wrote a shell script to do it (I use tcsh, but you can use the shell of your choice...) The script traverses though all the directories below where it is run and cleans out these annoying files... Here is the contents of my "clean-mac-cruft" shell script: #!/bin/tcsh find . -name "._*" -exec rm -rf {} \; find . -name ".DS_*" -exec rm -rf {} \; I create "clean-mac-cruft" as an executable shell script and have it in a directory in my path, use a terminal to cd to my main ImageJ directory (or Fiji directory) and run clean-mac-cruft. Note that if this directory is owned by root, you may have to run as root (or use sudo) because of file permissions. Hope this helps John Minter On Sun, Feb 19, 2012 at 2:05 PM, Tomas Meszaros <[hidden email]> wrote: > I wanted to create example plugin in ImageJ > Plugins > New > Plugin, but > all I see is this error: > > error: error reading /home/exo/data/down/imagej/jre/lib/ext/._vecmath.jar; > cannot read zip file > 1 error > > I'm using Archlinux, 64bit, Sun's java version 1.7.0_03. > > Thanks for any help |
On 02/19/12 20:59, John Minter wrote:
> I have run into this one on my Xubuntu system. The problem is that the > code has come from a disk accessed by a MacOSX system. MacOSX has the > nasty habit of creating hidden files that cause problems on our Linux > boxes. These ._a-real-lib.jar files are the problematic ones that > accompany each real-lib.jar file. It is a real pain to go through all > the directories and remove them manually. I wrote a shell script to do > it (I use tcsh, but you can use the shell of your choice...) The > script traverses though all the directories below where it is run and > cleans out these annoying files... Here is the contents of my > "clean-mac-cruft" shell script: > > #!/bin/tcsh > find . -name "._*" -exec rm -rf {} \; > find . -name ".DS_*" -exec rm -rf {} \; > > I create "clean-mac-cruft" as an executable shell script and have it > in a directory in my path, use a terminal to cd to my main ImageJ > directory (or Fiji directory) and run > clean-mac-cruft. Note that if this directory is owned by root, you may > have to run as root (or use sudo) because of file permissions. > > Hope this helps > John Minter > > On Sun, Feb 19, 2012 at 2:05 PM, Tomas Meszaros > <[hidden email]> wrote: >> I wanted to create example plugin in ImageJ> Plugins> New> Plugin, but >> all I see is this error: >> >> error: error reading /home/exo/data/down/imagej/jre/lib/ext/._vecmath.jar; >> cannot read zip file >> 1 error >> >> I'm using Archlinux, 64bit, Sun's java version 1.7.0_03. >> >> Thanks for any help any problems... ...but I'll ask one more question. If I now open ImageJ2 and I want to make exactly the same stuff I get error: ------------------------------------------------------------------------------------------- Unable to find the javac compiler, which comes with he Windows and Linux versions of ImageJ that include Java in the ImageJ/jre folder java.home: /opt/java/jre ------------------------------------------------------------------------------------------- It looks like ImageJ2 is searching in */jre but I have my javac in /opt/java/bin/javac. |
I had the same issue under ImageJ2. Gabriel Landini's first answer
gave the key to fixing it. You need to change the launcher script. Here is the contents of my edited ./imagej.sh script that works (I commented out the original in case I needed to go back...). #!/bin/sh # java -Xmx512m -cp 'plugins:plugins/*:jar/*' imagej.Main $@ /usr/lib/jvm/java-7-sun-1.7.0.03/bin/java -Xmx512m -cp 'plugins:plugins/*:jar/*:/usr/lib/jvm/java-7-sun-1.7.0.03/lib/*' imagej.Main $@ Now, when I compile and run the example My_PlugIn.java, I get a compiler warning (warning: [options] bootstrap class path not set in conjunction with -source 1.5) but it runs... Hope this helps. I'm new to this and am still finding my way. Perhaps some of the more experienced list members can provide more polished answers... Best regards, John On Sun, Feb 19, 2012 at 3:54 PM, Tomas Meszaros <[hidden email]> wrote: > Thx, your script works very well. I can compile/run my plugin without any > problems... > ...but I'll ask one more question. If I now open ImageJ2 and I want to make > exactly the same stuff I get error: > > ------------------------------------------------------------------------------------------- > Unable to find the javac compiler, which comes with he Windows and > Linux versions of ImageJ that include Java in the ImageJ/jre folder > > java.home: /opt/java/jre > ------------------------------------------------------------------------------------------- > > It looks like ImageJ2 is searching in */jre but I have my javac in > /opt/java/bin/javac. |
On 02/20/12 12:24, John Minter wrote:
> I had the same issue under ImageJ2. Gabriel Landini's first answer > gave the key to fixing it. You need to change the launcher script. > Here is the contents of my edited ./imagej.sh script that works (I > commented out the original in case I needed to go back...). > > #!/bin/sh > # java -Xmx512m -cp 'plugins:plugins/*:jar/*' imagej.Main $@ > /usr/lib/jvm/java-7-sun-1.7.0.03/bin/java -Xmx512m -cp > 'plugins:plugins/*:jar/*:/usr/lib/jvm/java-7-sun-1.7.0.03/lib/*' > imagej.Main $@ > > Now, when I compile and run the example My_PlugIn.java, I get a > compiler warning (warning: [options] bootstrap class path not set in > conjunction with -source 1.5) but it runs... > > Hope this helps. I'm new to this and am still finding my way. Perhaps > some of the more experienced list members can provide more polished > answers... > > Best regards, > John > Thanks John, your solution works as you said. My plugin now works very well but I see exactly the same error as you. Anyway there's still one problem with this... If I open some image and I want to compile/run my plugin (it should invert image) then error appears, my plugin seems to run but image is in the same state (uninverted). Thx for any help |
Hi Tomas, John, et. al,
I had the same issue under ImageJ2. Gabriel Landini's first answer > gave the key to fixing it. You need to change the launcher script. > Thanks for pointing this out. Please note that the current ImageJ2 launch script is temporary—we are working on a better ImageJ launcher based on the Fiji launcher. It is much smarter about detecting the best version of Java to use, putting necessarily libraries on the classpath, etc. Regards, Curtis On Mon, Feb 20, 2012 at 5:44 AM, Tomas Meszaros <[hidden email] > wrote: > On 02/20/12 12:24, John Minter wrote: > >> I had the same issue under ImageJ2. Gabriel Landini's first answer >> gave the key to fixing it. You need to change the launcher script. >> Here is the contents of my edited ./imagej.sh script that works (I >> commented out the original in case I needed to go back...). >> >> #!/bin/sh >> # java -Xmx512m -cp 'plugins:plugins/*:jar/*' imagej.Main $@ >> /usr/lib/jvm/java-7-sun-1.7.0.**03/bin/java -Xmx512m -cp >> 'plugins:plugins/*:jar/*:/usr/**lib/jvm/java-7-sun-1.7.0.03/**lib/*' >> imagej.Main $@ >> >> Now, when I compile and run the example My_PlugIn.java, I get a >> compiler warning (warning: [options] bootstrap class path not set in >> conjunction with -source 1.5) but it runs... >> >> Hope this helps. I'm new to this and am still finding my way. Perhaps >> some of the more experienced list members can provide more polished >> answers... >> >> Best regards, >> John >> >> > Thanks John, your solution works as you said. My plugin now works very > well but I see exactly the same error as you. > Anyway there's still one problem with this... If I open some image and I > want to compile/run my plugin (it should invert image) then error appears, > my plugin seems to run but image is in the same state (uninverted). > > Thx for any help > |
Free forum by Nabble | Edit this page |