Re: JavaAppLauncher and working directory

2014-04-07 Thread Abu Abdullah
On Sun, Apr 6, 2014 at 6:45 PM, Joe McGlynn  wrote:

> I don't believe the "app bundler" project is maintained any longer.  That
> code was subsumed into the "FX Packager" (which works for non-FX apps)
> about a year ago.  FWIW, I suspect that you need to put your application
> classes into a JAR file for it to work properly, but that is just a 
> guess.
>
> I'd recommend starting with the packager tool that is in the EA release of
> 8u20, it has been significantly updated for this release and if you
> discover a problem or feature gap that is where we'll be working to address
> it.
>
>
 I used javafxpackager and the result is the same. I'm still getting such
errors:
java.io.FileNotFoundException: setting/font.properties ..

i have added he folders manually to the resulted DMG.

is there anything that can be done. should the app be really jar file only.
How can I create DMG with a project containing many folders db, index.


Re: [9] Review request for 8038113 [macosx] JTree icon is not rendered in high resolution on Retina

2014-04-07 Thread Alexander Scherbatiy


 Hello,

 Could you review the updated fix:
http://cr.openjdk.java.net/~alexsch/8038113/webrev.02

  - CachableJRSUIIcon explicitly implements Icon interface now
  - getOptimizedImage() method is removed from the CachingScalingIcon 
because NSImage always scales an image to the requested size

  - @Override annotation is added.

 Thanks,
 Alexandr.

On 4/2/2014 4:37 PM, Petr Pchelko wrote:

Hello, Alexander.

Could you please add the @Override to the paintIcon method.

Also I suggest to reuse the paintIcon in the createIcon.

With best regards. Petr.

On 02.04.2014, at 16:20, Alexander Scherbatiy  
wrote:


  Hello,

  Could you review the updated fix:
http://cr.openjdk.java.net/~alexsch/8038113/webrev.01/

  The CachableJRSUIIcon creates an image twice: in createImage() and in the 
AquaPainter.paint() methods.

  The fix paints the icon directly from the AquaPainter.paint() method which 
uses the properly scaled image.

  Thanks,
  Alexandr.

On 3/26/2014 6:15 PM, Alexander Scherbatiy wrote:

Hello,

Could you review the fix:
  bug: https://bugs.openjdk.java.net/browse/JDK-8038113
  webrev: http://cr.openjdk.java.net/~alexsch/8038113/webrev.00

  MultiResolution image is used to create resolution variants for the JTree 
icons.

  The fix assumes that AquaPainter uses the graphics transform for the image 
size calculation
  an so depends on the fix for issue 8032667 [macosx] Components cannot be 
rendered in
http://mail.openjdk.java.net/pipermail/awt-dev/2014-March/007370.html

Thanks,
Alexandr.





Re: JavaAppLauncher and working directory

2014-04-07 Thread Michael Hall
On Apr 6, 2014, at 11:02 PM, Abu Abdullah  wrote:

> 
> Launcher.jar is just a wrapper instead of executing through the command line. 
> it has only manifest.mf file with Main-Class: classes.myapp and other 
> options. the classes are in a folder in the same directory.
>  
> user.dir for app bundler defaults to your user home directory. Trying to 
> access anything off that inside your application bundle can't really be 
> counted on.
> 
> this is my problem, I'm not able to see other folders in the same 
> /Contents/Java. it seems the classes are executed as part of the classpath 
> and not the working directory that it should be in. 


I believe the way this works is that any jars in the Java directory are added 
to classpath _but_ the Java directory itself is not classpath. The Classes 
directory it contains is in classpath.

For example:

set java.class.path
java.class.path=/Users/mjh/HalfPipe/HalfPipe7.app/Contents/Java/Classes:/Users/mjh/HalfPipe/HalfPipe7.app/Contents/Java/antlr-2.7.7.jar:…[Other
 jars in the Java directory automatically 
added].../Users/mjh/HalfPipe/HalfPipe7.app/Contents/Java/weka.jar

Notice Java directory itself not there. Java/Classes is there.
 So that you can access resources off of that with something like…

try {
ClassLoader cl = new 
java.net.URLClassLoader(new java.net.URL[0]);
BufferedReader rdr = new BufferedReader(new 
InputStreamReader(cl.getResourceAsStream("Scripts/loader.js")));
jsEngine.eval(rdr);
}
catch (Exception ex) { 
ex.printStackTrace(org.cmdline.common.Configuration.getSysOut()); }

Where Scripts/loader.js is located in the above mentioned Classes directory.
user.dir I would still suggest is not a reliable way to access application 
files going forward.

> i will try now with Joe suggestion to go with the new fx packager, it is 
> certainly the way forward.

If this provides equivalent functionality and is active this would probably be 
the way to go. Given the time, I will look at it. Any handy OS X specific 
documentation links would be appreciated.
  

Michael Hall

trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz

HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe

AppConverter convert Apple jvm to openjdk apps 
http://www195.pair.com/mik3hall/index.html#appconverter