Re: {NetBeans IDE] {JAVA]

2019-10-13 Thread Geertjan Wielenga
PS: “it all seems to work until the end” is like saying “everything went
fine with the rocket launch, except for the ending”.


On Sun, 13 Oct 2019 at 23:47, Geertjan Wielenga  wrote:

> 2014 is 5 years ago. That is not “a little dated”. If it were to work
> today, I would be extremely surprised. If you can figure out what needs to
> be done, that would help, which would be great, otherwise I doubt anyone
> else will.
>
> Gj
>
> On Sun, 13 Oct 2019 at 23:42, Lou  wrote:
>
>> I started with https://www.youtube.com/watch?v=ebHbDlTnV-I  It is a
>> little dated (2014) but all seems to work until the end 
>>
>> Looking at the directory structure on the Raspberry, the  Remote
>> Platform seems to create the structure in jre.  However, it looks to me tat
>> the required library libjli.so is not loaded on the pi.
>>
>> JDK 1.8.0_211
>>
>> NetBeans is on Windows 10,  Raspbian OS on the Raspberry Pi 3 B+
>>
>>
>> Lou
>>
>> On 10/13/2019 2:55 PM, Geertjan Wielenga wrote:
>>
>> OK, I see C:\\Program Files\\NetBeans-11.1 in there, but I don't think
>> anyone has tried or verified that with Raspberry Pi, what would be the
>> procedure to try that out?
>>
>> Gj
>>
>> On Sun, Oct 13, 2019 at 10:54 PM Geertjan Wielenga 
>> wrote:
>>
>>> What version of the JDK are you using? Which operating system, which
>>> version of NetBeans? Which steps did you follow, what must we do to
>>> reproduce the problem?
>>>
>>> Gj
>>>
>>> On Sun, Oct 13, 2019 at 10:53 PM Lou  wrote:
>>>
 I could use some help here. I'm new to NetBeans and don't have a clue
 where to start.

 Lou

 On 10/8/2019 10:13 PM, Lou wrote:

 When trying to add a remote embedded java platform on a Raspberry pi I
 get an error when I click 

 Looking at the Raspberry file structure it looks like the jre gets
 properly installed, however the last step fails.

 The following output seems to indicate that the problem is "error while
 loading shared libraries: libjli.so:" which I do not see in the raspberry
 /lib/ directory.   How do I fix this? With the error the IDE does not know
 about the remote platform and I can't move on.   I see libjli.so in the IDE
 under  -> 

 {Output}

 ant -f
 C:\\Users\\Lou\\AppData\\Local\\Temp\\antScript6991162096244334839.xml
 -Dremote.working.dir=/home/pi/NetBeansProjects/ -Dremote.password=*
 -Dremote.username=pi -Dremote.port=22 "-Dprobe.file=C:\\Program
 Files\\NetBeans-11.1\\netbeans\\java\\modules\\ext\\org-netbeans-modules-java-j2seembedded-probe.jar"
 -Dremote.host=192.168.1.147 -Dremote.platform.home=/home/pi/jre/
 -Dplatform.properties.file=C:\\Users\\Lou\\AppData\\Local\\Temp\\platform769343619457372633.properties
 connect-ssh-password
 connect-ssh-password:
 Connecting to 192.168.1.147:22
 cmd : mkdir -p '/home/pi/NetBeansProjects/'
 Connecting to 192.168.1.147:22
 done.
 Connecting to 192.168.1.147:22
 cmd : cd '/home/pi/NetBeansProjects/'; '/home/pi/jre//bin/java' -jar
 org-netbeans-modules-java-j2seembedded-probe.jar platform.properties
 /home/pi/jre//bin/java: error while loading shared libraries:
 libjli.so: cannot open shared object file: No such file or directory
 C:\Users\Lou\AppData\Local\Temp\antScript6991162096244334839.xml:44:
 Remote command failed with exit status 127
 BUILD FAILED (total time: 10 seconds)

 {Raspberry pi file structure}

 pi@raspberrypi:~ $ ls
 DesktopDownloads  MagPiMusic Pictures  Templates
 Documents  jremu_code  NetBeansProjects  PublicVideos
 pi@raspberrypi:~ $ ls NetBeansProjects
 org-netbeans-modules-java-j2seembedded-probe.jar
 <-
 pi@raspberrypi:~ $ ls jre
 bin  bom  COPYRIGHT  lib  release  THIRDPARTYLICENSEREADME.txt
 pi@raspberrypi:~ $ ls jre/bin
 java  keytool  rmid  rmiregistry
 pi@raspberrypi:~ $ ls jre/lib<-
 armjvm.hprof.txt
 calendars.properties   logging.properties
 charsets.jar   management
 classlist  management-agent.jar
 content-types.properties   meta-index
 currency.data  net.properties
 extresources.jar
 gcf.jarrt.jar
 hijrah-config-umalqura.properties  security
 jce.jartzdb.dat
 jsse.jar
 pi@raspberrypi:~ $


 --

 Lou




Re: {NetBeans IDE] {JAVA]

2019-10-13 Thread Geertjan Wielenga
2014 is 5 years ago. That is not “a little dated”. If it were to work
today, I would be extremely surprised. If you can figure out what needs to
be done, that would help, which would be great, otherwise I doubt anyone
else will.

Gj

On Sun, 13 Oct 2019 at 23:42, Lou  wrote:

> I started with https://www.youtube.com/watch?v=ebHbDlTnV-I  It is a
> little dated (2014) but all seems to work until the end 
>
> Looking at the directory structure on the Raspberry, the  Remote
> Platform seems to create the structure in jre.  However, it looks to me tat
> the required library libjli.so is not loaded on the pi.
>
> JDK 1.8.0_211
>
> NetBeans is on Windows 10,  Raspbian OS on the Raspberry Pi 3 B+
>
>
> Lou
>
> On 10/13/2019 2:55 PM, Geertjan Wielenga wrote:
>
> OK, I see C:\\Program Files\\NetBeans-11.1 in there, but I don't think
> anyone has tried or verified that with Raspberry Pi, what would be the
> procedure to try that out?
>
> Gj
>
> On Sun, Oct 13, 2019 at 10:54 PM Geertjan Wielenga 
> wrote:
>
>> What version of the JDK are you using? Which operating system, which
>> version of NetBeans? Which steps did you follow, what must we do to
>> reproduce the problem?
>>
>> Gj
>>
>> On Sun, Oct 13, 2019 at 10:53 PM Lou  wrote:
>>
>>> I could use some help here. I'm new to NetBeans and don't have a clue
>>> where to start.
>>>
>>> Lou
>>>
>>> On 10/8/2019 10:13 PM, Lou wrote:
>>>
>>> When trying to add a remote embedded java platform on a Raspberry pi I
>>> get an error when I click 
>>>
>>> Looking at the Raspberry file structure it looks like the jre gets
>>> properly installed, however the last step fails.
>>>
>>> The following output seems to indicate that the problem is "error while
>>> loading shared libraries: libjli.so:" which I do not see in the raspberry
>>> /lib/ directory.   How do I fix this? With the error the IDE does not know
>>> about the remote platform and I can't move on.   I see libjli.so in the IDE
>>> under  -> 
>>>
>>> {Output}
>>>
>>> ant -f
>>> C:\\Users\\Lou\\AppData\\Local\\Temp\\antScript6991162096244334839.xml
>>> -Dremote.working.dir=/home/pi/NetBeansProjects/ -Dremote.password=*
>>> -Dremote.username=pi -Dremote.port=22 "-Dprobe.file=C:\\Program
>>> Files\\NetBeans-11.1\\netbeans\\java\\modules\\ext\\org-netbeans-modules-java-j2seembedded-probe.jar"
>>> -Dremote.host=192.168.1.147 -Dremote.platform.home=/home/pi/jre/
>>> -Dplatform.properties.file=C:\\Users\\Lou\\AppData\\Local\\Temp\\platform769343619457372633.properties
>>> connect-ssh-password
>>> connect-ssh-password:
>>> Connecting to 192.168.1.147:22
>>> cmd : mkdir -p '/home/pi/NetBeansProjects/'
>>> Connecting to 192.168.1.147:22
>>> done.
>>> Connecting to 192.168.1.147:22
>>> cmd : cd '/home/pi/NetBeansProjects/'; '/home/pi/jre//bin/java' -jar
>>> org-netbeans-modules-java-j2seembedded-probe.jar platform.properties
>>> /home/pi/jre//bin/java: error while loading shared libraries:
>>> libjli.so: cannot open shared object file: No such file or directory
>>> C:\Users\Lou\AppData\Local\Temp\antScript6991162096244334839.xml:44:
>>> Remote command failed with exit status 127
>>> BUILD FAILED (total time: 10 seconds)
>>>
>>> {Raspberry pi file structure}
>>>
>>> pi@raspberrypi:~ $ ls
>>> DesktopDownloads  MagPiMusic Pictures  Templates
>>> Documents  jremu_code  NetBeansProjects  PublicVideos
>>> pi@raspberrypi:~ $ ls NetBeansProjects
>>> org-netbeans-modules-java-j2seembedded-probe.jar
>>> <-
>>> pi@raspberrypi:~ $ ls jre
>>> bin  bom  COPYRIGHT  lib  release  THIRDPARTYLICENSEREADME.txt
>>> pi@raspberrypi:~ $ ls jre/bin
>>> java  keytool  rmid  rmiregistry
>>> pi@raspberrypi:~ $ ls jre/lib<-
>>> armjvm.hprof.txt
>>> calendars.properties   logging.properties
>>> charsets.jar   management
>>> classlist  management-agent.jar
>>> content-types.properties   meta-index
>>> currency.data  net.properties
>>> extresources.jar
>>> gcf.jarrt.jar
>>> hijrah-config-umalqura.properties  security
>>> jce.jartzdb.dat
>>> jsse.jar
>>> pi@raspberrypi:~ $
>>>
>>>
>>> --
>>>
>>> Lou
>>>
>>>


Re: {NetBeans IDE] {JAVA]

2019-10-13 Thread Lou
I started with https://www.youtube.com/watch?v=ebHbDlTnV-I  It is a 
little dated (2014) but all seems to work until the end 


Looking at the directory structure on the Raspberry, the  Remote 
Platform seems to create the structure in jre.  However, it looks to me 
tat the required library libjli.so is not loaded on the pi.


JDK 1.8.0_211

NetBeans is on Windows 10,  Raspbian OS on the Raspberry Pi 3 B+

Lou

On 10/13/2019 2:55 PM, Geertjan Wielenga wrote:
OK, I see C:\\Program Files\\NetBeans-11.1 in there, but I don't think 
anyone has tried or verified that with Raspberry Pi, what would be the 
procedure to try that out?


Gj

On Sun, Oct 13, 2019 at 10:54 PM Geertjan Wielenga 
mailto:geert...@apache.org>> wrote:


What version of the JDK are you using? Which operating system,
which version of NetBeans? Which steps did you follow, what must
we do to reproduce the problem?

Gj

On Sun, Oct 13, 2019 at 10:53 PM Lou mailto:lk...@knob.com>> wrote:

I could use some help here. I'm new to NetBeans and don't have
a clue where to start.

Lou

On 10/8/2019 10:13 PM, Lou wrote:


When trying to add a remote embedded java platform on a
Raspberry pi I get an error when I click 

Looking at the Raspberry file structure it looks like the jre
gets properly installed, however the last step fails.

The following output seems to indicate that the problem is
"error while loading shared libraries: libjli.so:" which I do
not see in the raspberry /lib/ directory.   How do I fix
this? With the error the IDE does not know about the remote
platform and I can't move on.   I see libjli.so in the IDE
under  -> 

{Output}

ant -f
C:\\Users\\Lou\\AppData\\Local\\Temp\\antScript6991162096244334839.xml
-Dremote.working.dir=/home/pi/NetBeansProjects/
-Dremote.password=* -Dremote.username=pi -Dremote.port=22
"-Dprobe.file=C:\\Program

Files\\NetBeans-11.1\\netbeans\\java\\modules\\ext\\org-netbeans-modules-java-j2seembedded-probe.jar"
-Dremote.host=192.168.1.147
-Dremote.platform.home=/home/pi/jre/

-Dplatform.properties.file=C:\\Users\\Lou\\AppData\\Local\\Temp\\platform769343619457372633.properties
connect-ssh-password
connect-ssh-password:
Connecting to 192.168.1.147:22 
cmd : mkdir -p '/home/pi/NetBeansProjects/'
Connecting to 192.168.1.147:22 
done.
Connecting to 192.168.1.147:22 
cmd : cd '/home/pi/NetBeansProjects/';
'/home/pi/jre//bin/java' -jar
org-netbeans-modules-java-j2seembedded-probe.jar
platform.properties
/home/pi/jre//bin/java: error while loading shared libraries:
libjli.so: cannot open shared object file: No such file or
directory
C:\Users\Lou\AppData\Local\Temp\antScript6991162096244334839.xml:44:
Remote command failed with exit status 127
BUILD FAILED (total time: 10 seconds)

{Raspberry pi file structure}

pi@raspberrypi:~ $ ls
Desktop    Downloads  MagPi    Music Pictures  Templates
Documents  jre    mu_code  NetBeansProjects Public    Videos
pi@raspberrypi:~ $ ls NetBeansProjects
org-netbeans-modules-java-j2seembedded-probe.jar
<-
pi@raspberrypi:~ $ ls jre
bin  bom  COPYRIGHT  lib  release THIRDPARTYLICENSEREADME.txt
pi@raspberrypi:~ $ ls jre/bin
java  keytool  rmid  rmiregistry
pi@raspberrypi:~ $ ls jre/lib <-
arm    jvm.hprof.txt
calendars.properties logging.properties
charsets.jar   management
classlist management-agent.jar
content-types.properties   meta-index
currency.data  net.properties
ext    resources.jar
gcf.jar    rt.jar
hijrah-config-umalqura.properties  security
jce.jar    tzdb.dat
jsse.jar
pi@raspberrypi:~ $


-- 


Lou




Re: {NetBeans IDE] {JAVA]

2019-10-13 Thread Geertjan Wielenga
OK, I see C:\\Program Files\\NetBeans-11.1 in there, but I don't think
anyone has tried or verified that with Raspberry Pi, what would be the
procedure to try that out?

Gj

On Sun, Oct 13, 2019 at 10:54 PM Geertjan Wielenga 
wrote:

> What version of the JDK are you using? Which operating system, which
> version of NetBeans? Which steps did you follow, what must we do to
> reproduce the problem?
>
> Gj
>
> On Sun, Oct 13, 2019 at 10:53 PM Lou  wrote:
>
>> I could use some help here. I'm new to NetBeans and don't have a clue
>> where to start.
>>
>> Lou
>>
>> On 10/8/2019 10:13 PM, Lou wrote:
>>
>> When trying to add a remote embedded java platform on a Raspberry pi I
>> get an error when I click 
>>
>> Looking at the Raspberry file structure it looks like the jre gets
>> properly installed, however the last step fails.
>>
>> The following output seems to indicate that the problem is "error while
>> loading shared libraries: libjli.so:" which I do not see in the raspberry
>> /lib/ directory.   How do I fix this? With the error the IDE does not know
>> about the remote platform and I can't move on.   I see libjli.so in the IDE
>> under  -> 
>>
>> {Output}
>>
>> ant -f
>> C:\\Users\\Lou\\AppData\\Local\\Temp\\antScript6991162096244334839.xml
>> -Dremote.working.dir=/home/pi/NetBeansProjects/ -Dremote.password=*
>> -Dremote.username=pi -Dremote.port=22 "-Dprobe.file=C:\\Program
>> Files\\NetBeans-11.1\\netbeans\\java\\modules\\ext\\org-netbeans-modules-java-j2seembedded-probe.jar"
>> -Dremote.host=192.168.1.147 -Dremote.platform.home=/home/pi/jre/
>> -Dplatform.properties.file=C:\\Users\\Lou\\AppData\\Local\\Temp\\platform769343619457372633.properties
>> connect-ssh-password
>> connect-ssh-password:
>> Connecting to 192.168.1.147:22
>> cmd : mkdir -p '/home/pi/NetBeansProjects/'
>> Connecting to 192.168.1.147:22
>> done.
>> Connecting to 192.168.1.147:22
>> cmd : cd '/home/pi/NetBeansProjects/'; '/home/pi/jre//bin/java' -jar
>> org-netbeans-modules-java-j2seembedded-probe.jar platform.properties
>> /home/pi/jre//bin/java: error while loading shared libraries: libjli.so:
>> cannot open shared object file: No such file or directory
>> C:\Users\Lou\AppData\Local\Temp\antScript6991162096244334839.xml:44:
>> Remote command failed with exit status 127
>> BUILD FAILED (total time: 10 seconds)
>>
>> {Raspberry pi file structure}
>>
>> pi@raspberrypi:~ $ ls
>> DesktopDownloads  MagPiMusic Pictures  Templates
>> Documents  jremu_code  NetBeansProjects  PublicVideos
>> pi@raspberrypi:~ $ ls NetBeansProjects
>> org-netbeans-modules-java-j2seembedded-probe.jar
>> <-
>> pi@raspberrypi:~ $ ls jre
>> bin  bom  COPYRIGHT  lib  release  THIRDPARTYLICENSEREADME.txt
>> pi@raspberrypi:~ $ ls jre/bin
>> java  keytool  rmid  rmiregistry
>> pi@raspberrypi:~ $ ls jre/lib<-
>> armjvm.hprof.txt
>> calendars.properties   logging.properties
>> charsets.jar   management
>> classlist  management-agent.jar
>> content-types.properties   meta-index
>> currency.data  net.properties
>> extresources.jar
>> gcf.jarrt.jar
>> hijrah-config-umalqura.properties  security
>> jce.jartzdb.dat
>> jsse.jar
>> pi@raspberrypi:~ $
>>
>>
>> --
>>
>> Lou
>>
>>


Re: {NetBeans IDE] {JAVA]

2019-10-13 Thread Geertjan Wielenga
What version of the JDK are you using? Which operating system, which
version of NetBeans? Which steps did you follow, what must we do to
reproduce the problem?

Gj

On Sun, Oct 13, 2019 at 10:53 PM Lou  wrote:

> I could use some help here. I'm new to NetBeans and don't have a clue
> where to start.
>
> Lou
>
> On 10/8/2019 10:13 PM, Lou wrote:
>
> When trying to add a remote embedded java platform on a Raspberry pi I get
> an error when I click 
>
> Looking at the Raspberry file structure it looks like the jre gets
> properly installed, however the last step fails.
>
> The following output seems to indicate that the problem is "error while
> loading shared libraries: libjli.so:" which I do not see in the raspberry
> /lib/ directory.   How do I fix this? With the error the IDE does not know
> about the remote platform and I can't move on.   I see libjli.so in the IDE
> under  -> 
>
> {Output}
>
> ant -f
> C:\\Users\\Lou\\AppData\\Local\\Temp\\antScript6991162096244334839.xml
> -Dremote.working.dir=/home/pi/NetBeansProjects/ -Dremote.password=*
> -Dremote.username=pi -Dremote.port=22 "-Dprobe.file=C:\\Program
> Files\\NetBeans-11.1\\netbeans\\java\\modules\\ext\\org-netbeans-modules-java-j2seembedded-probe.jar"
> -Dremote.host=192.168.1.147 -Dremote.platform.home=/home/pi/jre/
> -Dplatform.properties.file=C:\\Users\\Lou\\AppData\\Local\\Temp\\platform769343619457372633.properties
> connect-ssh-password
> connect-ssh-password:
> Connecting to 192.168.1.147:22
> cmd : mkdir -p '/home/pi/NetBeansProjects/'
> Connecting to 192.168.1.147:22
> done.
> Connecting to 192.168.1.147:22
> cmd : cd '/home/pi/NetBeansProjects/'; '/home/pi/jre//bin/java' -jar
> org-netbeans-modules-java-j2seembedded-probe.jar platform.properties
> /home/pi/jre//bin/java: error while loading shared libraries: libjli.so:
> cannot open shared object file: No such file or directory
> C:\Users\Lou\AppData\Local\Temp\antScript6991162096244334839.xml:44:
> Remote command failed with exit status 127
> BUILD FAILED (total time: 10 seconds)
>
> {Raspberry pi file structure}
>
> pi@raspberrypi:~ $ ls
> DesktopDownloads  MagPiMusic Pictures  Templates
> Documents  jremu_code  NetBeansProjects  PublicVideos
> pi@raspberrypi:~ $ ls NetBeansProjects
> org-netbeans-modules-java-j2seembedded-probe.jar
> <-
> pi@raspberrypi:~ $ ls jre
> bin  bom  COPYRIGHT  lib  release  THIRDPARTYLICENSEREADME.txt
> pi@raspberrypi:~ $ ls jre/bin
> java  keytool  rmid  rmiregistry
> pi@raspberrypi:~ $ ls jre/lib<-
> armjvm.hprof.txt
> calendars.properties   logging.properties
> charsets.jar   management
> classlist  management-agent.jar
> content-types.properties   meta-index
> currency.data  net.properties
> extresources.jar
> gcf.jarrt.jar
> hijrah-config-umalqura.properties  security
> jce.jartzdb.dat
> jsse.jar
> pi@raspberrypi:~ $
>
>
> --
>
> Lou
>
>


Re: {NetBeans IDE] {JAVA]

2019-10-13 Thread Lou
I could use some help here. I'm new to NetBeans and don't have a clue 
where to start.


Lou

On 10/8/2019 10:13 PM, Lou wrote:


When trying to add a remote embedded java platform on a Raspberry pi I 
get an error when I click 


Looking at the Raspberry file structure it looks like the jre gets 
properly installed, however the last step fails.


The following output seems to indicate that the problem is "error 
while loading shared libraries: libjli.so:" which I do not see in the 
raspberry /lib/ directory.   How do I fix this? With the error the IDE 
does not know about the remote platform and I can't move on.   I see 
libjli.so in the IDE under  -> 


{Output}

ant -f 
C:\\Users\\Lou\\AppData\\Local\\Temp\\antScript6991162096244334839.xml 
-Dremote.working.dir=/home/pi/NetBeansProjects/ 
-Dremote.password=* -Dremote.username=pi -Dremote.port=22 
"-Dprobe.file=C:\\Program 
Files\\NetBeans-11.1\\netbeans\\java\\modules\\ext\\org-netbeans-modules-java-j2seembedded-probe.jar" 
-Dremote.host=192.168.1.147 -Dremote.platform.home=/home/pi/jre/ 
-Dplatform.properties.file=C:\\Users\\Lou\\AppData\\Local\\Temp\\platform769343619457372633.properties 
connect-ssh-password

connect-ssh-password:
Connecting to 192.168.1.147:22
cmd : mkdir -p '/home/pi/NetBeansProjects/'
Connecting to 192.168.1.147:22
done.
Connecting to 192.168.1.147:22
cmd : cd '/home/pi/NetBeansProjects/'; '/home/pi/jre//bin/java' -jar 
org-netbeans-modules-java-j2seembedded-probe.jar platform.properties
/home/pi/jre//bin/java: error while loading shared libraries: 
libjli.so: cannot open shared object file: No such file or directory
C:\Users\Lou\AppData\Local\Temp\antScript6991162096244334839.xml:44: 
Remote command failed with exit status 127

BUILD FAILED (total time: 10 seconds)

{Raspberry pi file structure}

pi@raspberrypi:~ $ ls
Desktop    Downloads  MagPi    Music Pictures Templates
Documents  jre    mu_code  NetBeansProjects  Public Videos
pi@raspberrypi:~ $ ls NetBeansProjects
org-netbeans-modules-java-j2seembedded-probe.jar 
<-

pi@raspberrypi:~ $ ls jre
bin  bom  COPYRIGHT  lib  release  THIRDPARTYLICENSEREADME.txt
pi@raspberrypi:~ $ ls jre/bin
java  keytool  rmid  rmiregistry
pi@raspberrypi:~ $ ls jre/lib <-
arm    jvm.hprof.txt
calendars.properties   logging.properties
charsets.jar   management
classlist  management-agent.jar
content-types.properties   meta-index
currency.data  net.properties
ext    resources.jar
gcf.jar    rt.jar
hijrah-config-umalqura.properties  security
jce.jar    tzdb.dat
jsse.jar
pi@raspberrypi:~ $


--

Lou


Re: [lookup] Accessing dynamically created objects through lookup

2019-10-13 Thread Patrik Karlström
Thank you Emilian, Marco and Geertjan.
I'll read up on what you mentioned and try things out.

Working on an alternative, pure JavaFX WindowSystem[1], I was looking for a
way to handle dynamically created "editor documents", but after a short
break I realized it can be done without lookup, the "editor documents" part
that is.

Not trying to rewrite the WindowSystem, just having a good enough one will
suffice.

[1] https://github.com/trixon/WindowSystemFX

Den sön 13 okt. 2019 kl 19:21 skrev Geertjan Wielenga :

> Or get hold of leanpub.com/nbp4beginners
>
> It hasn’t been updated for some time, but I’ve not yet seen anything in it
> that needs updating.
>
> Gj
>
> On Sun, 13 Oct 2019 at 19:17, Marco Rossi  wrote:
>
>> Hello Patrick,
>>
>> you should create your own Lookup where to put what you want. I called
>> this “MutableLookup” (I’ve found it on the web). You can use the put method
>> to add the instances or your objects to lookup.
>>
>> You could keep an instance of MutableLookup inside a TopComponent and
>> call TopComponent.associateLookup(myMutableLookup) to expose your objects
>> in the Lookup subsystem (via Utilities.actionsGlobalContext.lookup(...))
>> and retrieve them when the TopComponent is the active one.
>>
>> Since the “mutable” nature of this Lookup, you can add and remove your
>> objects at runtime.
>>
>> Here follow the code of MutableLookup class:
>>
>> public class MutableLookup extends AbstractLookup {
>> private static final Logger LOGGER =
>> Logger.getLogger(MutableLookup.class.getName());
>> private final Object lock = new Object();
>> private final InstanceContent content;
>>
>> static {
>> LOGGER.setLevel(Level.SEVERE);
>> }
>>
>> /**
>>  * Create a new DynamicLookup
>>  */
>> public MutableLookup() {
>> this(new InstanceContent());
>> }
>>
>> /**
>>  * Create a new DynamicLookup with the specific content
>>  * @param content
>>  */
>> public MutableLookup(InstanceContent content) {
>> super(content);
>> this.content = content;
>> }
>>
>> /**
>>  * Add a new object to this lookup.
>>  *
>>  * @param instance
>>  */
>> public void add(Object instance) {
>> synchronized (lock) {
>> content.add(instance);
>> }
>> }
>>
>> /**
>>  * Put the instance in this lookup. This method ensures that there is
>> only
>>  * one instance of that type class.
>>  * If there are other instances of the that class they will be
>> removed.
>>  * If instance parameter is null than all instances of that type will
>> be
>>  * removed from the lookup.
>>  *
>>  * @param 
>>  * @param type
>>  * @param instance
>>  */
>> public  void put(Class type, T instance) {
>> synchronized (lock) {
>> Collection all = lookupAll(type);
>> if (instance == null) {
>> remove(all);
>> } else if (!all.contains(instance)) {
>> remove(all);
>> content.add(instance);
>> LOGGER.log(Level.FINER, "added [{0}] to the lookup",
>> instance);
>> } else {
>> List instances = new LinkedList(all);
>> instances.remove(instance);
>> remove(instances);
>> }
>> }
>> }
>>
>> /**
>>  * Put collection in this lookup.
>>  * If there are other instances of the that class they will be
>> replaced.
>>  *
>>  * @param 
>>  * @param type
>>  * @param items
>>  */
>> public  void putAll(Class type, Collection items) {
>> synchronized (lock) {
>> Collection all = lookupAll(type);
>> remove(all);
>> for (T item : items) {
>> content.add(item);
>> }
>> }
>> }
>>
>> /**
>>  * Remove instance from the lookup.
>>  *
>>  * @param instance
>>  */
>> public void remove(Object instance) {
>> synchronized (lock) {
>> content.remove(instance);
>> }
>> }
>>
>> private  void remove(Collection items) {
>> for (T item : items) {
>> content.remove(item);
>> LOGGER.log(Level.FINER, "removed [{0}] from the lookup.",
>> item);
>> }
>> }
>> }
>>
>> Marco Rossi
>>
>> > Il giorno 13 ott 2019, alle ore 18:13, Patrik Karlström <
>> pat...@trixon.se> ha scritto:
>> >
>> > I feel somewhat stupid asking this one, but I just can't grip how to
>> "publish" a "dynamically created" object so it will show up in lookupAll().
>> >
>> > This is a really small library I'm working on and the only NetBeans
>> dependency I have is org-openide-util-lookup, if that matters at all.
>> >
>> > The following declared class:
>> > @ServiceProvider(service = Window.class)
>> > public class Left1bWindow extends Window {}
>> >
>> > shows up as expected when I do:
>> > var windows = new
>> 

Re: Java project now needs classpaths to run it

2019-10-13 Thread Geertjan Wielenga
You appear to be talking about the “java” command line below, which has
nothing at all to do with NetBeans. You seen to be using different versions
of Java.

Gj


On Fri, 20 Sep 2019 at 16:44, Peter Toye  wrote:

> Having just moved from NB version 8 to 11.1 there seems to have been a
> change in the command line needed to run a project.
>
> The OS is Windows 7 Home.
>
> The project has two external libraries: one in the Java modules in the
> NetBeans 11 directory, and one of my own. In version 8 it was possible to
> run the program with a command line like
>
>java -jar program.jar
>
> but this no longer works, and I have to put in a command line like
>
>   java -cp library paths program.jar
>
> which is a pain, as I can't automate that into a batch file.
>
> Is there any way of getting the libraries (or references to them) included
> in the jar file? The properties|Libraries|Run tab shows that the classpaths
> for Compiling Sources and Compiled Sources are included (at least as I
> understand the symbols on that page). Does the "Build Dependencies" tickbox
> have any significance here? The lack of a help file means that I can't find
> out what most of the window items actually mean.
>
> As a rider to this question, there seems to be two small bugs in the Ant
> script which produces the command line for running the project :
>
> To run this application from the command line without Ant, try:
> ??C:\Program Files\Java\jdk-12.0.1/bin/java -cp C:\Program Files\NetBeans
> 11\netbeans\java\modules\ext\AbsoluteLayout.jar;D:\Peter\Netbeans\Partitions511\dist\Partitions511.jar;D:\Peter\Netbeans\KillerSudoku11\dist\KillerSudoku11.jar
> com.ptoye.TestKiller.TestKiller??
>
> 1) In Windows, the Java executable and Netbeans are in the "Program Files"
> or "Program Files (x86)" folder. This should have quotes round it to run
> successfully.
>
> 2) In NB 11.1, the output mentions "Netbeans 11" - Shouldn't this be 
> C:\Program
> Files\NetBeans-11.1?
>
> Regards,
>
> Peter
> mailto:netbe...@ptoye.com 
> www.ptoye.com
>


Re: Global plugin installation in Linux

2019-10-13 Thread Geertjan Wielenga
Yes, that is a good approach.

In 11.2, we’re moving away from the JS parser needing to be installed
separately, in 11.3 (January next year) we’ll hopefully be able to bundle
C/C++ integration, and in 12.0 (April next year) we’ll hopefully not need
to have users install nb-javac at startup.

All this is part of our transition to Apache, which has a number of
licensing complications, all of which we’ll solve over time.

Gj

On Sun, 13 Oct 2019 at 20:19, Emilian Bold  wrote:

> The CoolBeans distribution (http://coolbeans.xyz ) seems like a good
> fit for you. Based on 11.1, comes with the up-to-date C/C++ plugins.
>
> --emi
>
> On Sun, Oct 13, 2019 at 9:05 PM Nikos Platis  wrote:
> >
> > Hello,
> >
> > I am maintaining a computer lab for my Department and students use
> Netbeans for several courses.
> >
> > In version 8.2 the main plugins (for Java, C++) were installed for all
> users globally since a suitable package existed.
> >
> > In the new version 11.1, even for Java, each user has to install some
> plugins.
> >
> > Since our students' home directories are rather tight in free space, I
> would like to have these plugins installed globally. Especially C/C++
> plugins will take up too much space in each home directory.
> >
> > Is there a way to achieve this?
> >
> > Our PCs are running Linux.
> >
> > Thanks!
>
> -
> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: users-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>


Re: Global plugin installation in Linux

2019-10-13 Thread Emilian Bold
The CoolBeans distribution (http://coolbeans.xyz ) seems like a good
fit for you. Based on 11.1, comes with the up-to-date C/C++ plugins.

--emi

On Sun, Oct 13, 2019 at 9:05 PM Nikos Platis  wrote:
>
> Hello,
>
> I am maintaining a computer lab for my Department and students use Netbeans 
> for several courses.
>
> In version 8.2 the main plugins (for Java, C++) were installed for all users 
> globally since a suitable package existed.
>
> In the new version 11.1, even for Java, each user has to install some plugins.
>
> Since our students' home directories are rather tight in free space, I would 
> like to have these plugins installed globally. Especially C/C++ plugins will 
> take up too much space in each home directory.
>
> Is there a way to achieve this?
>
> Our PCs are running Linux.
>
> Thanks!

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Global plugin installation in Linux

2019-10-13 Thread Nikos Platis
Hello,

I am maintaining a computer lab for my Department and students use Netbeans
for several courses.

In version 8.2 the main plugins (for Java, C++) were installed for all
users globally since a suitable package existed.

In the new version 11.1, even for Java, each user has to install some
plugins.

Since our students' home directories are rather tight in free space, I
would like to have these plugins installed globally. Especially C/C++
plugins will take up too much space in each home directory.

Is there a way to achieve this?

Our PCs are running Linux.

Thanks!


Re: [lookup] Accessing dynamically created objects through lookup

2019-10-13 Thread Emilian Bold
The Lookup is just a 'HashSet' where a single instance for your service is
added at startup (more or less).

That's the only relationship between the two. Creating further objects does
not add them to the Lookup, they are just normal Java objects created with
a constructor.

I wonder if you could use SharedClassObject although that's an old
deprecated class and I'm not sure if new instances auto-add themselves. You
can probably implement something like this yourself but it's an odd pattern.

--emi

dum., 13 oct. 2019, 19:31 Patrik Karlström  a scris:

> I feel somewhat stupid asking this one, but I just can't grip how to
> "publish" a "dynamically created" object so it will show up in lookupAll().
>
> This is a really small library I'm working on and the only NetBeans
> dependency I have is org-openide-util-lookup, if that matters at all.
>
> The following declared class:
> @ServiceProvider(service = Window.class)
> public class Left1bWindow extends Window {}
>
> shows up as expected when I do:
> var windows = new ArrayList<>(Lookup.getDefault().lookupAll(Window.class));
>
> but a simple object creation will not.
> Window someOtherWindow=new Window();
>
> What can I do to get the desired result?
>


Re: [lookup] Accessing dynamically created objects through lookup

2019-10-13 Thread Geertjan Wielenga
Or get hold of leanpub.com/nbp4beginners

It hasn’t been updated for some time, but I’ve not yet seen anything in it
that needs updating.

Gj

On Sun, 13 Oct 2019 at 19:17, Marco Rossi  wrote:

> Hello Patrick,
>
> you should create your own Lookup where to put what you want. I called
> this “MutableLookup” (I’ve found it on the web). You can use the put method
> to add the instances or your objects to lookup.
>
> You could keep an instance of MutableLookup inside a TopComponent and call
> TopComponent.associateLookup(myMutableLookup) to expose your objects in the
> Lookup subsystem (via Utilities.actionsGlobalContext.lookup(...)) and
> retrieve them when the TopComponent is the active one.
>
> Since the “mutable” nature of this Lookup, you can add and remove your
> objects at runtime.
>
> Here follow the code of MutableLookup class:
>
> public class MutableLookup extends AbstractLookup {
> private static final Logger LOGGER =
> Logger.getLogger(MutableLookup.class.getName());
> private final Object lock = new Object();
> private final InstanceContent content;
>
> static {
> LOGGER.setLevel(Level.SEVERE);
> }
>
> /**
>  * Create a new DynamicLookup
>  */
> public MutableLookup() {
> this(new InstanceContent());
> }
>
> /**
>  * Create a new DynamicLookup with the specific content
>  * @param content
>  */
> public MutableLookup(InstanceContent content) {
> super(content);
> this.content = content;
> }
>
> /**
>  * Add a new object to this lookup.
>  *
>  * @param instance
>  */
> public void add(Object instance) {
> synchronized (lock) {
> content.add(instance);
> }
> }
>
> /**
>  * Put the instance in this lookup. This method ensures that there is
> only
>  * one instance of that type class.
>  * If there are other instances of the that class they will be removed.
>  * If instance parameter is null than all instances of that type will
> be
>  * removed from the lookup.
>  *
>  * @param 
>  * @param type
>  * @param instance
>  */
> public  void put(Class type, T instance) {
> synchronized (lock) {
> Collection all = lookupAll(type);
> if (instance == null) {
> remove(all);
> } else if (!all.contains(instance)) {
> remove(all);
> content.add(instance);
> LOGGER.log(Level.FINER, "added [{0}] to the lookup",
> instance);
> } else {
> List instances = new LinkedList(all);
> instances.remove(instance);
> remove(instances);
> }
> }
> }
>
> /**
>  * Put collection in this lookup.
>  * If there are other instances of the that class they will be
> replaced.
>  *
>  * @param 
>  * @param type
>  * @param items
>  */
> public  void putAll(Class type, Collection items) {
> synchronized (lock) {
> Collection all = lookupAll(type);
> remove(all);
> for (T item : items) {
> content.add(item);
> }
> }
> }
>
> /**
>  * Remove instance from the lookup.
>  *
>  * @param instance
>  */
> public void remove(Object instance) {
> synchronized (lock) {
> content.remove(instance);
> }
> }
>
> private  void remove(Collection items) {
> for (T item : items) {
> content.remove(item);
> LOGGER.log(Level.FINER, "removed [{0}] from the lookup.",
> item);
> }
> }
> }
>
> Marco Rossi
>
> > Il giorno 13 ott 2019, alle ore 18:13, Patrik Karlström <
> pat...@trixon.se> ha scritto:
> >
> > I feel somewhat stupid asking this one, but I just can't grip how to
> "publish" a "dynamically created" object so it will show up in lookupAll().
> >
> > This is a really small library I'm working on and the only NetBeans
> dependency I have is org-openide-util-lookup, if that matters at all.
> >
> > The following declared class:
> > @ServiceProvider(service = Window.class)
> > public class Left1bWindow extends Window {}
> >
> > shows up as expected when I do:
> > var windows = new
> ArrayList<>(Lookup.getDefault().lookupAll(Window.class));
> >
> > but a simple object creation will not.
> > Window someOtherWindow=new Window();
> >
> > What can I do to get the desired result?
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: users-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>


Re: [lookup] Accessing dynamically created objects through lookup

2019-10-13 Thread Marco Rossi
Hello Patrick,

you should create your own Lookup where to put what you want. I called this 
“MutableLookup” (I’ve found it on the web). You can use the put method to add 
the instances or your objects to lookup.

You could keep an instance of MutableLookup inside a TopComponent and call 
TopComponent.associateLookup(myMutableLookup) to expose your objects in the 
Lookup subsystem (via Utilities.actionsGlobalContext.lookup(...)) and retrieve 
them when the TopComponent is the active one.

Since the “mutable” nature of this Lookup, you can add and remove your objects 
at runtime.

Here follow the code of MutableLookup class:

public class MutableLookup extends AbstractLookup {
private static final Logger LOGGER = 
Logger.getLogger(MutableLookup.class.getName());
private final Object lock = new Object();
private final InstanceContent content;

static {
LOGGER.setLevel(Level.SEVERE);
}

/**
 * Create a new DynamicLookup
 */
public MutableLookup() {
this(new InstanceContent());
}

/**
 * Create a new DynamicLookup with the specific content
 * @param content 
 */
public MutableLookup(InstanceContent content) {
super(content);
this.content = content;
}

/**
 * Add a new object to this lookup.
 * 
 * @param instance 
 */
public void add(Object instance) {
synchronized (lock) {
content.add(instance);
}
}

/**
 * Put the instance in this lookup. This method ensures that there is only
 * one instance of that type class.
 * If there are other instances of the that class they will be removed.
 * If instance parameter is null than all instances of that type will be
 * removed from the lookup.
 * 
 * @param 
 * @param type
 * @param instance 
 */
public  void put(Class type, T instance) {
synchronized (lock) {
Collection all = lookupAll(type);
if (instance == null) {
remove(all);
} else if (!all.contains(instance)) {
remove(all);
content.add(instance);
LOGGER.log(Level.FINER, "added [{0}] to the lookup", instance);
} else {
List instances = new LinkedList(all);
instances.remove(instance);
remove(instances);
}
}
}

/**
 * Put collection in this lookup.
 * If there are other instances of the that class they will be replaced.
 * 
 * @param 
 * @param type
 * @param items 
 */
public  void putAll(Class type, Collection items) {
synchronized (lock) {
Collection all = lookupAll(type);
remove(all);
for (T item : items) {
content.add(item);
}
}
}

/**
 * Remove instance from the lookup.
 * 
 * @param instance 
 */
public void remove(Object instance) {
synchronized (lock) {
content.remove(instance);
}
}

private  void remove(Collection items) {
for (T item : items) {
content.remove(item);
LOGGER.log(Level.FINER, "removed [{0}] from the lookup.", item);
}
}
}

Marco Rossi

> Il giorno 13 ott 2019, alle ore 18:13, Patrik Karlström  ha 
> scritto:
> 
> I feel somewhat stupid asking this one, but I just can't grip how to 
> "publish" a "dynamically created" object so it will show up in lookupAll().
> 
> This is a really small library I'm working on and the only NetBeans 
> dependency I have is org-openide-util-lookup, if that matters at all.
> 
> The following declared class: 
> @ServiceProvider(service = Window.class)
> public class Left1bWindow extends Window {}
> 
> shows up as expected when I do:
> var windows = new ArrayList<>(Lookup.getDefault().lookupAll(Window.class));
> 
> but a simple object creation will not.
> Window someOtherWindow=new Window();
> 
> What can I do to get the desired result?


-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[lookup] Accessing dynamically created objects through lookup

2019-10-13 Thread Patrik Karlström
I feel somewhat stupid asking this one, but I just can't grip how to
"publish" a "dynamically created" object so it will show up in lookupAll().

This is a really small library I'm working on and the only NetBeans
dependency I have is org-openide-util-lookup, if that matters at all.

The following declared class:
@ServiceProvider(service = Window.class)
public class Left1bWindow extends Window {}

shows up as expected when I do:
var windows = new ArrayList<>(Lookup.getDefault().lookupAll(Window.class));

but a simple object creation will not.
Window someOtherWindow=new Window();

What can I do to get the desired result?