Re: Re: Can't load fxml on Macos

2020-10-21 Thread Eric Bresie
What is fxml set to?

Could maybe be a “classpath” type issue where it’s looking on the classpath and 
can’t find it.

Eric Bresie
ebre...@gmail.com (mailto:ebre...@gmail.com)

> On October 20, 2020 at 8:56:52 AM CDT, Davide Perini 
> mailto:perini.dav...@dpsoftware.org)> wrote:
> I'm creating my binary file using JPackage but I don't signed the binary.
> can this be the problem.
>
> why a simple line like this
>
> FXMLLoader fxmlLoader =new FXMLLoader(GUIManager.class.getResource( fxml + 
> Constants.FXML));
>
> return null if it works on WIndows and Linux?
>
> Thanks
> Davide
>
>
>
>
>
> Il 20/10/2020 15:54, Dirk Lemmermann ha scritto:
> > I worked with JavaFX on MacOS since 2013 and except for issues related to 
> > font rendering I never got the impression that MacOS is the black sheep. I 
> > also happen to know that many of the developers that are working on JavaFX 
> > use MacOS.
> >
> > Dirk
> >
> > > On Oct 20, 2020, at 12:28 PM, Davide Perini  > > (mailto:perini.dav...@dpsoftware.org)> wrote:
> > >
> > > Hi all,
> > > this code works well on both Windows and Linux running Java 15 on JavaFX 
> > > 15.
> > >
> > > FXMLLoader fxmlLoader =new FXMLLoader(GUIManager.class.getResource( fxml 
> > > + Constants.FXML)); return fxmlLoader.load();
> > >
> > >
> > > It doesn't work on Macos returning a nullpointer exception.
> > >
> > > Any idea? Why Macos is always the black sheep?
> > >
> > > Thanks
> > > Davide
>


Re: Can't load fxml on Macos

2020-10-21 Thread Michael Paus

With so little information nobody will be able to answer your question
and I am pretty sure that not macOS is the black sheep here.
Such questions are also better posted on Stackoverflow and not here on
the OpenJFX development mailing list.
Michael

Am 20.10.20 um 12:28 schrieb Davide Perini:

Hi all,
this code works well on both Windows and Linux running Java 15 on 
JavaFX 15.


FXMLLoader fxmlLoader =new FXMLLoader(GUIManager.class.getResource( 
fxml + Constants.FXML)); return fxmlLoader.load();



It doesn't work on Macos returning a nullpointer exception.

Any idea? Why Macos is always the black sheep?

Thanks
Davide





Re: Can't load fxml on Macos

2020-10-20 Thread Michael Hall



> On Oct 20, 2020, at 8:56 AM, Davide Perini  
> wrote:
> 
> GUIManager.class.getResource

Not finding it? Not sure why that would be different OS X though.
Recently moved a (non-jfx) project to Eclipse and had to change 
class.getResourceAsStream to ClassLoader.getResourceAsStream. Because couldn’t 
figure out how to bundle the resource with the packaged class in Eclipse. Are 
the jars the same? If you jar -tvf is the resource where you expect to find it?



Re: Can't load fxml on Macos

2020-10-20 Thread Davide Perini

I'm creating my binary file using JPackage but I don't signed the binary.
can this be the problem.

why a simple line like this

FXMLLoader fxmlLoader =new FXMLLoader(GUIManager.class.getResource( fxml + 
Constants.FXML));

return null if it works on WIndows and Linux?

Thanks
Davide





Il 20/10/2020 15:54, Dirk Lemmermann ha scritto:

I worked with JavaFX on MacOS since 2013 and except for issues related to font 
rendering I never got the impression that MacOS is the black sheep. I also 
happen to know that many of the developers that are working on JavaFX use MacOS.

Dirk


On Oct 20, 2020, at 12:28 PM, Davide Perini  
wrote:

Hi all,
this code works well on both Windows and Linux running Java 15 on JavaFX 15.

FXMLLoader fxmlLoader =new FXMLLoader(GUIManager.class.getResource( fxml + 
Constants.FXML)); return fxmlLoader.load();


It doesn't work on Macos returning a nullpointer exception.

Any idea? Why Macos is always the black sheep?

Thanks
Davide




Re: Can't load fxml on Macos

2020-10-20 Thread Dirk Lemmermann
I worked with JavaFX on MacOS since 2013 and except for issues related to font 
rendering I never got the impression that MacOS is the black sheep. I also 
happen to know that many of the developers that are working on JavaFX use MacOS.

Dirk

> On Oct 20, 2020, at 12:28 PM, Davide Perini  
> wrote:
> 
> Hi all,
> this code works well on both Windows and Linux running Java 15 on JavaFX 15.
> 
> FXMLLoader fxmlLoader =new FXMLLoader(GUIManager.class.getResource( fxml + 
> Constants.FXML)); return fxmlLoader.load();
> 
> 
> It doesn't work on Macos returning a nullpointer exception.
> 
> Any idea? Why Macos is always the black sheep?
> 
> Thanks
> Davide



Re: Can't load fxml on Macos

2020-10-20 Thread Tom Schindl

Well, you don't give a enough information (no stacktrace, no context, ...).

If you have reproducable code please share it (with the current 
information provided I highly doubt this is an issue in Java/JavaFX).


Tom

Am 20.10.20 um 12:28 schrieb Davide Perini:

Hi all,
this code works well on both Windows and Linux running Java 15 on JavaFX 
15.


FXMLLoader fxmlLoader =new FXMLLoader(GUIManager.class.getResource( fxml 
+ Constants.FXML)); return fxmlLoader.load();



It doesn't work on Macos returning a nullpointer exception.

Any idea? Why Macos is always the black sheep?

Thanks
Davide


Can't load fxml on Macos

2020-10-20 Thread Davide Perini

Hi all,
this code works well on both Windows and Linux running Java 15 on JavaFX 15.

FXMLLoader fxmlLoader =new FXMLLoader(GUIManager.class.getResource( fxml + 
Constants.FXML)); return fxmlLoader.load();


It doesn't work on Macos returning a nullpointer exception.

Any idea? Why Macos is always the black sheep?

Thanks
Davide