Hi Curtis, 

The shell script launcher at

    https://github.com/tofi86/universalJavaApplicationStub

appears to work well. I was able to modify it to use a bundled JRE, pass JVM 
args and set the working directory so that ImageJ finds the plugins folder. 
There is an ImageJ distribution at

    http://wsr.imagej.net/download/ImageJ-osx-java8.zip

that uses it.

-wayne


> On Jun 18, 2015, at 12:17 PM, Curtis Rueden <ctrue...@wisc.edu> wrote:
> 
> Hi Wayne,
> 
> > Running mvn a couple of times resolved the issue.
> 
> Great.
> 
> > The next two issues are how to tell ImageJ where the plugins folder is
> > and how to set the memory limit. Is there a way to define in
> > Info.plist a "plugins.dir” property with the value “$APPDIR", which I
> > assume is the directory containing ImageJ.app?
> 
> The way the JavaFX launcher works is that it picks up any JVM settings from 
> the Java Preferences API at launch time. And all arguments passed on the CLI 
> go straight to the main method args. So we will be updating ImageJ2 over the 
> summer to process args on the Java side that were previously handled by the 
> launcher, including -Dfoo style system property settings (since in most cases 
> it is fine to set them early in the application startup). Of course, not all 
> args will be possible to support this way—e.g. max heap size (but see below).
> 
> Unfortunately, the current JavaFX launcher does not yet have a means to 
> dynamically pass JVM args to Java itself. I have an SO issue posted about it 
> [1] as well as a bug report in to Oracle (still under review; no public URL 
> yet). Maybe the JavaFX team will add a way, since this packaging mechanism is 
> being actively maintained and developed. But really it is not that urgent, 
> since you can run "java -Dplugins.dir=... -jar ImageJ.jar" or whatever from 
> the CLI as a developer. I.e.: the native launchers maybe do not need those 
> features. Regardless, we will also add shell scripts to make common workflows 
> (e.g., remote debugging) as simple as possible.
> 
> From a user standpoint, for things like max heap size, there is a nice 
> UserJvmOptionsService API [2] that we will use to expose common JVM settings 
> in an options dialog box. It lets you set arbitrary arguments to pass to java 
> (stored via the Java Preferences API) which take effect the next time the 
> application is launched.
> 
> See also imagej/imagej-launcher#33 on GitHub [3].
> 
> Regards,
> Curtis
> 
> [1] http://stackoverflow.com/q/30809330/1207769
> [2] 
> http://docs.oracle.com/javase/8/docs/technotes/guides/deploy/jvm_options_api.html
> [3] https://github.com/imagej/imagej-launcher/issues/33
> 
> On Thu, Jun 18, 2015 at 10:30 AM, Rasband, Wayne (NIH/NIMH) [E] 
> <rasba...@mail.nih.gov> wrote:
> Hi Curtis,
> 
> Running mvn a couple of times resolved the issue. The next two issues are how 
> to tell ImageJ where the plugins folder is and how to set the memory limit. 
> Is there a way to define in Info.plist a "plugins.dir” property with the 
> value “$APPDIR", which I assume is the directory containing ImageJ.app?
> 
> Best regards,
> 
> -wayne
> 
> 
> > On Jun 17, 2015, at 10:34 PM, Curtis Rueden <ctrue...@wisc.edu> wrote:
> >
> > Hi Wayne,
> >
> > It looks like the Maven command failed to build the project. The directory 
> > listing is only the source code from Git.
> >
> > The error indicates something went wrong downloading artifacts for the 
> > Maven build system. The first time you run Maven it downloads many things, 
> > but they all get cached into ~/.m2/repository, so subsequent builds are 
> > much more reasonable. It looks like you had a connectivity-related error, 
> > which can probably be resolved simply by running "mvn" again, or perhaps 
> > "mvn -U" to force an update.
> >
> > If running "mvn" and/or 'mvn -U" a couple more times does not resolve the 
> > issue, let me know.
> >
> > Regards,
> > Curtis
> >
> > On Wed, Jun 17, 2015 at 7:18 PM, Rasband, Wayne (NIH/NIMH) [E] 
> > <rasba...@mail.nih.gov> wrote:
> > Hi Curtis,
> >
> > I was able to install maven after doing "brew update”. I followed your 
> > instructions for building platform bundles for ImageJ 1.x, and it appeared 
> > to work except for this error:
> >
> > [ERROR] Failed to execute goal 
> > org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce 
> > (enforce-rules) on project ij: Execution enforce-rules of goal 
> > org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce failed: Plugin 
> > org.apache.maven.plugins:maven-enforcer-plugin:1.3.1 or one of its 
> > dependencies could not be resolved: Could not transfer artifact 
> > org.eclipse.aether:aether-util:jar:0.9.0.M2 from/to central 
> > (https://repo.maven.apache.org/maven2): Connect to 
> > repo.maven.apache.org:443 [repo.maven.apache.org/199.27.76.215] failed: 
> > Operation timed out -> [Help 1]
> >
> > It generated an ImageJA folder but there is no target folder in it. This is 
> > what the ImageJA directory looks like:
> >
> > ImageJA
> >    applet.html
> >    aREADME.txt
> >    build.xml
> >    pom.xml
> >    release-notes.html
> >    src/
> >       main/
> >          deploy/
> >             package/
> >                macosx/
> >                   ImageJ-volume.icns
> >                   ImageJ.icns
> >                windows/
> >                   ImageJ.ico
> >          java/
> >             ij/
> >                CommandListener.java
> >                CompositeImage.java
> >                …
> >
> > Thanks for your help,
> >
> > -wayne
> >
> >
> >
> >
> > > On Jun 17, 2015, at 3:33 PM, Curtis Rueden <ctrue...@wisc.edu> wrote:
> > >
> > > Hi Wayne,
> > >
> > > It may be that the Maven download is choosing a mirror with wrong SHA1. 
> > > Or it may be that your download is truly incomplete.
> > >
> > > Did you try to rm the file out of /Library/Caches/Homebrew and do it 
> > > again?
> > >
> > > Did you try "brew update" first?
> > >
> > > http://stackoverflow.com/q/12757694/1207769
> > > http://apple.stackexchange.com/q/57172
> > >
> > > Regards,
> > > Curtis
> > >
> > > On Wed, Jun 17, 2015 at 1:51 PM, Rasband, Wayne (NIH/NIMH) [E] 
> > > <rasba...@mail.nih.gov> wrote:
> > > Hi Curtis,
> > >
> > > I am still not having much luck. This is what I get when I try to use 
> > > "brew install maven” to install maven:
> > >
> > > bash-3.2$ brew install maven
> > > ==> Downloading 
> > > http://www.apache.org/dyn/closer.cgi?path=maven/maven-3/3.2.3/binaries/apache-maven-3.2.3-bin.tar.gz
> > > ==> Best Mirror 
> > > http://apache.mesi.com.ar/maven/maven-3/3.2.3/binaries/apache-maven-3.2.3-bin.tar.gz
> > > ######################################################################## 
> > > 100.0%
> > > Error: SHA1 mismatch
> > > Expected: 1ce6641f7dcb4fd5785bedcdca2979da83f6d23f
> > > Actual: 2e7c28f3ebc08b95934336680365cfaac2697155
> > > Archive: /Library/Caches/Homebrew/maven-3.2.3.tar.gz
> > > To retry an incomplete download, remove the file above.
> > >
> > > Best regards,
> > >
> > > -wayne
> > >
> > > > On Jun 17, 2015, at 12:09 PM, Curtis Rueden <ctrue...@wisc.edu> wrote:
> > > >
> > > > Hi Wayne,
> > > >
> > > > I just pushed some commits to the ImageJA repository [1] so that it can 
> > > > also build the same platform-specific application bundles -- but for 
> > > > vanilla ImageJ1 alone.
> > > >
> > > > To install Maven on your OS X machine, I recommend using Homebrew [2]. 
> > > > Then you can simply do:
> > > >
> > > >     brew install maven
> > > >
> > > > And you'll have a working mvn command.
> > > >
> > > > Note that the application bundling feature requires Java 8, since it is 
> > > > JavaFX-related functionality.
> > > >
> > > > So the commands you need to build platform bundles for ImageJ 1.x are:
> > > >
> > > >     git clone git://github.com/imagej/ImageJA
> > > >     cd ImageJA
> > > >     mvn -Pdist
> > > >
> > > > And it should create them in the target/jfx/native folder. There should 
> > > > be .dmg and a .pkg installers, which including a Java 8 runtime 
> > > > embedded (in the ImageJ.app/Contents/PlugIns/Java.runtime folder 
> > > > internally). There should also be an ImageJ.app in there. There is also 
> > > > a double-clickable ImageJ.jar in the target/jfx/app folder (with empty 
> > > > lib/ folder since ImageJ 1.x has no dependencies), as well another set 
> > > > of installers that do _not_ include the JRE in the 
> > > > target/jfx/native-nojre folder.
> > > >
> > > > Happy to help troubleshoot if you continue to have problems getting 
> > > > this working.
> > > >
> > > > Regards,
> > > > Curtis
> > > >
> > > > P.S. You may notice one exception when building the ImageJA bundles, 
> > > > relating to the version string not conforming to "x.y.z" pattern, but 
> > > > it does not halt the build.
> > > >
> > > > [1] https://github.com/imagej/ImageJA
> > > > [2] http://brew.sh
> > > >
> > > > On Wed, Jun 17, 2015 at 9:59 AM, Rasband, Wayne (NIH/NIMH) [E] 
> > > > <rasba...@mail.nih.gov> wrote:
> > > >
> > > > > On Jun 16, 2015, at 6:09 PM, Curtis Rueden <ctrue...@wisc.edu> wrote:
> > > > >
> > > > > Hi everyone,
> > > > >
> > > > > For those curious about the new JavaFX packaging for ImageJ, the 
> > > > > relevant bits are now merged to master. So you can play with it if 
> > > > > you like:
> > > > >
> > > > >   git clone git://github.com/imagej/imagej
> > > > >   mvn -Pdist
> > > > >
> > > > > And you should get some platform-specific application bundles in 
> > > > > target/jfx/app and target/jfx/native directories.
> > > > >
> > > > > Of course, the ImageJ Updater is still ignorant of the new directory 
> > > > > structure (with core ImageJ stuff in the lib/ folder instead of 
> > > > > jars/). And since the native launcher is no longer the ImageJ 
> > > > > Launcher, many CLI flags do not work at the moment. But we will keep 
> > > > > working on it!
> > > >
> > > > Hi Curtis,
> > > >
> > > > Is there an OS X application bundle that includes Java 8 available for 
> > > > download? I have not had any luck getting the the ‘mvn' command to work.
> > > >
> > > > -wayne
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > ImageJ-devel mailing list
> > > > ImageJ-devel@imagej.net
> > > > http://imagej.net/mailman/listinfo/imagej-devel
> > > >
> > >
> > >
> >
> >
> 
> 

_______________________________________________
ImageJ-devel mailing list
ImageJ-devel@imagej.net
http://imagej.net/mailman/listinfo/imagej-devel

Reply via email to