Re: Netbeans 22 & gradle: anyway to use Gradle's source/target compatibility?

2024-06-12 Thread Laszlo Kishalmi
The best would be to use the Gradle Java Toolchain feature. 
https://docs.gradle.org/current/userguide/toolchains.html


That's a bit other way around, Gradle may download and install a JDK 
with the specified version if that version does not exist in your system.


NetBeans 22 is going to respect the JDK and language version specified 
in the toolchain. (this is a new feature in NB22)


On 6/7/24 04:20, Fred Welland wrote:
Is there any way to have NB use source/target compatibility declared 
in build.gradle to select a 'matching' (already configured in NB)  
java platform  (w/o ?


So as to avoid having NB hammer in netbeans.hint.jdkPlatform= into 
gradle.properties  (which , for us, is under SCCS).


(Seems silly or petty, but 'we' strive to have build.gradle and 
related artifacts,  devoid of any sort of IDE-isms)


Alternatively,  maybe some .gitignorable file could track this bread 
crumb in the  projectDir/.gradle or projectDir/.gradle/nb-cache  or 
something like that?


TIA,

-Fred




-
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: Upgrade Gradle version.

2024-01-24 Thread Laszlo Kishalmi

Set the Java Runtime Version for Gradle to Java 17 in NetBeans.

On 1/24/24 17:43, Owen Thomas wrote:

I'm thoroughly lost with Gradle.

Can someone please tell me which version of Java I should use and 
version of this build tool I should upgrade to with the current 
release of Netbeans?


This is all too frustrating.

  Owen.


-
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: 'Run single' not working outside of IDE 18

2023-12-28 Thread Laszlo Kishalmi



On 12/28/23 08:49, Ulrich Mayring wrote:
I decided not to leak NetBeans internals into the Output window. That 
probably would have confused more people, than hiding those things, 
and again that would leak internals into the output window. I was 
planning to add an option, that could enable displaying the full 
command line, if there would be enough complaints.


Well, it turned out that it was the other way round: hiding confused 
the hell out of me :)
Well, I'm sorry about that. Maybe you are not the first one since the 
introduction of Gradle in NetBeans 11.0, but the first to raise his 
voice about that.


I'm not familiar with NB practices, but for me the whole point of 
logging is to expose internals. Error dialogs should give a 
user-friendly output, but logging is exactly for exposing internals in 
order to facilitate debugging.


Later on the "best effort" caused some misunderstanding when used 
with certain plugins, so we decided to deprecate "runSingle", 
encourage people to inspect and configure their build script right, 
instead of relying on NetBeans heuristics.


I assumed that "Run Single" and all other commands that are built into 
the IDE are an API that has to be implemented by the authors of a 
build system plugin (like Gradle or Maven). Deprecating this API might 
make it easier for plugin authors, but it will take a feature away 
from users.


Well, the main concept used in Gradle for NetBeans is that is should be 
no intrusive. In early days the IDEA and Eclipse plugins were written by 
the Gradle team and those plugins were used to create configuration 
files for the specific IDEs (like .idea directory and the .project for 
Eclipse). NetBeans did not need those plugins defined (maybe it's true 
for IDEA and Eclipse by now).


The only time that concept was violated is the runSingle and explodedWar 
task injection. Those are for cover shortcomings of Gradle. In the 
meantime Gradle evolved a lot, probably by NB21 or NB22 (more specific 
Gradle 8.5+) there would be a standard Gradle way to achieve  runSingle 
without NetBeans augmenting a build.


It's not about deprecating an API. It's about to encourage people to 
take care of their build scripts, in order not to rely on our 
heuristics. Also the way IDE actions mapped to build system calls can be 
configured in project properties Build > Build Actions




Also, if there were conceptual difficulties implementing this API in 
an interoperable manner, then the same problems can be expected for 
users, if we ask them to implement the feature in their build scripts. 
If it were easy to implement in the build script, then surely there 
would be no conceptual problems coming up with a heuristic for the IDE.


As far as I can see, if I have 100 classes that I want to potentially 
run as "Run Single" or 3000 methods that I want to run as "Run focused 
test method", then I need to write 100 or 3000 tasks in the build 
script. The point is that as an IDE user I can click on a method or 
class and say "Run this" or "Test this". So the UI needs to pass the 
selected method or class to the build script. In which case it could 
easily output the generated gradlew (or mvn) command in the Output 
Window. We (users of an IDE) are all developers, too, and not easily 
confused by comprehensive output - more so, however, by incomplete output.


Well, "Run Single" is not supported by Gradle builds, where run, debug 
tests and/or test methods are, so we are safe on the test side.


Here you say the users of the IDE are developers. That's not entirely 
true, many of them are students, who are often fighting with semicolon 
placement problems. For them the injected 'runSingle' task is fine.


I'd say for developers write their own runSingle or extend run task 
should not be a problem.


Still, I acknowledge that there are room for improvements. Would that 
happen? Maybe. Usual time and money issue (where time is money). I'd 
encourage you to step up, if something bugs you, provide a PR, add 
documentation, etc. Contribute!





-
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



-
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: 'Run single' not working outside of IDE 18

2023-12-28 Thread Laszlo Kishalmi



On 12/28/23 01:34, Ulrich Mayring wrote:
I find that most unfortunate. I've been using Netbeans for many years 
and the one clear advantage it always had for me over other IDEs is 
that it was just a frontend to my build script. So everything would 
behave exactly the same in the IDE as it would later in the CI process.


Is this a newer development or has it been that way forever and I just 
never noticed? I seem to remember that I have occasionally copied 
commands from the output window to the command line and it always 
worked - perhaps the runSingle command is different from other 
commands in that regard?


In any case, I believe if the IDE outputs what looks like a script, 
then that script should work. So I take it that some vital pre- or 
post-commands are missing from the output?


Well, you are right. I was thinking about it, when I wrote the specific 
code. So a little background:


There are a few things Gradle build does not support on their own, 
however it would be really handy in the IDE, these are running a single 
java file, and supporting "exploded" war deployment. NetBeans is 
injecting these support when the Augmented Build Execution is enabled on 
the root project. These injections on "best effort" based, and the most 
often used runSingle has been deprecated in NB19


I decided not to leak NetBeans internals into the Output window. That 
probably would have confused more people, than hiding those things, and 
again that would leak internals into the output window. I was planning 
to add an option, that could enable displaying the full command line, if 
there would be enough complaints.


Later on the "best effort" caused some misunderstanding when used with 
certain plugins, so we decided to deprecate "runSingle", encourage 
people to inspect and configure their build script right, instead of 
relying on NetBeans heuristics.




Am 28.12.23 um 04:50 schrieb Laszlo Kishalmi:
NetBeans has it's own Gradle Init Script which can inject tasks into 
the Gradle build. That script is not presented in the executed 
command line.


If you intend to use a runSingle task outside of NetBeans, it's 
better to define that task in the build.gradle file. When it is 
present NetBeans will also attempt to use task instead of injecting one.


On 12/27/23 03:08, Ulrich Mayring wrote:

Hi folks,

when I "Run single" in one of my projects, then the IDE starts my 
program like this (per the Output Window):


JAVA_HOME="/my/path/to/java_sdk_17"
cd /home/myuser/myproject/mysubproject; ../gradlew 
-PrunClassName=package.MyMainClass -s -x check -x test runSingle


However, when I use exactly that code from the command line I get 
the error message:


org.gradle.execution.TaskSelectionException: Task 'runSingle' not 
found in project ':mysubproject'.


../gradlew -version gives me 'Gradle 8.1.1'

Other tasks like "build" etc. do work, it appears only the 
NB-specific tasks are not found. What could be the problem here?




-
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





-
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: 'Run single' not working outside of IDE 18

2023-12-27 Thread Laszlo Kishalmi
NetBeans has it's own Gradle Init Script which can inject tasks into the 
Gradle build. That script is not presented in the executed command line.


If you intend to use a runSingle task outside of NetBeans, it's better 
to define that task in the build.gradle file. When it is present 
NetBeans will also attempt to use task instead of injecting one.


On 12/27/23 03:08, Ulrich Mayring wrote:

Hi folks,

when I "Run single" in one of my projects, then the IDE starts my 
program like this (per the Output Window):


JAVA_HOME="/my/path/to/java_sdk_17"
cd /home/myuser/myproject/mysubproject; ../gradlew 
-PrunClassName=package.MyMainClass -s -x check -x test runSingle


However, when I use exactly that code from the command line I get the 
error message:


org.gradle.execution.TaskSelectionException: Task 'runSingle' not 
found in project ':mysubproject'.


../gradlew -version gives me 'Gradle 8.1.1'

Other tasks like "build" etc. do work, it appears only the NB-specific 
tasks are not found. What could be the problem here?




-
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: Java version: 21 ... not supported by Gradle 8.5

2023-12-04 Thread Laszlo Kishalmi
Indeed you are right! It seems the bootclasspath is set to the runtime 
classpath, that means the Java 21 syntax elements would be available in 
the editor, but the new API won't.


Oh, so many things to do...

On 12/4/23 16:41, Ernie Rael wrote:

Thanks for the discussion Laszlo,

After reading your post (more than once) I tried a variety of 
different things, including settings the toolchain version to "21" and 
also "options.release = 21" for the hell of it.


gradleproject1:lib > properties > Sources > Source/Binary Format

is 21. When I add the line

import java.util.SequencedCollection;

It's highlighted as an error in the editor; though it does 
clean/build. It looks like the Source/Binary Format property, which 
/is being picked up by gradle/, is not being used by the IDE-editor. 
(I remember https://github.com/apache/netbeans/pull/4711 which fixed 
this value for gradle because "This information is used by 
editor/hints.", but things evolve).


And when I change

gradleproject1 > properties > Build > GradleExecution > Java Runtime

to JDK 21, the editor errors go away but the warnings from project 
problems comes on.


Bottom line, AFAICT,

NB-20 Cannot open a "gradle with Java" project that uses JDK-21
APIs without warnings/errors

no matter how the project is setup.

-ernie

On 23/12/03 5:58 PM, Laszlo Kishalmi wrote:


Well, the rapid changes of Java put pressure on the tool platforms, 
and JVM based languages. That makes our life more difficult.


As of NetBeans, it was quite a fight to move away from Java 8 as a 
runtime platform. That does not mean that  NetBeans does not support 
Java 8 any more, rather, that You need to run NetBeans at least on 
Java 11. As of NetBeans 20, It runs on Java 11 - Java 21, while 
supports Java 8 - Java 21



As of Gradle. Gradle supports Groovy and Kotlin as base of its DSL. 
Usually when the new JVM comes out both Groovy and Kotlin takes some 
time to support running on the new JVM. So they are not in an easy 
position, especially as they still need to support running on Java 8 
fro a while.


In order to cope with that challenge Gradle stated to use a Java 
Toolchain system, which decouples the Runtime Gradle is running on 
from the Java version it is using during the builds.


If I remember well, on 8.4 they found themself in the situation with 
Java 21, where the Groovy parts were able to run on Java 21 while the 
Kotlin related things were not able to run on Java 21 VM. Java 21 
Toolchain was ready by then. That means Gradle 8.4 itself is not able 
to run on Java 21, but able to use Java 21 for builds.


With Gradle 8.5, it is also able to run on Java 21 VM.

It would be nice if NetBeans would be automatically select a good 
Java Runtime for Gradle out of the box though. We have all the parts 
in NetBeans to be able to make it happen, somebody just would need to 
do the job.



Addendum: Before Gradle 8.5, Gradle java projects, generated with 
Gradle were using the Java version of the Gradle Runtime as the Jave 
version for the new project. That's been changed as of: 
https://docs.gradle.org/8.5/release-notes.html#build-init


So what is happening now when creating a new project on NB20 is 
running on Java 21 with Gradle 8.4 Tooling (that's the one NB20 is 
bundling), when using the defaults .
 1. NetBeans invokes gradle init with Java 21, as Gradle 8.4 Groovy 
parts works with Java 21, it will create a new project, with java 
toolchain 21


 2. NetBeans knows that Gradle 8.4 is not Java 21 Runtime comaptible 
(that's hard coded in NB). So it simply refuse to load the project, 
while the Gradle Java runtime is set to Java 21 (Default).


That's when people get confused.

Again NB should do a better job selecting the Gradle Java runtime.


On 12/3/23 17:20, Ernie Rael wrote:

On 23/12/03 3:51 PM, Laszlo Kishalmi wrote:
Well, unfortunately gradle init only supports java version 
specification since Gradle 8.5


NB20 is bundled with Gradle 8.4.


The gradle 8.4 release notes say

"Java 21 is now supported"

if that matters.



There is a bit workaround needed to run Java 21 projects with Gradle.


I can run the project tests with no workaround.

Also, I manually set the gradle version for the project to 8.5

./gradlew wrapper --gradle-version 8.5

The problem icon is still there and the message says

"Java version: 21 ... not supported by Gradle 8.5"

Both 8.4 and 8.5 claim to support JDK-21. This all makes no sense.

I think (I don't remember) that I could run the project tests when 
it was gradle 8.4 as well with no workaround.


This all makes me wonder if there's something hardcoded in NetBeans 
about JDK-21 and gradle.


-ernie




Set the Java Runtime version for Gradle in Tools > Options > Java > 
Gradle to Java 20 or below.


From there you can use any Java version in your Gradle projects, 
whatever that Gradle version support.

Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-03 Thread Laszlo Kishalmi
Well, the rapid changes of Java put pressure on the tool platforms, and 
JVM based languages. That makes our life more difficult.


As of NetBeans, it was quite a fight to move away from Java 8 as a 
runtime platform. That does not mean that  NetBeans does not support 
Java 8 any more, rather, that You need to run NetBeans at least on Java 
11. As of NetBeans 20, It runs on Java 11 - Java 21, while supports Java 
8 - Java 21



As of Gradle. Gradle supports Groovy and Kotlin as base of its DSL. 
Usually when the new JVM comes out both Groovy and Kotlin takes some 
time to support running on the new JVM. So they are not in an easy 
position, especially as they still need to support running on Java 8 fro 
a while.


In order to cope with that challenge Gradle stated to use a Java 
Toolchain system, which decouples the Runtime Gradle is running on from 
the Java version it is using during the builds.


If I remember well, on 8.4 they found themself in the situation with 
Java 21, where the Groovy parts were able to run on Java 21 while the 
Kotlin related things were not able to run on Java 21 VM. Java 21 
Toolchain was ready by then. That means Gradle 8.4 itself is not able to 
run on Java 21, but able to use Java 21 for builds.


With Gradle 8.5, it is also able to run on Java 21 VM.

It would be nice if NetBeans would be automatically select a good Java 
Runtime for Gradle out of the box though. We have all the parts in 
NetBeans to be able to make it happen, somebody just would need to do 
the job.



Addendum: Before Gradle 8.5, Gradle java projects, generated with Gradle 
were using the Java version of the Gradle Runtime as the Jave version 
for the new project. That's been changed as of: 
https://docs.gradle.org/8.5/release-notes.html#build-init


So what is happening now when creating a new project on NB20 is running 
on Java 21 with Gradle 8.4 Tooling (that's the one NB20 is bundling), 
when using the defaults .
 1. NetBeans invokes gradle init with Java 21, as Gradle 8.4 Groovy 
parts works with Java 21, it will create a new project, with java 
toolchain 21


 2. NetBeans knows that Gradle 8.4 is not Java 21 Runtime comaptible 
(that's hard coded in NB). So it simply refuse to load the project, 
while the Gradle Java runtime is set to Java 21 (Default).


That's when people get confused.

Again NB should do a better job selecting the Gradle Java runtime.


On 12/3/23 17:20, Ernie Rael wrote:

On 23/12/03 3:51 PM, Laszlo Kishalmi wrote:
Well, unfortunately gradle init only supports java version 
specification since Gradle 8.5


NB20 is bundled with Gradle 8.4.


The gradle 8.4 release notes say

"Java 21 is now supported"

if that matters.



There is a bit workaround needed to run Java 21 projects with Gradle.


I can run the project tests with no workaround.

Also, I manually set the gradle version for the project to 8.5

./gradlew wrapper --gradle-version 8.5

The problem icon is still there and the message says

"Java version: 21 ... not supported by Gradle 8.5"

Both 8.4 and 8.5 claim to support JDK-21. This all makes no sense.

I think (I don't remember) that I could run the project tests when it 
was gradle 8.4 as well with no workaround.


This all makes me wonder if there's something hardcoded in NetBeans 
about JDK-21 and gradle.


-ernie




Set the Java Runtime version for Gradle in Tools > Options > Java > 
Gradle to Java 20 or below.


From there you can use any Java version in your Gradle projects, 
whatever that Gradle version support.


Gradle 8.4 does support Java 21 using Java Toolchain, should work.

java {
    toolchain {
    languageVersion = JavaLanguageVersion.of(21)
    }
}

On 12/3/23 13:30, Ernie Rael wrote:

Running NB-20, jdk21.

The goal is to play with some JDK-21 APIs...

Creating a project using NB's "New Project > Java with Gradle".

I can build and run the default "Library" and test. But there's the 
warning icon and "Resolve Project Problems".


Any way to get rid of the warning?

-ernie


"Resolve Project Problems"

The Java version: 21, that is selected for the project is not 
supported by

Gradle 8.4.The IDE will attempt to use Gradle 8.4 to gather the project
information.
Possible solutions:
Upgrade your Gradle version on your project
Select Java Runtime 20 (or below), on Build > Gradle Execution 
settings, to avoid this problem!





-
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



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

For further in

Re: Java version: 21 ... not supported by Gradle 8.5

2023-12-03 Thread Laszlo Kishalmi
Well, unfortunately gradle init only supports java version specification 
since Gradle 8.5


NB20 is bundled with Gradle 8.4.

There is a bit workaround needed to run Java 21 projects with Gradle.

Set the Java Runtime version for Gradle in Tools > Options > Java > 
Gradle to Java 20 or below.


From there you can use any Java version in your Gradle projects, 
whatever that Gradle version support.


Gradle 8.4 does support Java 21 using Java Toolchain, should work.

java {
    toolchain {
    languageVersion = JavaLanguageVersion.of(21)
    }
}

On 12/3/23 13:30, Ernie Rael wrote:

Running NB-20, jdk21.

The goal is to play with some JDK-21 APIs...

Creating a project using NB's "New Project > Java with Gradle".

I can build and run the default "Library" and test. But there's the 
warning icon and "Resolve Project Problems".


Any way to get rid of the warning?

-ernie


"Resolve Project Problems"

The Java version: 21, that is selected for the project is not 
supported by

Gradle 8.4.The IDE will attempt to use Gradle 8.4 to gather the project
information.
Possible solutions:
Upgrade your Gradle version on your project
Select Java Runtime 20 (or below), on Build > Gradle Execution 
settings, to avoid this problem!





-
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



-
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: Two finger swipe left - right makes editor go wild

2023-10-30 Thread Laszlo Kishalmi


On 10/28/23 12:44, Michael Bien wrote:

On 28.10.23 14:09, Laszlo Kishalmi wrote:



On 10/28/23 04:52, Neil C Smith wrote:



On Sat, 28 Oct 2023, 12:29 Neil C Smith,  wrote:



On Sat, 28 Oct 2023, 11:59 Laszlo Kishalmi,
 wrote:

It would be good if somebody could test the Mouse Button
layouts on
Windows and Mac, probably can remove the MOUSE_BUTTON4 and
MOUSE_BUTTON5
registration...


They weren't added by accident! ;-)

I have all 3 OS to hand, and tested this on all 3. As far as I
could tell, buttons 4 & 5 are required for Mac and Windows.
Linux is the odd one out here, unfortunately.

Personally, my Wayland laptop trackpad doesn't show this issue.
We don't have an option to have disabled mappings. If the
reports are more than a one off issue, then the only option is
really to remove all the default mouse button mappings for NB20
and let people configure them if they want. But it's not very
discoverable, and leaves the original feature request still
unfulfilled.


PS. Also, if you look at this comment you'll notice that Michael and 
I had a conversation on the PR about xev values and the JDK numbers 
being two lower because of scroll wheel events 
https://github.com/apache/netbeans/pull/6434#issuecomment-1715252021


If we are 100% sure that 4&5 (native 6&7) map to horizontal scroll, 
we could drop the value down another two in the event handler to 
bring all OS in line?
That what I am thinking about! I think that would be safe to do, or 
introduce a  MOUSE_WHEEL_LEFT and MOUSE_WHEEL_RIGHT for those buttons 
and map the rest with two down on Linux.


can confirm that mouse wheel left/right is button 4/5 on my mouse on 
linux (swing event numbers, which are not the button numbers i see via 
piper or xev)


I can confirm on both X11 and Wayland. Horizontal wheels, two finger 
scrolls on touchpad are converted to 4/5 (left/right) buttons. 
Back/forward is 6/7 (even on my TrackMan Marble, I dug up from the 
bottom of an old wires box).


Proposed patch: https://github.com/apache/netbeans/pull/6636



back/forward is 6/7

(Thumb button would be 8 and a second set of forward/back is 9/10 but 
most mice with a lot of buttons will probably map those by default to 
a hardware or system function, e.g mouse resolution switch or volume 
control etc - thats when the "standardization" ends most likely)


have nothing to swipe unfortunately so I can't help there :)

-mbien




Best wishes,

Neil



Re: Creating a Gradle project

2023-10-28 Thread Laszlo Kishalmi
While I've seen that message earlier, I cannot reproduce this with 
NetBeans 20-rc2.


More info on how to reproduce this is required.


On 10/28/23 05:29, Arbol One wrote:


When creating a Gradle project I get this message:

Am I missing something? What am I doing wrong?

--
ArbolOne.ca
Using Fire Fox and Thunderbird.
ArbolOne is composed of students and volunteers dedicated to providing free 
services to charitable organizations.
ArbolOne on Java Development is in progress [ í ]

Re: Two finger swipe left - right makes editor go wild

2023-10-28 Thread Laszlo Kishalmi


On 10/28/23 04:52, Neil C Smith wrote:



On Sat, 28 Oct 2023, 12:29 Neil C Smith,  wrote:



On Sat, 28 Oct 2023, 11:59 Laszlo Kishalmi,
 wrote:

It would be good if somebody could test the Mouse Button
layouts on
Windows and Mac, probably can remove the MOUSE_BUTTON4 and
MOUSE_BUTTON5
registration...


They weren't added by accident! ;-)

I have all 3 OS to hand, and tested this on all 3. As far as I
could tell, buttons 4 & 5 are required for Mac and Windows. Linux
is the odd one out here, unfortunately.

Personally, my Wayland laptop trackpad doesn't show this issue. We
don't have an option to have disabled mappings. If the reports are
more than a one off issue, then the only option is really to
remove all the default mouse button mappings for NB20 and let
people configure them if they want. But it's not very
discoverable, and leaves the original feature request still
unfulfilled.


PS. Also, if you look at this comment you'll notice that Michael and I 
had a conversation on the PR about xev values and the JDK numbers 
being two lower because of scroll wheel events 
https://github.com/apache/netbeans/pull/6434#issuecomment-1715252021


If we are 100% sure that 4&5 (native 6&7) map to horizontal scroll, we 
could drop the value down another two in the event handler to bring 
all OS in line?
That what I am thinking about! I think that would be safe to do, or 
introduce a  MOUSE_WHEEL_LEFT and MOUSE_WHEEL_RIGHT for those buttons 
and map the rest with two down on Linux.


Best wishes,

Neil


Re: Two finger swipe left - right makes editor go wild

2023-10-28 Thread Laszlo Kishalmi
It seems MOUSE_BUTTON4 and MOUSE_BUTTON5 events are sent on horizontal 
wheel movement on Linux.  Remove the registration of those and keeping 
MOUSE_BUTTON6 and MOUSE_BUTTON7 which is assigned for back and forth 
buttons does the trick.


Tested with Wayland and X11. and with Touchpad, MX Mouse 3S and MX Master 3

It would be good if somebody could test the Mouse Button layouts on 
Windows and Mac, probably can remove the MOUSE_BUTTON4 and MOUSE_BUTTON5 
registration...


On 10/28/23 03:03, Laszlo Kishalmi wrote:

Well, it seems to be something with the wheel rotation.

Horizontal two finger swipe is sent as horizontal scroll by default. 
Previously that was not working in the IDE.


Now I've tested, the touchpad gesture, I can confirm, that it goes 
back and forth through the editor caret history. So as the MX Master, 
which has a horizontal scroll wheel. Also on that mouse the back and 
forth buttons works as should now.


On 10/28/23 01:34, Neil C Smith wrote:

On Sat, 28 Oct 2023 at 06:34, Patrik Karlström  wrote:
I'm not sure if this is related to the OS, Fedora in my case or if 
it's a netbeans thing.


Using the touchpad to scroll up and down also invokes a trigger 
happy two finger swipe left and/or right and the result is that the 
editor might switch tabs or jump between "editor points" within the 
current file.


Is this behaviour possible to disable on the netbeans side?

I'm assuming this is with a NB20 release candidate?

This is likely some fallout from
https://github.com/apache/netbeans/pull/6434 This registers mouse
buttons as alternative shortcuts for the back and forward code history
actions.

You can search for the back and forward actions in Options / Keymap
and remove the mouse button shortcuts.  I know it's a little odd to
have mouse buttons in the keymap, but we were already using this for
mouse wheel actions.

Is your touchpad normally that trigger happy in other applications?
What about browsers?

Is this on Wayland out of interest?

Best wishes,

Neil

-
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



-
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: Two finger swipe left - right makes editor go wild

2023-10-28 Thread Laszlo Kishalmi

Well, it seems to be something with the wheel rotation.

Horizontal two finger swipe is sent as horizontal scroll by default. 
Previously that was not working in the IDE.


Now I've tested, the touchpad gesture, I can confirm, that it goes back 
and forth through the editor caret history. So as the MX Master, which 
has a horizontal scroll wheel. Also on that mouse the back and forth 
buttons works as should now.


On 10/28/23 01:34, Neil C Smith wrote:

On Sat, 28 Oct 2023 at 06:34, Patrik Karlström  wrote:

I'm not sure if this is related to the OS, Fedora in my case or if it's a 
netbeans thing.

Using the touchpad to scroll up and down also invokes a trigger happy two finger swipe 
left and/or right and the result is that the editor might switch tabs or jump between 
"editor points" within the current file.

Is this behaviour possible to disable on the netbeans side?

I'm assuming this is with a NB20 release candidate?

This is likely some fallout from
https://github.com/apache/netbeans/pull/6434  This registers mouse
buttons as alternative shortcuts for the back and forward code history
actions.

You can search for the back and forward actions in Options / Keymap
and remove the mouse button shortcuts.  I know it's a little odd to
have mouse buttons in the keymap, but we were already using this for
mouse wheel actions.

Is your touchpad normally that trigger happy in other applications?
What about browsers?

Is this on Wayland out of interest?

Best wishes,

Neil

-
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



-
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: How to hide a secret value in my Java code?

2023-10-04 Thread Laszlo Kishalmi
Well, the zero secret problem (the secret which allows you to access 
further secrets), are usually solved by providing an environment. It 
could be as simple as an environment variable, or some confinement, 
entitled with policies.


On 10/4/23 08:33, Richard Grin wrote:
I answer your question: it could be, for example, a password of a user 
of a database, put in a Java variable or used in an annotation, or a 
secret key for an API.


Any way of hiding the secret value in the  source code would be 
appropriate., using Maven or nor.




Envoyé depuis mon appareil Galaxy



 Message d'origine 
De : Alonso Del Arte 
Date : 04/10/2023 16:49 (GMT+01:00)
À : Richard Grin , NetBeans Mailing 
List 

Objet : Re: How to hide a secret value in my Java code?

I suppose you could encrypt the value in a String field or function in 
one class and then have another class that decrypts that value. This 
would be a slightly more laborious version of hiding the key under the 
welcome mat, but not much safer.


Maybe I'm misunderstanding. Is the secret value for Maven's use?

Al

On Wed, Oct 4, 2023 at 5:16 AM Richard Grin 
 wrote:


Hello,

Is it possible to add an environment variable for *only one* Java
project in NetBeans? I have added a Windows user variable in the
system
parameters but I find the process a bit cumbersome.

Is there a better way of hiding a secret value than using an
environment
variable?

A similar problem, but perhaps more difficult to solve: how to hide a
secret value used in an *annotation* in my code (I can't use
System.getenv).

I use Maven to build the project.

Kind regards,

Richard


-
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: NetBeans 19, Gradle 7.5 - "Run File" no longer working

2023-09-27 Thread Laszlo Kishalmi
Well, you can add your own runSingle action and or update the Build 
Actions for run.single action in the project properties.


Unfortunately it's pretty hard to say what to do without seeing the 
whole stuff in action.


On 9/26/23 22:32, Thomas Kellerer wrote:

Is there anything I can do about, or do I have to roll back to 18 (or wait for 
20)?

Regards
Thomas


László Kishalmi schrieb am 26.09.2023 um 17:10:

Could be a regression caused by this one:
https://github.com/apache/netbeans/pull/6003 


On Tue, Sep 26, 2023 at 5:54 AM Thomas Kellerer mailto:sham...@gmx.net>> wrote:

 Hello,

 with NetBeans 19 and Gradle 7.5.1 "runFile" on a class with a main method 
does not work any more:

 Caused by: 
org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could 
not create task ':server:runSingle'.
         at 
org.gradle.api.internal.tasks.DefaultTaskContainer.taskCreationException(DefaultTaskContainer.java:715)
 ...
 ...
 Caused by: org.gradle.tooling.BuildException: Could not find "run" task to 
execute. Please upgrade your configuration to use standard run-style tasks instead of 
deprecated runSingle
         at 
org.netbeans.modules.gradle.tooling.NetBeansRunSinglePlugin.lambda$addTask$2(NetBeansRunSinglePlugin.java:107)


 How can I upgrade/change my (NetBeans?) configuration to use the 
"run-style" task instead?

 This was working with the same Gradle project and NetBeans 18 without 
problems.


 I am using Java 17 if that matters.

 Thomas

-
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



-
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: The newest version for JavaEE Netbeans / Glassfish

2023-09-20 Thread Laszlo Kishalmi

Well, I'd recommend to install Java versions 8, 11 and 17 on the Server.

Locally Java 8, 11, 17, 20 and maybe 21.

NetBeans 19 using JDK17 or 20.

Then you can start migrating your Glassfish away from Java 8 to Java 11, 
then from Java EE to Jakarta EE, then another round with Glassfish and 
Java 17.



On 9/20/23 13:02, Jean-Michel DELFINO (Logarithmes) wrote:

Hello,

First, sorry for my English !

I used Netbeans 12.2 with the latest version MacOs to maintain an old 
software in JavaEE


*On my computer,*
I have Netbeans 12.2 with glassfish 5.1 and, in netbeans source 
indicate JDK 8, framework indicate JSF 2.3, librairies indicate JDK 15…

In Console mode, JAVA -version indicate :
java -version
java version "15.0.2" 2021-01-19
Java(TM) SE Runtime Environment (build 15.0.2+7-27)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)

*On the server in prod,*
it’s a Linux system : Debian 11 64 bit.
JAVA -version indicate :
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

 these are Glassfish 4.1 (build 13)
I use :
mysql-connector-java_8.0.27-1debian11_all.deb
To connect my sql database

All this are very old, and I really want to reinstall my server with 
the latest version of all this…
But I never find the right version of Java, netbeans, Glassfish who 
working fine each with the others…
Netbeans 19 ? But with Java ? Jakarta ? And what number of version ? 
And glassfish... but oracle Glassfish ? Eclipse glassfish ?


So, I need help for this !

Thank you.

Jean-Michel DELFINO (Logarithmes)
jm.delf...@logarithmes.fr





Re: How to make NB use jar instead of build/classes/?

2023-09-19 Thread Laszlo Kishalmi

Well, if using a home brew solution, I may rely on the hidden gem of:

MyClass.class.getPackage().getImplementationVersion()

If you provide a nice MANIFEST.MF with your jar that should work.

The original problem would still persist, in that case you need to 
configure your build system.


If that would happen to be Gradle then:

tasks.named("jar") {
    manifest {
    attributes("Implementation-Title": project.name,
    "Implementation-Version": "1.0",
    "Main-Class": application.mainClass,
    )
    }
}

tasks.named("run") {
    classpath = files(tasks.jar)
}



On 9/19/23 10:26, Thomas Wolf wrote:

Hi Laszlo,
My J2SE application is installed by a jpackage-created installer on 
mac/linux/windows and can be either a client or a server.  The application, 
upon startup, checks if there’s a new version of the app jar available on a 
server instance and, if so, downloads it so the next time the application 
starts up, the new jar is used.  If one assumes the jar has no external 
dependencies that might break as a result of moving to a newer version, I don’t 
think this method leads to added brittleness in the application.  But maybe I’m 
missing something?  I’d love to hear your perspective.

In answer to your question, the high level problem I’m trying to solve with 
this is the avoidance of our user having to re-install our application - or 
even having to update it manually.  I looked into using jdeploy, but we (i.e. 
our company) don’t want our code accessible in a public repository like npmjs 
or GitHub.  So I’m kind of forced to ‘roll my own’.  Using the build date of 
the jar is just my first, crude step in doing this because it is easiest to 
implement.

If you have any suggestions on how I can get NB to use the jar when running the 
application rather than the classes/ directory, I’d love to hear it.  It would 
make my debugging easier.

Thanks,
Tom



On Sep 19, 2023, at 12:05 PM, Laszlo Kishalmi  wrote:

You probably do not want to do such a thing. Is there a more high level of use 
case why you would get the date of a jar?

Usually depending on file dates would make you application very brittle, which 
would work on development, but when put into production, could lead hours of 
debugging, whit somebody screaming at the end.

On 9/19/23 07:38, Thomas Wolf wrote:

Hi,
My application has a bit of code that tries to do something based on the build 
date of the jar file.  To get the jar file, it does something like this:

File jarFile = new 
File(Startup.class.getProtectionDomain().getCodeSource().getLocation().toURI());

This works fine when the application is run outside of NB, but when debugging 
inside NB, the File that gets pointed to is the 
$HOME/NetBeansProjects/myproject//build/classes/ directory.  Is there a way to 
config the NB project to use the jar file that it generates - i.e. 
$HOME/NetBeansProjects/myproject/dist/app.jar ?

Any info is much appreciated,
Tom


-
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


-
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



-
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: How to make NB use jar instead of build/classes/?

2023-09-19 Thread Laszlo Kishalmi
You probably do not want to do such a thing. Is there a more high level 
of use case why you would get the date of a jar?


Usually depending on file dates would make you application very brittle, 
which would work on development, but when put into production, could 
lead hours of debugging, whit somebody screaming at the end.


On 9/19/23 07:38, Thomas Wolf wrote:

Hi,
My application has a bit of code that tries to do something based on the build 
date of the jar file.  To get the jar file, it does something like this:

File jarFile = new 
File(Startup.class.getProtectionDomain().getCodeSource().getLocation().toURI());

This works fine when the application is run outside of NB, but when debugging 
inside NB, the File that gets pointed to is the 
$HOME/NetBeansProjects/myproject//build/classes/ directory.  Is there a way to 
config the NB project to use the jar file that it generates - i.e. 
$HOME/NetBeansProjects/myproject/dist/app.jar ?

Any info is much appreciated,
Tom


-
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



-
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: Highlighting color in debug session

2023-09-10 Thread Laszlo Kishalmi

Check the Annotations section in the Fonts and Colors.

On 9/7/23 03:15, Alexander Kronenwett wrote:

Hi,
I am using NB18 on MacOS. When I set a breakpoint the respective line 
is highlighted with a very dark red (or brown). When the line is hit, 
it is highlighted with a very dark green. I find it hard to read the 
code of the highlighted lines so I wanted to change the color. I 
looked through the options of the Highlighting section of Fonts & 
Colors but did not find a suitable option.


My questions: is it possible to change the line highlighting color for 
breakpoints and if so, which option is it?


Alex


-
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: antlr

2023-06-02 Thread Laszlo Kishalmi

Hi Ernie,

I think the AntlrWorks which is mentioned there is not available anymore.

What we have is a new development from Matthias and me. It has syntax 
highlight, navigation, some code completion and formatting. It supports 
some trivial error detection as well. Though no high level things there 
with parser tree analysis, graphing and testing. That would require more 
knowledge + time from our side.


On 6/2/23 12:14, Ernie Rael wrote:


Greetings all,

I'm thinking about starting a small (that's the idea anyway) antlr 
project; I've never used antlr before. At first I didn't see any antlr 
with the plugin manager, then noticed that there's a buitin /ANTLR 
Grammar Editor Support/. I see some 8.2 stuff online, and I'm guessing 
that's not relevant with NB-18.


I'm looking around wondering what to expect. At 
https://www.antlr.org/tools.html there's mention that NetBeans has a 
"sophisticated editor for ANTLR v3/v4 grammars". It looks like there 
are a variety of development tools and compared to other IDEs it looks 
like NetBeans only has the editor. It could be that the info in not 
presented very well.


Is there any info on what the ANTLR workflow with NetBeans looks like? 
Are the "missing" tools" simply not integrated and can be used from 
the command line? Or is it something more?


-ernie


Re: Sorting it out?

2023-05-31 Thread Laszlo Kishalmi

Dear Tim,


Are you all right? Your recent emails makes me worry.


On 5/31/23 17:10, Tim de Vries wrote:

Need a pure JAVA Solution?

Like a Gosling, a Jobs, a Gates, maybe a MARKZUCK. or Bezos, if you 
that. I don't. I TIM.


You, Not Me!

#All.

#Tim.

#You.

#OhNo!

Tim



-
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



-
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: NetBeans 16, Gradle 7.5 and "Run File"

2023-02-02 Thread Laszlo Kishalmi
This issue is fixed in the upcoming NetBeans 17 (The NetBeans 17-rc3 
just got out).


Otherwise you can declare your own runSingle task in your Gradle Project.

On 2/1/23 23:35, Thomas Kellerer wrote:

I use NetBeans 16 with Gradle 7.5.1, Java 11.

When I run a class with a main method ("Run File") I get this exception in the 
output window:

 JAVA_HOME="C:\etc\open-jdk-11"
 cd **; ..\gradlew.bat --configure-on-demand 
-PrunClassName=com.mypackage.RunMe -s -x check -x test runSingle
 Configuration on demand is an incubating feature.

 > Configure project :

 The JavaExec.main property has been deprecated. This is scheduled to be 
removed in Gradle 8.0. Please use the mainClass property instead. See 
https://docs.gradle.org/7.5.1/dsl/org.gradle.api.tasks.JavaExec.html#org.gradle.api.tasks.JavaExec:main
 for more details.
   at org.gradle.api.tasks.JavaExec.setMain(JavaExec.java:427)
   at org.gradle.api.tasks.JavaExec_Decorated.setMain(Unknown Source)
   at 
org.netbeans.modules.gradle.tooling.NetBeansRunSinglePlugin.lambda$addTask$2(NetBeansRunSinglePlugin.java:85)


While this doesn't prevent the main class from running, the exception stack trace is a 
bit annoying. Can I configure NetBeans to do the "Run File" differently to 
avoid this?


Note that the file is part of a bigger Spring Boot project and build.gradle 
contains:

 springBoot {
   mainClass = "com.myproject.AppMain"
 }


Regards
Thomas

-
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



-
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: keyboard shortcut - accented characters - NB 16 editor - Windows 10

2023-01-28 Thread Laszlo Kishalmi

I would recommend to play around with different keyboard layouts on Windows.


On 1/28/23 06:38, Christopher C. Lanz wrote:
Hello, with the help of this group I can now display accented 
characters in the output window and in the editor. However, I need to 
_add_ accented characters: because I have upwards of 1,000 such 
characters to enter, I am hoping there are keyboard shortcuts, such as 
exist in Windows apps, and such as I was able to use in a Linux 
installation of NetBeans. In Linux I was able to set it up so that 
right-Alt + "`" + "a" produced the character "a" with an accent (ague 
or grave, I forget...). In Windows applications there are also such 
shortcuts but they don't work in the NB editor.


Thanks.

Chris Lanz

340 Dunn Hall, SUNY Potsdam

lan...@potsdam.edu

315 268 1547





Re: no main class error: strangest fix

2023-01-25 Thread Laszlo Kishalmi
Couldn't it be that the Java Parser just got a bad day (red notification 
bubble in the bottom status bar).


Those cases the IDE loss the connection with the code and can't find 
parser assisted stuff.



It should be better with NB17 as we've fixed a few NPE-s along the way.


On 1/25/23 10:47, Christopher C. Lanz wrote:

Hello,
I use NB 16 on Windows 10. On a very large project that has been 
running for years, lately, I get the "cannot find or load main class" 
error about once a day. Yes, removing the cache fixes it, but  so does 
something else:


comment out whatever code you just added or changed
run the program (it has always, then, worked at this point (so far 
knock on wood - about a dozen instances ))

replace the code you removed
run the program

At which point the same code now finds the main class that it couldn't 
before, and runs normally.
I am unable to duplicate this on a small test project - it just never 
gets the error in the first place.


Anybody have any suggestions for avoiding this time-wasting error?

Thanks.

Chris Lanz, Assoc. Professor Emeritus

Department of Computer Science

340 Dunn Hall, SUNY Potsdam

lan...@potsdam.edu

315 268 1547





Re: Tools > Options > Java > Gradle drop down list

2023-01-22 Thread Laszlo Kishalmi
I was able to reproduce the mentioned behavior on GTK+ Look and Feel 
with light theme.


Please use the default FlatLaf fLight or FlatLaf Dark look and feels for 
the best result. Unfortunately recent changes in GTK, GTK themes and JVM 
GTK Support provide an uncertain ground for NetBeans to built on, so we 
left our GTK support as is. Use FlatLaf where we have greater control to 
make the IDE look good either Light or Dark.


On 1/22/23 06:49, Emma Atkinson wrote:

Hello
I'm using NB IDE 16 on UbuntuStudio and I have a minor problem with a 
dropdown list of Gradle Distribution Versions. To find the drop down 
list I am talking about navigate as follows:


Tools > Options > Java > Gradle > Execution > Gradle Distribution 
Version > Use Standard Gradle Version


I think the problem is that the text I want to see is white text on a 
white background for most of the entries.  The Gradle  version I am 
using is black text on white background. There is a 7.5 in the list 
too.  There are two options with red text on white background way down 
the list (2.13 and 2.3) The drop down list is long but mainly white 
options.  Running the cursor over the list causes the option under the 
cursor to change to white on blue background, which I can read.   
Hence, it's just a mild irritation I don't encounter often.


Is there something I can do to fix this for me and get it out of my 
head space?


Thank you
Emma





-
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: [EXTERNAL] Re: NB 16 code template expansion

2023-01-14 Thread Laszlo Kishalmi
This feature is enabled by default. Cannot be really switched off. 
(Disablind it support modules might  work).


In Tools > Options > Editor > Code Templates at the bottom of the 
dialog, the action key  (by default) can be changed though.



If I remember well there was a time when tha expand action was simply 
the  key.



On 1/14/23 07:47, Christopher C. Lanz wrote:

Hello,

I have been using tab to expand "sout" to System.out.println(""); for 
several years. Since I have never used Eclipse/IntelliJ-IDEA, it would 
be difficult for me to have them confused with NB.


As yet noone has responded to the question of how that feature gets 
toggled.


Chris Lanz, Assoc. Professor Emeritus

Department of Computer Science

340 Dunn Hall, SUNY Potsdam

lan...@potsdam.edu

315 268 1547





*From:* Sean Carrick 
*Sent:* Friday, January 13, 2023 3:34 PM
*To:* Christopher C. Lanz 
*Cc:* users@netbeans.apache.org 
*Subject:* [EXTERNAL] Re: NB 16 code template expansion
This message did not originate from SUNY Potsdam or one of its trusted 
senders. Do not open attachments, click on links, or provide your 
credentials if the source is suspicious.


Chris,

I cannot recall a time when TAB expanded anything in NB...Did you mean 
"sout" + CTRL+SPACE? Because that is how I remember it always working 
and how it currently works. Is it possible that you are confusing the 
template expansion from Eclipse/IntelliJ-IDEA and NB?  That's why I 
try not to switch IDEs very often...


Sincerely,

Sean Carrick
Owner - PekinSOFT Systems
s...@pekinsoft.com
(309) 989-0672


On Thu, Jan 12, 2023 at 9:24 AM Christopher C. Lanz 
 wrote:


Hello, in messing around about other problems, I seem to have
disabled code template expansion. (Typing "sout" +tab always used
to produce "System.out.println("");" I can't find a Tools/Options
setting that turns this feature back on. The Apache page

https://netbeans.apache.org/kb/docs/php/code-templates.html

doesn't include this information, and I couldn't find a post that
provides it.


???

Thanks

Chris Lanz

340 Dunn Hall, SUNY Potsdam

lan...@potsdam.edu

315 268 1547





Re: From GlassFish to Tomcat

2023-01-14 Thread Laszlo Kishalmi
Open the project properties and on the Run card select Tomcat as server 
instead of Glassfish.


On 1/14/23 06:27, Amn Ojee Uw wrote:
I have a small project that uses Glassfish server, however, I would 
like to change the server to Tomcat; how do I do that in NetBeans 16.


Any suggestions would be much, much appreciated.


-
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



-
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: Embedded Language Question

2023-01-08 Thread Laszlo Kishalmi

???

On 1/8/23 20:47, Tim de Vries wrote:

If I had to weigh in, it would be nice to be able to contribute some of the 
code I don’t understand.

I would like to be able to provide, for example, class and method names from 
jars, similar to IntelliJ, but for all on classpath. There will probably always 
be straggler jars.

Also, stopping the auto class path scanning. It says it should be background, 
but isn’t. Also removing jars from the classpath for plain java projects, 
that’s a real bear but wrote a class to ctrl then click the shit out of that.

Tim

Sent from my iPhone


On Jan 8, 2023, at 1:59 PM, Oliver Rettig  wrote:

Hi,

I am also interested in such functionality to put code written in our DSLs
into java source code. In the meantime we put the code in extra files with
specific filesuffix and use the netbeans api for syntax highlighting etc.

best regards
Oliver


Hi,
I have got a question regarding the embedded language support of Netbeans.


If I write my own grammer/dsl with JavaCC and my language contains a
specific tag that marks the beginning and ending of an embedded language,
lets say Java, does Netbeans automatically take Lexer, Parsers,
CodeCompletion etc. from the embedded language?


What I found out is that there are two possibilities. The first uses the xml
file for defining the start/end tag. The second way is the programmatical
approach, I think using the Lexer class. Does anyone of you know a short
example for both strategies? Are there any tutorials available? I would
specially be interested in the xml approach Thanks.


Gesendet vonOutlook für iOS
-
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





-
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


-
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



-
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: Embedded Language Question

2023-01-08 Thread Laszlo Kishalmi

Here is a sample of Language embedding:

https://github.com/apache/netbeans/blob/40c25f50231290122f559a4f598624843662ee32/java/languages.antlr/src/org/netbeans/modules/languages/antlr/AntlrTokenId.java#L70

However this one only takes care of the Lexer, other features needs more 
code. You can check the JSP support code as well, probably that'd be the 
most prominent example of language embedding in NetBeans.


On 1/8/23 11:56, Admin Netcrystals wrote:

Hi,
I have got a question regarding the embedded language support of Netbeans.

If I write my own grammer/dsl with JavaCC and my language contains a 
specific tag that marks the beginning and ending of an embedded 
language, lets say Java, does Netbeans automatically take Lexer, 
Parsers, CodeCompletion etc. from the embedded language?


What I found out is that there are two possibilities. The first uses 
the xml file for defining the start/end tag. The second way is the 
programmatical approach, I think using the Lexer class.
Does anyone of you know a short example for both strategies? Are there 
any tutorials available? I would specially be interested in the xml 
approach

Thanks.

Gesendet von Outlook für iOS 
- 
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: How to add local jar to Gradle

2023-01-08 Thread Laszlo Kishalmi

https://riptutorial.com/gradle/example/8349/add-a-local-jar-file-dependency

On 1/7/23 19:41, Amn Ojee Uw wrote:

Hello!

Can anyone tell how to add a local jar file to a Gradle-Java with 
Gradle->Web Application using NetBeans 16?


Thanks in advance.


-
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



-
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: Query

2023-01-02 Thread Laszlo Kishalmi

https://github.com/apache/netbeans/issues

On 1/1/23 23:00, Murali Govind wrote:

Hi

If I need to ask a doubt so that community / forum members can help me where do 
I raise the issue

Regards
Murali
-
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



-
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: Add server - file permission

2022-12-27 Thread Laszlo Kishalmi
Well, if you do not have right to that directory, then just install 
Tomcat in your HOME directory. That would work fine.


On 12/7/22 04:04, Amn Ojee Uw wrote:


In my Debian 11, adding a server to Netbeans 15 requires that I add 
_*the directory*_ '/opt/tomcat/bin', as the place where server is 
located I think 
However, the file requires Authentication, is that the reason NB15 
cannot accept the directory as the server directory location?

Anyone know how to add Tomcat and GlassFish to NB15?

Thanks in advance


Re: how to turn off parameter names?

2022-12-22 Thread Laszlo Kishalmi

View > Show Inline Hints

On 12/22/22 12:13, Thomas Wolf wrote:

I just upgraded to NB 16 (from 13) and noticed a new feature which, with my poor 
eyesight, I initially thought was some sort of display driver error.  Looking more 
carefully, whenever I start typing the beginning of a method call, NB 16, in a tiny grey 
font, displays the argument variable name!  While I’m sure it can be valuable, I find it 
more distracting than anything else.  Is there a way to turn this off via preferences?  I 
looked in the more obvious places Settings->Editor->Code Completion & Hints but 
didn’t see anything relevant.

Any pointer would be appreciated.
Tom


-
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



-
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: Graphical Interface Built with JSF Doesn't Appear in Internet Browsers

2022-11-20 Thread Laszlo Kishalmi

Put your project up to github to share

On 11/20/22 07:37, Mehmet Fatih ÇİN wrote:


Hello,

I'm trying to create a login page with the versions I mentioned below. 
I'm new to this so I don't know if I did something wrong. But when I 
use facelet tags, I can't see any graphical interface in any internet 
browser.


Versions

NetBeans --> 15

Jakarta --> 9.1

JDK --> 11

JSF --> 3.0

GlassFish → 6.2.5

You can also find the files in the message attachment. Thank you for 
your interest.


This is a trial project. I know it's very simple and useless. However, 
please remember that my aim is to learn.


Mehmet Fatih ÇİN


-
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: Use jpackage in NB

2022-10-06 Thread Laszlo Kishalmi
You can get that working with suitable plugins for Gradle or Maven. As 
of Ant just call the commandline tool.


On 10/6/22 00:39, Helmut Leininger wrote:


Hi,

since Java 14 the Java SDK contains jpackage to create deliverables 
that include necessary Java runtimes. Is it possible to use jpacke int 
Netbeans 15 (plugins, ant, ...) ?


Thanks
Hemut Leininger



-
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: How to see missing implementations of a new method in interface

2022-09-30 Thread Laszlo Kishalmi
The IDE reports an error on the class line which does not implement some 
abstract methods. using Alt+Enter it offers a fix for implementing them.


On 9/30/22 01:40, Mikael Petterson wrote:


Hi,

I am using Netbeans 15 ( really great IDE!!).

When I build using maven I get:

error: ClassA.InnerclassB  is not abstract and does not override 
abstract method mymethod(int number,String name) in IntefaceA.


Should IDE not show warnings or hints in the code so I can fix it. Or 
have a missed a setting?


Br,

//mike


Re: NB 12.3 SVN do not lock files

2022-09-30 Thread Laszlo Kishalmi
Make sure when you install SilkSVN to install the Java Bindings as well. 
The command line client has many shortcomings. So Install the Java 
binding. Then if you are lucky the IDE will find it, and would display 
Preferred Client: JavaHL. If it still displays the cli, you have to tell 
the IDE where the libsvnjavahl-1.dll (it might called differently) is.


On 9/30/22 01:04, Roberto Bottoni wrote:

Hi,

NB 12.3, openjdk 11
SVN : svn, version 1.14.2-SlikSvn (SlikSvn/1.14.2)

when i try to lock a file i get an error : 
java.lang.UnsupportedOperationException: Not supported with 
commandline client.


thanks
Roberto.

-
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


-
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: SVN diff doesn't work

2022-09-24 Thread Laszlo Kishalmi

Hmmm,

It seems that the issue is with the version of libsvn-java package. You 
should use 1.14.x version. That's the latest LTS series Subversion 
released. Unfortunately that has not been upgraded in Ubuntu Focal. Try 
to install the Jammy packages.


On 9/24/22 04:22, Jason Abreu wrote:
I've noticed that the subversion CLI client option is very limited in 
it's functionality for cross branch diffs and even the type of merge 
that can be done.  I installed a JavaHL client on my computer (Ubuntu 
and Windows) and set NetBeans to use it and I have full functionality 
with cross branch diffs and complex merges.  SvnKit doesn't work at 
all any more due to incompatible licensing with the Apache license.


On Sat, Sep 24, 2022, 00:30 May Doušak  wrote:

Thanks, but it doesn't help.
I have it installed:

may@R9:~/TMP$ dpkg -l | grep libsvn
ii libsvn-java   1.13.0-3ubuntu0.2
   amd64    Java
bindings for Apache Subversion
ii libsvn1:amd64 1.13.0-3ubuntu0.2
   amd64    Shared
libraries used by Apache Subversion
ii libsvnclientadapter-java  1.10.12-1
   all
 High-level Java API for Subversion (library)
ii libsvnkit-java    1.8.14-4
all
 pure Java Subversion client library

The path is /usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so.0.0.0;
libsvn1 is under /usr/lib/x86_64-linux-gnu/

If I switch to "javaHL" in Netbeans settings with or without
entering the path, it automatically switches to "CLI":



When I apply it jumps to CLI:



If I just "OK" it, it asks for svn binary when doing svn
operations (i.e. switches to CLI).

I tried using the following paths (and restarting after):

/usr/lib;
/usr/lib/x86_64-linux-gnu/ (libsvn1 path);
/usr/lib/x86_64-linux-gnu/jni/ (libsvn-java path)
and
/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so.0.0.0

But it does the same :-/

I'm testing that in NB15.

Am I missing something?


Thank you,

May

On 23. 09. 22 22:10, László Kishalmi wrote:

sudo apt install libsvn-java

On Fri, Sep 23, 2022 at 12:35 PM May Doušak
 wrote:

Hi all,

SVN diff used to work for me not so long ago, but for some
reason it doesn't anymore on none of my machines; all are KDE
Neon (=ubuntu 22.04).
Other SVN operations work.

I have CLI SVN installed and when I want to see diff, I get
an error:

/Diffing between revision trees is not supported with
commandline client./
/Please switch to SVNKit or JavaHL./


I installed svnkit and javaHL:

root@R9:~# dpkg -l | grep svnkit
ii  libsvnkit-java
   1.8.14-4
all
 pure Java Subversion client library
ii svnkit   1.8.14-4
all
 pure Java Subversion client
root@R9:~#

jsvn doesn't work at all:

root@R9:~# jsvn
/usr/bin/jsvn: 29: $cygwin: not found
Error: JAVA_HOME is not defined correctly.
 We cannot execute $JAVACMD

but Java (and paths) is OK:

root@R9:~# java -version
openjdk version "17.0.4" 2022-07-19
OpenJDK Runtime Environment (build 17.0.4+8-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 17.0.4+8-Ubuntu-120.04,
mixed mode, sharing)


I even tried using HL jar...
(/usr/share/java/svnkit-javahl16.jar) with no success.

I tried all this on Netbeans 13, 14 and 15.


Does anyone have an idea how to make it work? :-/

thanks,

May




-
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: gradle: any way to specify JAVA_HOME for use with gradle?

2022-09-12 Thread Laszlo Kishalmi
Try to run NetBeans on Java 11. So the NB JDK17 do not force to use 
higher Gradle version than your project needs.


On 9/11/22 19:41, Ernie Rael wrote:

Thanks Moacir and Scott,

I ended setting org.gradle.java.home in gradle.properties. command 
line "gw clean build" works. Was getting exceptions using toolchain, 
possibly because of my use of non-standard compiler. I'd prefer 
toolchain and avoid specifying path in gradle.properties.


So I can use jdk-17 at the command line with gradle and it uses jdk-11 
and everything works OK.


But running NetBeans with jdk-17 has issues. It doesn't pick up 
properties correctly and sets the wrong sourceTarget version. But 
clean/build does work.


-ernie

On 9/11/22 9:10 AM, Scott Palmer wrote:
Perhaps best way to deal with this is to use the Gradle feature to 
set the tool chain version. In your build.gradle file do this:


|java {toolchain {languageVersion =JavaLanguageVersion.of(17)}}|

See: https://docs.gradle.org/current/userguide/toolchains.html#header

Scott


On Sep 10, 2022, at 11:47 AM, Ernie Rael  wrote:

Thanks Davide, but I wasn't clear about what's going on.

Let's say I run NetBeans with jdk-17. I have some gradle projects 
that require jdk-11.


So, while running NetBeans with jdk-17, I'd like to work on the 
gradle projects that require jdk-11.


I set the gradle project's

  ProjectProperties > Build > Compile > JavaPlatform: JDK 11

but that doesn't appear to do anything useful. In addition, I don't 
see where this property is getting saved; there's no 
project.properties file, and VCS didn't show any changes.


NetBeans says it tries to understand the gradle build for getting 
information. When I do a CleanAndBuild there are errors, although 
jdk-11 is set for the project.


-ernie

On 9/9/22 11:54 PM, Davide Grandi wrote:

I run nb with

SETLOCAL
SET JAVA_HOME=...
START C:\sviluppo\programs\netbeans\14\bin\netbeans64.exe^
 --jdkhome "%JAVA_HOME%"^
 --userdir "C:\sviluppo\user.home\netbeans\14\userdir"^
 --cachedir "C:\sviluppo\user.home\netbeans\14\cachedir"^
 --console suppress^
 -J-Duser.home=C:\sviluppo\user.home^
 -J-Xms4096m^
 -J-Xmx4096m

(because I've multiple jdk but none of them _installed_, all 
uncompressed)


But there's also a (commented) variable on nb folder :
    ./etc/netbeans.conf
--
# Default location of JDK:
# (set by installer or commented out if launcher should decide)
#
# It can be overridden on command line by using --jdkhome 
# Be careful when changing jdkhome.
# There are two NetBeans launchers for Windows (32-bit and 64-bit) and
# installer points to one of those in the NetBeans application 
shortcut

# based on the Java version selected at installation time.
#
#netbeans_jdkhome="/path/to/jdk"
--

bye,

    Davide

On 10/09/2022 02:42, Ernie Rael wrote:

I must run NB with jdk-11 (or jdk-15 but not the latest LTS).





-
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




-
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



-
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: Remove old LAFs from application and use new default LAF instead

2022-08-29 Thread Laszlo Kishalmi
Right now we are using all installed LaF-s to display in the combo box. 
You might create an SPI PR for a filtering interface. It's in the 
platform/core.windows module.


You might create something that checks/changes the following file on 
startup:

$USER_DIR/config/Preferences/laf.properties


On 8/29/22 00:43, Mike Hallan wrote:

Hi,
I would like to remove all LAFs so that the only ones available in 
MyApp are "FlatLaf Light" and "FlatLaf Dark".
I have set the default LAF in branding resource bundle for MyApp to be 
com.formdev.flatlaf.FlatLightLaf.
Ideally I want that if a user of a previous version of MyApp, who had 
been using "Windows" LAF, now starts the new new version of MyApp that 
MyApp won't find "Windows" LAF (because it no longer exists) and will 
therefore revert to using the new branded default of "FlatLAF Light".

Therefore:
1) Is is possible to remove all non-FlatLaf LAFs? Please tell me how 
to do it safely.
2) Will the application revert to using the branded default LAF if it 
can't find the previous LAF because it no longer exists in the 
application?

Thanks!


Re: Should I exclude ./gradle/nb-cache from commit?

2022-08-06 Thread Laszlo Kishalmi
Well, really Gradle Wrapper is optional. It seems that the majority of 
the users like that, so we do have Maven Wrapper as well now.


On 8/6/22 19:25, Andreas Reichel wrote:

Thank you for the response.

Looks like I don't need it because I never use Gradle Wrapper and 
always stick with the latest Gradle Version only.
(I actually wished there was an option to avoid Gradle Wrapper 
completely, there was never a Make or ANT wrapper for good. 
Downloading random stuff from the network outside of the OS' package 
manager still gives me shivers.)


Cheers
Andreas

On Sat, 2022-08-06 at 18:52 -0700, Laszlo Kishalmi wrote:


gradle/ folder (not the .gradle) usually the place to put additional 
build logic, and if nothing else that's where Gradle places it's 
wrapper gardle/wrapper/


Make sure you add the gardle/wrapper/gradle-wrapper.jar along with 
the grade/wrapper/gradle-wrapper.properties file. (Unless some policy 
explicitly state otherwise) Although that is a binary file, that is 
java the entry point of gradlew and gradlew.bat files. That would 
download the correct Gradle if it is not installed on the system.



On 8/5/22 17:54, Andreas Reichel wrote:




On Fri, 2022-08-05 at 17:52 -0700, Laszlo Kishalmi wrote:


while gradle/ folders
shall be committed



Laszlo,

thank you for advise, please care to elaborate. Why should it be 
there when it can be rebuild on demand? What is the advantage of 
tracking it and the disadvantage of dismissing it?

Sorry to bother you, I just would like to learn.

Cheers
Andreas


Re: Should I exclude ./gradle/nb-cache from commit?

2022-08-06 Thread Laszlo Kishalmi
gradle/ folder (not the .gradle) usually the place to put additional 
build logic, and if nothing else that's where Gradle places it's wrapper 
gardle/wrapper/


Make sure you add the gardle/wrapper/gradle-wrapper.jar along with the 
grade/wrapper/gradle-wrapper.properties file. (Unless some policy 
explicitly state otherwise) Although that is a binary file, that is java 
the entry point of gradlew and gradlew.bat files. That would download 
the correct Gradle if it is not installed on the system.



On 8/5/22 17:54, Andreas Reichel wrote:



On Fri, 2022-08-05 at 17:52 -0700, Laszlo Kishalmi wrote:

while gradle/ folders
shall be committed



Laszlo,

thank you for advise, please care to elaborate. Why should it be there 
when it can be rebuild on demand? What is the advantage of tracking it 
and the disadvantage of dismissing it?

Sorry to bother you, I just would like to learn.

Cheers
Andreas

Re: Should I exclude ./gradle/nb-cache from commit?

2022-08-05 Thread Laszlo Kishalmi
,gradle/ folders should be on the ignore list, while gradle/ folders 
shall be committed


On 8/5/22 17:26, Owen Thomas wrote:

I have my projects running. All is good in the world.

I see the directory indicated in the title of this message sometimes 
contains files for projects with old names (I converted my project 
names from camel to kebab case when this was indicated to me as the 
standard in gradle/maven, so I did as I was told).


Is it important to keep nb-cache under version control in Git? Are 
there any other NetBeans or Gradle directories that can be ignored? Do 
I ignore them or do I exclude them from the commit?


Thanks,

  Owen.


-
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: Gradle won't resolve dependency: what's wrong here?

2022-08-01 Thread Laszlo Kishalmi
Well, I've done and see a few dozen of Gradle builds, though this sounds 
alien to me. If you could share your project structure (main folders and 
their build.gradle files, maybe we can help sort this thing out.


On 8/1/22 22:39, Owen Thomas wrote:
While I've been doing other things, I have come to the conclusion that 
I need something, possibly in my build.gradle file of the Concept 
project, that refers to the Groovy method "compile". Perhaps I will 
need to start here.


On Tue, 2 Aug 2022 at 14:02, Jason Abreu  wrote:

When I converted about 30 projects from Any to Gradle, including
multiple multi-project builds, I noticed a few peculiar things.

Firstly, NetBeans gets a background task hung up every now and
then.  The only solution for this was to exit NetBeans then find
the hung up task and kill it.  Once NetBeans restarted, the
project scanning worked as expected once more.

Secondly, I have noticed that the Gradle dependency cache can get
stale and not refresh from repositories.  For this I would execute
the Gradle build task with the "--refresh-dependencies" (or
something like that) option to force Gradle to pull a fresh copy
of the dependencies from the repositories.

Hope this helps!  I still consider myself new-ish to Gradle.  I do
find most of the support I need there in the NetBeans IDE for it,
though.  However, my complaints about NetBeans relate to their
lack of Jakarta EE 9 support, so far - but that's not anything to
do with Gradle.

--Jason

On Mon, Aug 1, 2022, 22:59 Owen Thomas
 wrote:

Hello again. I am perplexed at the following problem.

I have a multi-project build in a directory named
"CliqueSpace". It's build.gradle file has the following:

subprojects {
    apply plugin: 'java'

    repositories {
        mavenCentral()
    }
}

The settings.gradle file or the same directory has the following:

rootProject.name = 'CliqueSpace'

include ':Concept'
include ':PeerDevice'

There are other includes in the above file, but I don't think
it is necessary to quote them here.

In the Concept directory (CliqueSpace/Concept), build.gradle
contains the following:

description = 'Concept'

In the PeerDevice directory (CliqueSpace/PeerDevice),
build.gradle contains the following:

description = 'PeerDevice'

dependencies {
    compile project(':Concept')
}

At the moment, I only feel confident using gradle from the
CLI. So, when I open a CLI window within the CliqueSpace
directory, and run "gradle project PeerDevice", I get the
following:


owen@owen-Latitude-5511:~/Development/CliqueSpace/Code/trunk/CliqueSpace$
gradle project PeerDevice

FAILURE: Build failed with an exception.

* Where:
Build file

'/home/owen/Development/CliqueSpace/Code/trunk/CliqueSpace/PeerDevice/build.gradle'
line: 4

* What went wrong:
A problem occurred evaluating project ':PeerDevice'.
> Could not find method compile() for arguments [project
':Concept'] on object of type

org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
Run with --stacktrace option to get the stack trace. Run with
--info or --debug option to get more log output. Run with
--scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 493ms

In short, having followed the instructions from a few
different sources now, I don't know what I'm doing wrong. It
might be good for the reader to know that
Concept/src/main/java has source code in it that compiles, but
PeerDevice/src/main/java also has source code where almost
every Java module has broken out in a rash of unresolved
dependencies.

Thanks for any help,

  Owen.


Re: How to set compile dependencies for Gradle in Netbeans.

2022-07-31 Thread Laszlo Kishalmi
Well this one is a good read: 
https://docs.gradle.org/current/userguide/declaring_dependencies.html


Also you might look at existing projects on GitHub or other samples on 
the web.


On NetBeans side you can't really do much in the project properties, 
like in Ant projects.


The information there is read-only, to change that you need to change 
the Gradle build files themselves.



On 7/31/22 21:54, Owen Thomas wrote:

Hello NetBeans people.

I have just started migrating my projects from Ant to Gradle in 
NetBeans. Some of them have compile dependencies on others, and I'm 
currently wondering how I set them up in NetBeans.


I'm very new to Gradle, but I can no longer ignore the light being 
cast by wise people, and I concede that my work needs exposure to all 
the goodies available through a build tool like Gradle. Any help would 
be greatly appreciated at this early and tentative stage of my journey.


Thanks,

  Owen.


-
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: Run-time Error in array of Object program Netbeans IDE 14 Ubuntu 18.04

2022-07-01 Thread Laszlo Kishalmi


On 7/1/22 16:32, Zulfi Khan wrote:


Exception in thread "main" java.lang.NullPointerException

at com.mycompany.add2strjop.Add2StrJOp.showRecords(Add2StrJOp.java:41)


Re: Gradle "Failed to notify build listener" project load error

2022-06-17 Thread Laszlo Kishalmi

Could you provide more details and/or file an issue on Github?


On 6/15/22 10:03, Jonathan Bergh wrote:

hi guys,

Once again, thanks so much for the new software release. Trying to 
load existing projects in v14, I am getting a Gradle priming build 
error "Failed to notify build listener" error when loading projects.


I am running NB on Zulu JDK11 and for various reasons, need to run the 
project on Gradle wrapper 4.10.2.


This project and subprojects open fine in NB v13, with the same 
Options > Java > Gradle config and the same JDK.


Any ideas?

Thanks in advance
Jonathan

ᐧ

Re: BufferedReader and BufferedWriter : non-static variable cannot be accessed from the static context

2022-06-06 Thread Laszlo Kishalmi



On 5/24/22 08:41, Ernie Rael wrote:


On 5/23/22 11:04 PM, slipbits wrote:


It is true that there other people on this list nicer than you. But 
let's look at your reply for a second. You provided no help, only 
criticism.


IMO, that's not accurate. If someone wants to succeed as a programmer, 
they need to find solutions of all kinds. And when they get stuck and 
need to reach out, they should "show their work" and put some thought 
into their question.


Something about teaching them to fish rather than giving them a fish 
comes to mind.


I find it hard to believe that they didn't know this wasn't a NetBeans 
list. If they truly didn't, then the most help might be to give them 
some hints on how to best fish the internet sea.



Well, I'm also member of the NetBeans Telegram group, and I have a 
feeling, that the strongest foothold of NetBeans is in the academics as 
a primary tool to teach Java. After all, it's free, works 
out-of-the-box, and the provided Ant projects templates allows students 
to create their first simple programs without the need to learn anything 
about how to deal with the Java Runtime and packaging. I have the 
feeling that many of these students are not necessary would like to be a 
real developer. They just want to have their exam done / get some 
credits. NetBeans is often synonym to Java, so they often end up posting 
some "interesting" things here and NetBeans Telegram group as well.


Is it annoying to see such questions from time to time? As a 
professional, I'd say yes, though it is not an obligation to anyone to 
answer or interfere. This guy had his answers, so let him be happy with 
those. I think it is Ok to be harsh/raw in your answers as long as they 
are constructive.





-ernie

The person asking the question wanted help. Rather than your acerbic 
answer, you might have provided some aid and direction. You did say 
that this list is for Netbeans issues only. That is help. You did say 
that there are other places to look, with an implied criticism that 
no looking was done. Moreover, you neglected to mention any single 
place where help could have been found.


In my experience on this list, I have found many people who tried to 
be helpful. The person asking the question was not asking for a 
fight, and probably did not know the fundamental purpose of this 
list. The question asker would have certainly gone elsewhere if it 
was known that this list was for Netbeans, not Java.


Your comments are unwarranted and not helpful. If you felt annoyed 
you should not have commented, or been more gracious in your comments.


art

On 5/23/2022 9:52 PM, Mark A. Flacy wrote:


So...


Other people on this list have attempted to help prior to this 
reply.  They are much nicer than I.



 1.  You *never* asked a question.   You posted a bit of code and
    indicated there was an error.  You didn't indicate that you tried
    to figure out the error or anything else.  The people who
    subscribe to this list aren't your parents and are under no
    obligation to try to read your mind (assuming your parents have
    that obligation) to solve your _unstated_ problems.
 2.  This mailing list is to discuss Netbeans issues.  Basic java
    problems really shouldn't be addressed here, although I might be
    in the minority in this mailing list with that opinion.


There are ample places other than this list to find an answer to 
your implied problem.



--

Mark A. Flacy

mfl...@verizon.net


On 2022 M05 22, Sun 17:52:55 CDT Zulfi Khan wrote:

> Hi,

> I have written the following code:

> /*

>  * Click

> 
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt 
to


> change this license * Click

> 
nbfs://nbhost/SystemFileSystem/Templates/Project/Maven2/JavaApp/src/main/ja


> va/${packagePath}/${mainClassName}.java to edit this template */

>

> package com.mycompany.add2strjop;

> import javax.swing.*;

> import java.lang.NumberFormatException;

> import java.io.FileWriter;

> import java.io.FileReader;

> import java.io.BufferedWriter;

> import java.io.BufferedReader;

> import java.io.IOException;

> public class Add2StrJOp {

>   BufferedReader BF= null;

>   BufferedReader BW= null;

>   String str = "test";

>

>    public static void main(String args[]){

>   try{

>   FileReader file = new FileReader("abc.txt");

>   BF = new BufferedReader(file);//E

>  //BF= new BufferedReader(new FileReader("abc.txt"));

>   while ((str = BF.readLine())!=null){//E

>     JOptionPane.showMessageDialog(null, str);//E

>   //JOptionPane.showMessageDialog(null, "hello World");

>     //BF.clos()

>   }

>  }catch(IOException e){

>   e.printStackTrace();

>  }

>   finally{

>  try{

>     if( BF!=null){//E

>    BF.close();//E

>     }

>  }catch(IOException e) {

>    

Re: Netbeans with Snap packaged OpenJDK

2022-05-26 Thread Laszlo Kishalmi

I'm updating the answer.


On 5/26/22 09:52, Juan Algaba wrote:
The SO question is indeed outdated, it´d be great if someone with 
enough reputation could leave a comment.


On NB 12.4 copying it to this location worked:
~/snap/netbeans/common/data/12.4/etc/netbeans.conf
But since NB 13 it seems to not use the "common" folder, and use a non 
semVer versioning for folders

Help -> About:
image.png
image.png
Here, 58 = NB 13
So my current working editable netbeans.conf is 
~/snap/netbeans/58/etc/netbeans.conf 
(~/snap/netbeans/current/etc/netbeans.conf)


Hope this helps the OP. It's A little hard to get right, but worth it 
to set stuff like the JDK and IDE font size  (--fontsize 13 in 
|netbeans_default_options|)


On Wed, May 25, 2022 at 11:13 AM Laszlo Kishalmi 
 wrote:



On 5/25/22 06:08, Stroud Custer wrote:


I took the sage advice of several of the responders to this
question and installed the Oracle version of Java 18.0.1.1 into
my home directory.  I did not have success with placing a
modified netbeans.conf in the netbeans/etc file located in the
snap directory in my home directory.


I'm curious, what went wrong there? Have you followed my
instructions or the one on Stackoverflow (that one is outdated and
does not work on NetBeans 13)?

I'd not recommend this desktop file workaround to anyone. The file
would need to be updated every release.



To get netbeans to use the newly installed JDK when invoked from
the KDE menu, I edited the netbeans_netbeans.desktop file in
/var/lib/snapd/desktop/application to add the --jdkhome parm as
shown below.

Thanks to everyone who responded to this issue.  I guess I will
have to educate myself on snap.


[Desktop Entry]
X-SnapInstanceName=netbeans
Type=Application
Name=Apache NetBeans 13
Comment=Apache NetBeans, The Smarter Way to Code
Exec=env

BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/netbeans_netbeans.desktop
/snap/bin/netbeans %F *--jdkhome jdk-18.0.1.1*
Categories=Development;IDE
Icon=/snap/netbeans/58/meta/gui/icon.png
Terminal=false
StartupWMClass=Apache NetBeans IDE 13




--

*- Juan Algaba*


Re: Netbeans with Snap packaged OpenJDK

2022-05-25 Thread Laszlo Kishalmi


On 5/25/22 06:08, Stroud Custer wrote:


I took the sage advice of several of the responders to this question 
and installed the Oracle version of Java 18.0.1.1 into my home 
directory.  I did not have success with placing a modified 
netbeans.conf in the netbeans/etc file located in the snap directory 
in my home directory.


I'm curious, what went wrong there? Have you followed my instructions or 
the one on Stackoverflow (that one is outdated and does not work on 
NetBeans 13)?


I'd not recommend this desktop file workaround to anyone. The file would 
need to be updated every release.




To get netbeans to use the newly installed JDK when invoked from the 
KDE menu, I edited the netbeans_netbeans.desktop file in 
/var/lib/snapd/desktop/application to add the --jdkhome parm as shown 
below.


Thanks to everyone who responded to this issue.  I guess I will have 
to educate myself on snap.



[Desktop Entry]
X-SnapInstanceName=netbeans
Type=Application
Name=Apache NetBeans 13
Comment=Apache NetBeans, The Smarter Way to Code
Exec=env 
BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/netbeans_netbeans.desktop 
/snap/bin/netbeans %F *--jdkhome jdk-18.0.1.1*

Categories=Development;IDE
Icon=/snap/netbeans/58/meta/gui/icon.png
Terminal=false
StartupWMClass=Apache NetBeans IDE 13


Re: Netbeans with Snap packaged OpenJDK

2022-05-24 Thread Laszlo Kishalmi

The following one works though:

netbeans --jdkhome /snap/openjdk/current/jdk

Making that default the following would do:

cp -r /snap/netbeans/current/netbeans/etc $HOME/snap/netbeans/current/

echo 'netbeans_jdkhome="/snap/openjdk/current/jdk"' >> 
$HOME/snap/netbeans/current/netbeans.conf


However that's not a tested situation. Here OpenJDK Snap package is 
confined, runs in it's own security sandbox, while NetBeans does not 
which could cause troubles especially when NetBeans needs to reach for 
native libraries outside the one provided by the JDK.


On 5/24/22 10:47, Laszlo Kishalmi wrote:


Well,

However I like the idea of Snap packages (being the main maintainer of 
the NetBeans one), I'd just install java from the standard Ubuntu 
debian packages or if you need something exotic, using SDKMAN (search 
on that if you are thinking about it). This could be as simple as:


sudo apt install -y openjdk-17-jdk openjdk-17-source


On 5/23/22 18:13, Stroud Custer wrote:


I just installed Netbeans and OpenJDK onto by Kubuntu 22.04 LTS.  For 
some reason the required aliases to map openjdk.java to java, etc.  
were not created when OpenJDK was installed.  I created the aliases 
found in the file /var/snap/openjdk/common/openjdk.env. Typing 
"java", "javac", "jar" into a command line now produces the expected 
results.  However when in attempt to invoke Netbeans, it complains 
that it can't find java  and that the --jdk-home option should be 
used.  I've tried several variations of this /snap/bin, etc. but I 
still get the "can't find java" message.


Has anybody else encountered this problem, or know of any easy 
installation that will get me jdk that netbeans recognizes?





Re: Netbeans with Snap packaged OpenJDK

2022-05-24 Thread Laszlo Kishalmi


On 5/24/22 01:38, Michael Bien wrote:
the snap packages are no official packages they are provided by the 
community.
That's kind of official, but in the terms of being convenience binary. 
Built from Apache repositories on ASF's own build grid.


but in general:
netbeans/etc/netbeans.conf has the property "netbeans_jdkhome" which 
you can use to tell NetBeans which JDK it should run on. I don't know 
much about snap so this might work differently there since the point 
is to keep software somewhat encapsulated.


another thing which can go wrong:
some distributions use different layouts for JDKs and might not have 
everything included. The safest way to run NetBeans is to use a JDK 
downloaded from your favorite java dealer (oracle, temurin, zulu... 
etc). Thats how NetBeans is tested before release.


having the "java" command working is not sufficient to run NetBeans, 
the IDE has to know where the full JDK is.


regards,
michael

On 24.05.22 03:13, Stroud Custer wrote:


I just installed Netbeans and OpenJDK onto by Kubuntu 22.04 LTS.  For 
some reason the required aliases to map openjdk.java to java, etc.  
were not created when OpenJDK was installed.  I created the aliases 
found in the file /var/snap/openjdk/common/openjdk.env. Typing 
"java", "javac", "jar" into a command line now produces the expected 
results.  However when in attempt to invoke Netbeans, it complains 
that it can't find java  and that the --jdk-home option should be 
used.  I've tried several variations of this /snap/bin, etc. but I 
still get the "can't find java" message.


Has anybody else encountered this problem, or know of any easy 
installation that will get me jdk that netbeans recognizes?






Re: Netbeans with Snap packaged OpenJDK

2022-05-24 Thread Laszlo Kishalmi

Well,

However I like the idea of Snap packages (being the main maintainer of 
the NetBeans one), I'd just install java from the standard Ubuntu debian 
packages or if you need something exotic, using SDKMAN (search on that 
if you are thinking about it). This could be as simple as:


sudo apt install -y openjdk-17-jdk openjdk-17-source


On 5/23/22 18:13, Stroud Custer wrote:


I just installed Netbeans and OpenJDK onto by Kubuntu 22.04 LTS.  For 
some reason the required aliases to map openjdk.java to java, etc.  
were not created when OpenJDK was installed.  I created the aliases 
found in the file /var/snap/openjdk/common/openjdk.env. Typing "java", 
"javac", "jar" into a command line now produces the expected results.  
However when in attempt to invoke Netbeans, it complains that it can't 
find java  and that the --jdk-home option should be used.  I've tried 
several variations of this /snap/bin, etc. but I still get the "can't 
find java" message.


Has anybody else encountered this problem, or know of any easy 
installation that will get me jdk that netbeans recognizes?





Re: junit 5 on NB-13

2022-05-11 Thread Laszlo Kishalmi
Maybe you need to change the testrunner in the Ant task. AFAIN JUnit 5 
uses a new TestRunner.


On 5/11/22 14:27, Ernie Rael wrote:

Hi all,

Feels like I'm in deep with this one.

Using NB-13, I have an old *ant* based project. I was using 
junit-4.13/JUnitParams-1.1.1. I needed to build a parameterized test, 
and decided to upgrade to junit-5. The junit-4 tests have been working 
fine.


Added the junit-5.6 library (comes bundled with NB-13) to the project, 
deleted old libs. Fixed up annotations and such. Tests don't run: "No 
tests"executed" see below for output. Seaching says it's OK to ignore 
the "warning...Status.STABLE" (though it would be nice to know how to 
get rid of them). See output below, there were no errors


I tried creating a new test, had options junit-4, junit (and testNG 
whatever that is). I selectd junit, but that seems to be junit-4 or 
earlier.


netbeans doc, 
https://netbeans.apache.org/kb/docs/java/junit-intro.html, talks about 
junit-3, junit-4.


Any ideas on what can I do to get the tests executing?

-ernie


ant -f /src/jvi-dev/jvi 
-Djavac.includes=com/raelity/jvi/core/FilePathTest.java 
-Dnb.internal.action.name=test.single 
-Dtest.includes=com/raelity/jvi/core/FilePathTest.java 
-Dtest.class=com.raelity.jvi.core.FilePathTest 
-Dignore.failing.tests=true test-single

init:
Deleting: /src/jvi-dev/jvi/build/built-jar.properties
deps-jar:
Updating property file: /src/jvi-dev/jvi/build/built-jar.properties
compile:
Created dir: /src/jvi-dev/jvi/build/test/classes
Compiling 1 source file to /src/jvi-dev/jvi/build/test/classes
warning: unknown enum constant Status.STABLE
  reason: class file for org.apiguardian.api.API$Status not found
warning: unknown enum constant Status.STABLE
...
100 warnings
Copied 3 empty directories to 3 empty directories under 
/src/jvi-dev/jvi/build/test/classes

compile-test-single:
Created dir: /src/jvi-dev/jvi/build/test/results
No tests executed.
test-single:
BUILD SUCCESSFUL (total time: 0 seconds)


-
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



-
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: Adding Payara Server to Jakarta EE 9 Project

2022-05-11 Thread Laszlo Kishalmi
Payara shall work with NetBeans, some Payara devs even contribute code 
for the Payara plugin, however I have not checked the latest development 
in that area.


On 5/11/22 00:30, Amn wrote:


I don't think Payara works under Netbeans. I am migrating from Win to 
Linux, I'll try under the linux platform and see how things go here.


On 2022-05-04 09:50, Mike Ryan wrote:

Hello,

In both Netbeans 12.6 and 13 I’m having trouble figuring out how to add a 
Payara Server to my Jakarta EE 9 project.

Payara version: 5.2022.2
Apache NetBeans version: 12.6 or 13
JDK: 11.0.8

I have the following in my Gradle build file:

dependencies {
 providedCompile 'jakarta.platform:jakarta.jakartaee-web-api:9.1.0’
}

The project compiles fine. I can add the Payara Server to my Java EE 8 projects. 
But when I go to my project’s Properties -> Run I see

Java EE Version: Jakarta EE 9 Web

but there are no servers in the Server dropdown.

I’m assuming there’s just some config I’m forgetting about somewhere.

Anyone have any ideas?

Thanks,

Mike
-
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


--
*ArbolOne*
Using Fire Fox and Thunderbird.
Developing using Java, C/C++, HTM/CSS and SQLite as our platform has 
been exciting and most rewarding.[*Ñ*]

Re: NetBeans interface with Java

2022-05-10 Thread Laszlo Kishalmi

Tools > Options > Miscellaneous > Output > Font Size

On 5/10/22 07:38, Michael Rootshtain wrote:


Hi,

I have increased the size of the font in the editor in Apache NetBeans 
but where do I manage to increase the size of the font in the output 
console.


Best regards,

Mike Rootshtain


Re: Double click button issue

2022-05-03 Thread Laszlo Kishalmi

It does not seem to be a public project. The link gives 404

On 5/3/22 03:43, Nigel Evenden wrote:

Hi
You can see the problem here:
https://github.com/Niggy148/crapatit

Nigel
Netbeans 8.1
Java Primefaces


-
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: Button double click

2022-04-28 Thread Laszlo Kishalmi

Well, I do not own a 32bit System since 2005.

Though, just find an other way to share.

On 4/28/22 14:05, Nigel Evenden wrote:

I can't login to GitHub with a 32 bit màchine.
I have explained the issue.
As far as I am aware this is a common issue.
Try it out for yourself and you will see what I mean.
Regards
Nigel

On Thu, 28 Apr 2022, 18:49 Nigel Evenden,  wrote:

Ok, thanks.

On Thu, 28 Apr 2022, 18:45 Laszlo Kishalmi,
 wrote:

Then probably upload your code somewhere public, like github,
so people could look at it and help.

Though making the code available, not necessary means that
anyone would turn up to help.

On 4/28/22 10:39, Nigel Evenden wrote:

Yes


On Thu, 28 Apr 2022, 18:28 Laszlo Kishalmi,
 wrote:

Have you fixed your laptop?

On 4/28/22 06:16, Nigel Evenden wrote:

Any progress on my request yet?
Nigel

On Thu, 21 Apr 2022, 11:00 Nigel Evenden,
 wrote:

Hi there

I have enhanced the UserCRUD_Annotation example to
include a View button, which points to a related
Projects page.
This page shows a data table.
I have tried everything to stop the need to double
click on the button, but have failed to do so.
I would send you my code, but my laptop has since
broken down.
Can you please try it out and send me your code if
successful.
Nigel

Java Prime Faces
Netbeans


Re: Button double click

2022-04-28 Thread Laszlo Kishalmi
Then probably upload your code somewhere public, like github, so people 
could look at it and help.


Though making the code available, not necessary means that anyone would 
turn up to help.


On 4/28/22 10:39, Nigel Evenden wrote:

Yes


On Thu, 28 Apr 2022, 18:28 Laszlo Kishalmi, 
 wrote:


Have you fixed your laptop?

On 4/28/22 06:16, Nigel Evenden wrote:

Any progress on my request yet?
Nigel

On Thu, 21 Apr 2022, 11:00 Nigel Evenden, 
wrote:

Hi there

I have enhanced the UserCRUD_Annotation example to include a
View button, which points to a related Projects page.
This page shows a data table.
I have tried everything to stop the need to double click on
the button, but have failed to do so.
I would send you my code, but my laptop has since broken down.
Can you please try it out and send me your code if successful.
Nigel

Java Prime Faces
Netbeans


Re: Button double click

2022-04-28 Thread Laszlo Kishalmi

Have you fixed your laptop?

On 4/28/22 06:16, Nigel Evenden wrote:

Any progress on my request yet?
Nigel

On Thu, 21 Apr 2022, 11:00 Nigel Evenden,  wrote:

Hi there

I have enhanced the UserCRUD_Annotation example to include a View
button, which points to a related Projects page.
This page shows a data table.
I have tried everything to stop the need to double click on the
button, but have failed to do so.
I would send you my code, but my laptop has since broken down.
Can you please try it out and send me your code if successful.
Nigel

Java Prime Faces
Netbeans


Re: Netbeans API to install plugin from local .nbm file ?

2022-04-27 Thread Laszlo Kishalmi

You mean: Tools > Plugins > Downloaded > Add Plugins... ?

On 4/27/22 14:26, Jerome Lelasseux wrote:
Is there a Netbeans API to install a plugin from a local .nbm file 
?    I know that the feature is supported (eg autoupdate), but I can't 
find the appropriate API...


The scenario is that a user bought and downloaded a plugin (.nbm file 
from a 3rd-party web site), and in my NB platform app he would select 
an "upgrade" menu entry, then select the .nbm file and voila.










Re: Run ear in TomEE?

2022-04-27 Thread Laszlo Kishalmi
The NetBeans Java EE support for Gradle does not support EAR. It is that 
simple.


On 4/27/22 09:54, Terry wrote:
I have a very simple Gradle project called MyApp. MyApp is built as an 
.ear file that contains a .war file with a test.jsp page. Gradle can 
build it and the app will run in TomEE if I deploy the .ear file 
manually to the /webapps folder.
Now I'm trying to run it from NetBeans 13 in TomEE using the debugger, 
but the Run button is disabled, and there’s no Run section in the 
project properties window.
But, this works: I set up my TomEE server in NetBeans. I made a new 
"Java with Gradle" “Web Application” project in NetBeans 13 and choose 
my TomEE server. I can click the Run button and it starts TomEE and 
deploys the app. This “Java with Gradle” project has a Run section in 
the project properties window. So, I think NetBeans and TomEE and the 
rest of my environment is ok. One difference is that this builds a war 
file and MyApp builds an ear file.
NetBeans 13 can open the MyApp folder and it finds the root Gradle 
project and the MyApp-war sub project. NetBeans seems to recognize all 
the Gradle pieces correctly, and running the gradle build task will 
build the ear file correctly.
Why doesn't NetBeans let me run MyApp in TomEE? Is it because my root 
project is an ear, and NetBeans simply can't run ear files?




-
MyApp project file structure:
-
MyApp
|-- gradle/*
|-- build.gradle
|-- gradlew
|-- gradlew.bat
|-- settings.gradle
|-- src
|-- main
|-- resources
|-- META-INF
|-- application.xml
|-- MyApp-war
|-- gradle/*
|-- build.gradle
|-- gradlew
|-- gradlew.bat
|-- src
|-- main
|-- webapp
|-- test.jsp
|-- WEB-INF
|-- web.xml
--
MyApp settings.gradle:
--
rootProject.name = "MyApp"
include 'MyApp-war'
---
MyApp build.gradle:
---
plugins {
id 'ear'
}
repositories {
mavenCentral()
}
dependencies {
deploy project(path: ':MyApp-war', configuration:'archives')
}
ear {
appDirectory = file('src/main/resources')
}
---
MyApp-war build.gradle:
---
plugins {
id 'java'
id 'war'
}
repositories {
mavenCentral()
}
dependencies {
}

Re: Horizontal scroll using mouse buttons 6&7 in Netbeans

2022-01-30 Thread Laszlo Kishalmi

Works for JDK 17 and Linux (I guess that feature might be added in JDK 13)

On 1/30/22 00:29, May Doušak wrote:

Hi there,

I know it is possible to scroll horizontally usinf SHIFT+ primary 
mouse wheel (buttons 4&5).
Is there a way make NetBeans treat mouse buttons 6 & 7 (second scroll 
wheel) as horizontal scroll?


Thanks,

May

-
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



-
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: Netbeans 12.6, browsing for superclass does not show project files

2021-12-14 Thread Laszlo Kishalmi

Thanks for the sample project!

It seems for some reason NetBeans does not really recognize that as a 
project unless you create an empty build.gradle in the root directory. 
From that point it seems to work.



On 12/13/21 16:14, Jim Mayer wrote:

Hi all,

I'm still trying to put together a test case for the refactoring issue 
I ran into, but here's one for the other problem I saw. This is a link 
to a Google Drive folder, where I've uploaded the test case and some 
other information.


https://drive.google.com/drive/folders/1sXKairwilsOrTMJcIch9oCw8VQe1sEAx?usp=sharing

If it seems appropriate, I can create a JIRA issues for this, but I 
haven't used NetBeans in years, so thought I'd share the problem first.


From the README.txt:

PROBLEM DESCRIPTION
When creating a new class browsing for a superclass does not show 
project files.


HOW TO REPEAT

(1) File>New Project...>Java with Gradle>Java Class Library
(2) Create a new class named "Fruit" (see the attached tar file for 
what I did).

(3) Browse to the source package containing the new file.
(4) Right click on the package and select New>Java Class
(5) Where the dialogue says "Superclass", click on Browse...
(6) Under type name, write "Fr"
(7) The "Types Found:" on my system shows Frame, FameNode, 
FramesDecoder, etc. but do not include "Fruit".


ATTACHED FILES

messages.log
The "messages.log" file from my system.

netbeans-class-browsing-issue.tar.gz
The entire project directory directory.

README.txt
This file.

screenshot-showing-problem.png
A screenshot showing the names I saw after following the above steps.

NETBEANS CONFIGURATION

Product Version: Apache NetBeans IDE 12.6
Java: 17.0.1; OpenJDK 64-Bit Server VM 17.0.1+12-Ubuntu-120.04
Runtime: OpenJDK Runtime Environment 17.0.1+12-Ubuntu-120.04
System: Linux version 5.4.0-91-generic running on amd64; UTF-8; en_CA (nb)

SYSTEM CONFIGURATION

Ubuntu 20.04.3 LTS
% uname -a
Linux chill 5.4.0-91-generic #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 
2021 x86_64 x86_64 x86_64 GNU/Linux


-- Jim




-
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: Problems profiling a Gradle application

2021-12-10 Thread Laszlo Kishalmi

That's true.

There is no profiler integration support for Gradle projects at the moment.

On 12/10/21 05:24, Bob T wrote:

Hello,

I have a Gradle project that I want to run the Profiler for but I 
can't get it to work. All options aside from "Attach to External 
Process" and "Insert Profiling Point..." are greyed out in the Profile 
menu. I can't choose "Profile Main Project".


I tried to run my application and then "Attach to External Process" 
from the Profile menu. I can choose the application process from the 
"Setup Attach To Process..." popup but nothing appears to happen and 
the profiler pane is empty. If I try and attach again I get an 
exception thrown: "Exception in thread "Attach Listener" 
java.lang.reflect.InvocationTargetException".


I also tried a new empty hello world Gradle application with the same 
result.


I'm running:
Product Version: Apache NetBeans IDE 12.6
Java: 11.0.9.1; OpenJDK 64-Bit Server VM 11.0.9.1+1-LTS (Arm64 Azul Zulu)
Runtime: OpenJDK Runtime Environment 11.0.9.1+1-LTS (Arm64 Azul Zulu)
System: Mac OS X version 11.6 running on aarch64; UTF-8; en_GB (nb)


Does anyone know how to get this to work?

Thanks


Re: NB 12.4 creating new project I get this error...

2021-12-02 Thread Laszlo Kishalmi

Just add a system property .level=< logging level >

Example start netbeans with:

netbeans -J-Dorg.netbeans.api.project.level=FINEST

On 12/2/21 13:24, Thomas Wolf wrote:

Hi again,
I have no idea why, but using the package now works?!?!?!?!?

The only thing I’ve done, afaik, since the last time when it didn’t 
work is to try creating a project with a directory still called 
’satriage’ but in a different parent directory - and removing an old 
~/.netbeans/ directory (which appeared to be a leftover from NB 6.9 I 
discovered when trying to find anything ’nb’. :-(


Anyway - my problem went away, but if anyone can tell me how to change 
Netbeans logging level globally, I’d appreciate the info.  I’ll use 
that the next time I encounter something I can’t figure out.


Best,
Tom


On Dec 2, 2021 at 4:12:46 PM, Thomas Wolf  wrote:
I just realized i hit ‘r’eply on a couple messages rather than ‘Reply 
to all :-(
Just to summarize: I removed the ~/Library/Caches/NetBeans//and 
~/Library/Application Support/NetBeans//* directories - and still get 
the problem of NB not accepting my package because it’s supposedly 
also used in a  project named ’twolf’- which is also my userid.


I’m not familiar with how Netbeans does logging.  I looked at the 
FileOwnerQuery.java file and see that it does do some logging at the 
“FINE” level.  Could someone tell me how I would turn that on?  
Perhaps in the netbeans.conf file as a parameter?  This way maybe 
I’ll get a clue as to where Netbeans thinks the project is that 
supposedly owns the package directory i’m trying to specify.


Again, any help much appreciated.
tom

p.s.  if I create a ~/junk/satriage/src/ directory and specify that 
as my source root, Netbeans accepts it - so it’s definitely something 
about the ~/spectare/git/satriage/src/ directory location :-(  I 
vaguely remember creating such a directory a year or two ago - and 
possibly having created a NB project that referred to it.  But that 
project no longer exists on my machine as far as I can tell (I did 
searches on ’twolf’, ’nbbuild.xml, etc. to no avail).



On Dec 1, 2021 at 6:07:02 PM, Laszlo Kishalmi 
 wrote:


It seems you have already something in your (most probably home 
folder) what NetBeans detects as a project.


We have a thing called FileOwnerQuery which shall able to say that a 
folder belongs to what project. In this case we call it on 
/Users/twols/spectare/satriage/src and we are expecting a null (not 
owned by any project), instead that query says that this folder 
belongs to a project called twolf


So I'd look for project files like nbproject/ folder, build.xml, 
pom.xml, build.gradle and settings.gradle files in your home folder.



On 12/1/21 13:55, Thomas Wolf wrote:

Hi everyone,
I’m at a loss here.  I hope you guys can help:

I created a completely new GIT repository on my mac at:

/Users/twolf/spectare/git/satriage
and then created a src/ directory under it.

Next, I opened Netbeans and tried to create a project this way 
(have done this dozens of times without trouble):


New Project… -> Java with Ant -> Java with Existing Source

I enter a project name ‘satriage’ and hit ‘Next’ where I’m asked to 
enter a source package folder. I try to enter:


/Users/twolf/spectare/git/satriage/src/

but I get an error message about that package having been used in 
another project??? (see attached error dialog)
Nonetheless, I did a ‘grep -r ‘satriage’ . in my NetBeansProjects/ 
directory to see if any project references this directory - but 
none do.  I also deleted $HOME/Library/Caches/NetBeans/12.4/ in 
case thee’s some old, cached info that might be to blame - but no 
luck.  Still getting that error :-(
Then I deleted $HOME/Library/Application Support/NetBeans/12.4 - 
still the same error :-(
Next, I renamed my $HOME/NetBeansProjects/ directory - again, same 
error :-(


In my desperation, I installed Netbeans 12.5 from scratch and 
without importing any settings from 12.4.  But STILL the same error 
:-(  Neither NB 12.4 nor 12.5 had any projects open when I did 
this, so how does NB decide that the package is in use in another 
project???



Again, in terms of env, I’m running NB 12.4 w. JDK 17 on macOS 
Monterey.


If anyone has any ideas, please let me know.  Thanks a bunch,
tom


-
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: NB 12.4 creating new project I get this error...

2021-12-01 Thread Laszlo Kishalmi
I'd try to create a new folder in your home and try to create a project 
in it.


However you said that you've created the project from Java Ant from 
existing source. DOes not the existing source come with some build 
NetBeans might recognize?


On 12/1/21 15:22, Thomas Wolf wrote:

Hi Laszlo,
I checked my $HOME directory and I don’t have  nbproject/, build.xml, 
pom.xml, build.gradle, or settings.gradle there.  Any other files I 
could look for?


Look all the parents of /Users/twols/spectare/satriage/src might find a 
clue.





Where does FileOwnerQuery get ’twolf’ from?  Where is this information 
stored?  Does NB go through my entire filesystem looking for files 
like the above to find existing projects?


Any further help is appreciated,
Tom


On Dec 1, 2021 at 6:07:02 PM, Laszlo Kishalmi 
 wrote:


It seems you have already something in your (most probably home 
folder) what NetBeans detects as a project.


We have a thing called FileOwnerQuery which shall able to say that a 
folder belongs to what project. In this case we call it on 
/Users/twols/spectare/satriage/src and we are expecting a null (not 
owned by any project), instead that query says that this folder 
belongs to a project called twolf


So I'd look for project files like nbproject/ folder, build.xml, 
pom.xml, build.gradle and settings.gradle files in your home folder.



On 12/1/21 13:55, Thomas Wolf wrote:

Hi everyone,
I’m at a loss here.  I hope you guys can help:

I created a completely new GIT repository on my mac at:

/Users/twolf/spectare/git/satriage
and then created a src/ directory under it.

Next, I opened Netbeans and tried to create a project this way (have 
done this dozens of times without trouble):


New Project… -> Java with Ant -> Java with Existing Source

I enter a project name ‘satriage’ and hit ‘Next’ where I’m asked to 
enter a source package folder.  I try to enter:


/Users/twolf/spectare/git/satriage/src/

but I get an error message about that package having been used in 
another project??? (see attached error dialog)
Nonetheless, I did a ‘grep -r ‘satriage’ . in my NetBeansProjects/ 
directory to see if any project references this directory - but none 
do.  I also deleted $HOME/Library/Caches/NetBeans/12.4/ in case 
thee’s some old, cached info that might be to blame - but no luck.  
Still getting that error :-(
Then I deleted $HOME/Library/Application Support/NetBeans/12.4 - 
still the same error :-(
Next, I renamed my $HOME/NetBeansProjects/ directory - again, same 
error :-(


In my desperation, I installed Netbeans 12.5 from scratch and 
without importing any settings from 12.4.  But STILL the same error 
:-(  Neither NB 12.4 nor 12.5 had any projects open when I did this, 
so how does NB decide that the package is in use in another project???



Again, in terms of env, I’m running NB 12.4 w. JDK 17 on macOS Monterey.

If anyone has any ideas, please let me know.  Thanks a bunch,
tom


-
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: NB 12.4 creating new project I get this error...

2021-12-01 Thread Laszlo Kishalmi
It seems you have already something in your (most probably home folder) 
what NetBeans detects as a project.


We have a thing called FileOwnerQuery which shall able to say that a 
folder belongs to what project. In this case we call it on 
/Users/twols/spectare/satriage/src and we are expecting a null (not 
owned by any project), instead that query says that this folder belongs 
to a project called twolf


So I'd look for project files like nbproject/ folder, build.xml, 
pom.xml, build.gradle and settings.gradle files in your home folder.



On 12/1/21 13:55, Thomas Wolf wrote:

Hi everyone,
I’m at a loss here.  I hope you guys can help:

I created a completely new GIT repository on my mac at:

/Users/twolf/spectare/git/satriage
and then created a src/ directory under it.

Next, I opened Netbeans and tried to create a project this way (have 
done this dozens of times without trouble):


New Project… -> Java with Ant -> Java with Existing Source

I enter a project name ‘satriage’ and hit ‘Next’ where I’m asked to 
enter a source package folder.  I try to enter:


/Users/twolf/spectare/git/satriage/src/

but I get an error message about that package having been used in 
another project??? (see attached error dialog)
Nonetheless, I did a ‘grep -r ‘satriage’ . in my NetBeansProjects/ 
directory to see if any project references this directory - but none 
do.  I also deleted $HOME/Library/Caches/NetBeans/12.4/ in case thee’s 
some old, cached info that might be to blame - but no luck.  Still 
getting that error :-(
Then I deleted $HOME/Library/Application Support/NetBeans/12.4 - still 
the same error :-(
Next, I renamed my $HOME/NetBeansProjects/ directory - again, same 
error :-(


In my desperation, I installed Netbeans 12.5 from scratch and without 
importing any settings from 12.4.  But STILL the same error :-( 
 Neither NB 12.4 nor 12.5 had any projects open when I did this, so 
how does NB decide that the package is in use in another project???



Again, in terms of env, I’m running NB 12.4 w. JDK 17 on macOS Monterey.

If anyone has any ideas, please let me know. Thanks a bunch,
tom


-
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: NB taking up 200% CPU checking for external changes :-(

2021-10-20 Thread Laszlo Kishalmi
There is a Profile the IDE button next to the Memory Gauge. Start 
profiling when the CPU usage spikes, let it run for a minute or so, then 
stop the profiling. You will see what is happening behind the scenes. 
That data can be exported as well, just zip that, create an issue in the 
JIRA and attach the report, so developers can analyze that as well.



On 10/20/21 09:54, Thomas Wolf wrote:
I have NB 12.4, but I have noticed the same behavior on previous NBs 
as well:


Most of the time, my MacBook Pro is quiet as can be.  But every now 
and then (every other day?), I’d be surfing the web or reading the 
mail when my fans start spinning up - often getting to their max speed 
*and staying there*. Usually, I’m not doing anything CPU intensive at 
all and when I look at the Activity Monitor, it’s always Netbeans 
taking 100-200% of the CPU.  And *always*, when open the Netbeans 
window, there at the bottom would be a message indicating that NB is 
checking (or waiting? can’t remember the exact wording) for external 
changes.  I assume that’s the NB feature that checks to see if any 
project-related source was modified outside the IDE?   This has got to 
be a bug - there’s no way something like that should be a heavy load 
on a CPU.


Is there something I can do when I next observe this behavior to help 
track down this bug?  I think I’ve had this happen for at least a 
year.  If there isn’t - is there a way to globally turn it off?


I’m on macOS 12.0.1 (Monterey) running NB with OpenJDK 17, but as I 
said, this has happened on earlier NB and earlier versions of Java.  
My computer is standalone - i.e. no corporate network, not networked 
file systems.  Just the laptop and a wireless connection to the 
Internet (via Starlink and, before that, via Verizon LTE).


Thanks for any suggestions,
Tom





-
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: Does Netbeans have this IntelliJ Log feature?

2021-08-27 Thread Laszlo Kishalmi
Well, we had a plugin for something like that ages ago, that might went 
even deeper than that for log4j as far as I remember.


Writing one would be an interesting task for a beginner. Go for it!

It would be good to add a new module to the ide cluster.

I'd do that in the following order:

1. Create a TopComponent for the log files
2. Use hard coded files to test your workflows
3. Create a Project Customizer, and register that for an existing
   project type.
4. Test
5. Register your project customizer to other project types
6. Test
7. Contribute a PR


On 8/27/21 1:03 PM, Tim Mullé wrote:

Hi,

I use a feature in IntelliJ at work when running applications from the 
IDE that allows me to view one or more log files

In separate tabs when the program starts up.

I was wondering if Netbeans has this kind of support or is there a 
plugin already to support this kind of action?


If not, I was thinking of taking a shot at writing one since I do like 
using Netbeans and it would be a fun and useful way to expand the IDE.


I’m guessing it would be an extension of the Java project or editor to 
add a new configuration option in the project settings dialog?
I saw something in the New Project wizard tutorial on how to add 
customizers for Projects so I think that might be where it should 
go..still learning.



I know I can always tail the logs in the terminal, but that’s no fun :)

I’d like a new tab to open up and stream the log file(s) just like 
IDEA does.


You can configure it in the configuration settings in IntelliJ on a 
per project basis:


Here is the description how to use it: 
https://www.jetbrains.com/help/idea/2021.2/setting-log-options.html 




Thanks,
- Tim



Re: Netbeans struggles with hierarchical Gradle Projects

2021-08-21 Thread Laszlo Kishalmi
Well that is a heritage from Ant I guess, though the statement only adds 
a new resourcedir to the set of resourcedirs


It would be better to use:

sourceSets.main.resources.srcDirs = files('src/main/java')

Though that would be just a slight change. Also an exclude for 
"**/*.java" might be desired here.


Though mixing the sources and resources together might be not ideal, 
usually it is not a problem for Gradle.


On 8/21/21 11:01 AM, Bernd Michaely wrote:


Hi,

I'm just curious,

 sourceSets {
 main {
 resources {
 srcDirs"src/main/java" }
 }
   }

Is it good practice to define the resources dir equal to the src dir?

I think, this might cause problems including:

  * it (at least unnecessarily) confuses Gradle's build cache
  * resources are deployed to the final result, so sources might be
deployed together with the them
  * NB show src and resources separately in the logical Projects view
and might be confused about this configuration

Greetings,

Bernd




Re: Netbeans struggles with hierarchical Gradle Projects

2021-08-21 Thread Laszlo Kishalmi

I'm sorry being short at the first.

In general specifying version in build is a bad practice. The version is 
not a property of a build process, as long as you have the code in hand 
you should keep that "versionless". Version is a property of the release 
process.


The build process shall be merely responsible to create an executable 
(reusable) package from the source code.


The release process shall be responsible to:

  1. Get a specific source code

  2. Assign a version to the release

  3. Create a versioned executable (reusable) package using the build 
process


  4. Tag the sources

  5. Upload the versioned packages to a binary repository for further use

Due to some initial technical limitation Maven made version a required 
part of their build. That would result a lot of workarounds to put in 
place, like SNAPSHOT versions, a specific step in maven projects to 
change the version in each and every pom.xml in the project before 
release, etc.


In Gradle version is optional.

The best use of the version property is:

./gradlew -Pversion=1.2.3 clean build

when the release comes.

OpenJFX project had a problem with it as they generated second precision 
version for their artifacts, so when the dependencies were resolved in 
different times they would reference different jars, so NetBeans was not 
able to connect the dependencies between modules with versions crested a 
few seconds apart.


I would check the project properties for classpath.

Also make sure that the Tools > Options > Java > Gradle > Experimental > 
Enable 'lazy' Source Group Initialization is turned off.


You may test NetBeans 12.5-beta1

On 8/20/21 10:43 PM, Andreas Reichel wrote:

Greetings.

On Fri, 2021-08-20 at 18:52 -0700, Laszlo Kishalmi wrote:

Try to get rid of the version specification.


I have tried that just because I am desperate and ready to grab any straw.
Unfortunately it did not change anything -- and why should it.


 What you are doing there is a bad practice.


Says who and why. Please elaborate.

Best regards
Andreas



Re: Netbeans 11.3 enterprise application

2021-08-09 Thread Laszlo Kishalmi

Even Maven provides a pretty bad support for EAR-s. Go for WAR...

On 8/7/21 12:02 PM, José Contreras wrote:
I just tested this on master and got the same error when trying to 
build the EAR. The problem is that the pom files are badly created, to 
solve this you will have to rectify the pom files.
You could check the code examples (and the pom files) of the book in 
github 
.


Regards
José Contreras

El mié, 4 de ago. de 2021 a la(s) 06:20, Wayne Gemmell | Connect 
(wa...@connect-mobile.co.za ) escribió:


Don't do it with netbeans. There is no support for that going
forward. I changed my one to a war and added a few cron jobs. It's
now simpler and I have less build issues.

Regards
Wayne


On Tue, 3 Aug 2021 at 12:15, Tom Coudyzer mailto:tcdm...@gmail.com>> wrote:

Hi,

Seeking for some help on creating an Enterprise application 
(with Maven) via Netbeans 11.3 and AdoptOpenJDK 8 on MacOS 11.5.1

I create a new Enterprise application with Maven (Jave-EE 8) 
and end up with 4 projects. The wizard starts to compile the
maven projects but gives an error.

Ignoring this error I clean an build the

web (module) project
ejb (module) project
project
ear (module) project

First 3 build with success however when building the EAR I get
this error

Failed to execute goal on project myproject-ear: Could not
resolve dependencies for project
com.company:myproject-ear:war:1.0-SNAPSHOT: Could not find
artifact com.company:myproject-ejb:jar:1.0-SNAPSHOT -> [Help 1]

I manage to get it working when I change the EJB dependency
and change it from packing type EJB to WAR in the pom.xml of
the EAR module/project

Sorry if this is a "rookie" mistake or missing something from
my side but would be great to get some understanding why this
"out-of-the-box" is not working and what to do to get this fixed.

Thank you already and any help is much appreciated!

/Tom



Re: Gradle support and depending projects

2021-06-21 Thread Laszlo Kishalmi
Please check the Experimental Gradle Settings and disable the Lazy 
Source Group Initialization.


On 6/21/21 9:20 AM, Thomas Kellerer wrote:
For me, switchting to a different project groups fixes this error (at 
least most of the time)


Christian Pervoelz schrieb am 21.06.2021 um 15:34:
Yes, usually that helps for me too, but here neither Clean, 
restarting the IDE or just reloading the projects helped.


After playing around a bit more, I had some findings:

a) cleaning the cache in user dir brings some improvements
So to say, almost all imports are resolved now (and due to that most 
of the other stuff works), except those from the other project in the 
container. And this issue disappears after another clean build (maybe 
or not).

But of course, this is not a valid option for less experienced users.

b) the issue seems to appear only, if I load the project for the very 
first time, so the gradle supports detects problems, which are to be 
resolved by a primer build


c) as soon as any issue appears with the build files, the import 
statement issues are back

Only restarting the IDE helps.

d) between various restarts of the IDE the issues mentioned in the 
first mail might appear or not


Hmm, very mysterious that.

Anyway, it's hard to provide reliable steps to reproduce, as with 
another project container it didn't happen at all :(


Thanks
--- C.



Am Mo., 21. Juni 2021 um 14:47 Uhr schrieb Scott Palmer 
mailto:swpal...@gmail.com>>:


    This usually goes away for me if I reload the project after 
building to ensure the classes being imported have been compiled.  It 
would certainly be better if that wasn’t required.


    Scott

    On Jun 21, 2021, at 8:35 AM, Christian Pervoelz 
mailto:cpervo...@gmail.com>> wrote:


    
    Hi,

    I have a gradle container project consisting of two sub projects.
    Clean, Build, Run, Debug, etc.works properly as it should from 
NetBeans.


    But... every single import statement is marked as "package does 
not exist". This applies to


  * imports from external libraries
  * imports from the other project
  * imports from the same project, but a different package


    This causes a lot of follow-up problems (e.g. not working code 
completion, tons of markers in the side bar about issues), which are 
quite inconvenient to work with. It feels like working with a simple 
text editor, that has a bit of code coloring and formatting 
capabilities.
    There is also another nasty side effect: When creating a new 
class in a project, the file is created, but misses the package 
declaration. (But even after adding it manually, the class is still 
unknown to other classes)



    So, my question is:
    Might it be, that a gradle project in NB, that is depending on 
other gradle projects is not able to use the classpaths given in the 
project settings (which are all shown)? Or is it just ignoring those?


    Further information:
    Windows 10, Gradle 7, OpenJdk 16

    --- Thanks in advance
    C.




-
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



-
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: Why does NB start gradle 7

2021-06-17 Thread Laszlo Kishalmi
The question is which JDK is your NetBeans running on. If it is Java 16, 
then NetBeans has no other option than to run Gradle 7 even for project 
loading, otherwise the discovery would throw an unknown class version 
exception.



On 6/17/21 9:10 AM, Martin Meeser wrote:


Hello,

have you tried to set specific version

$ ./gradlew wrapper --gradle-version 6.2.1


you can also delete wrapper and recreate with specific version


with terminal in your gradle root:

what gives gradle --version and what ./gradlew --version


I assume you are aware of

https://docs.gradle.org/current/userguide/gradle_wrapper.html 




but adding it here just in case.

hope this helps

On 17.06.21 15:59, Jonathan Bergh wrote:

Hi,

Quick question on Gradle config in NB12.4. Seems NB starts Gradle 7 
(at least on my machine) by default every time NB starts up. In my 
Options -> Java -> Gradle config, the default version is set to 6.2.1 
and also prefer gradle wrapper for individual projects.


The problem is Gradle 7 means some gradle projects don't load 
properly. Selecting Clean and Build /*seems* /to build with the 
wrapper, but i /also/ get a popup complaining about Gradle 7 not 
being able to find certain plugins (only available in the lower 6.2.1 
version).


Is there a default gradle conf in /etc/netbeans.conf or somewhere else?

I have removed my GRADLE_HOME env var so that doesn't interfere.

Thanks for any info in advance
Rgds
Jon

--

Software Ingenieur Martin Meeser
Tel: +49 (0) 157 3434 0354
mail: martin.mee...@softwareing.de
www.softwareing.de 


Re: Should I install nb-javac plugin?

2021-05-20 Thread Laszlo Kishalmi
Yes for hot code reload. NetBeans just compiles the required classes 
either with the used build tool.


If you happen to enable CoS, then some build tools can use shortcuts, 
not to invoke a lengthy build process, but that's it.


On 5/20/21 1:14 AM, Neil C Smith wrote:

On Thu, 20 May 2021 at 08:47, Andreas Reichel
 wrote:

What about "Compile and Save"?

Personally I find this one of the most important features of Netbeans, 
especially when changing code hot while debugging?

Pretty sure you don't need Compile on Save enabled to allow hot code
reload in debugging - I disable CoS in every project.

There are other reasons to use nb-javac though - it's worth
considering eg.
https://cwiki.apache.org/confluence/display/NETBEANS/Differences%3A+nb-javac

Best wishes,

Neil

-
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



-
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: netbeans 12.3 doesn't support gradle 7.0.1? (keeps trying to use 6.7 for something)

2021-05-11 Thread Laszlo Kishalmi
Well, more properly NetBeans 12.3 bundles Gradle 6.7 tooling API which 
does not support Java 16. Actually NetBeans 12.3 does not officially 
supports Java 16.


Though you do not need to worry that much. NetBeans 12.4 will support 
Java 16, including Gradle 7.x


The 12.4-rc3 is in the pipeline, 12.4-rc2 is looking good, so probably 
won't have to wait for the final too long!


On 5/11/21 6:33 PM, Wiegley, Jeffrey wrote:


I’m trying to migrate to Java 16 and it seems to need gradle >=7.0

(A simple Hello World with gradle 6.7 throws an exception: 
java.lang.IllegalArgumentException: Unsupported class file major 
version 60, So apparently gradle 6.7 can’t handle Java 16)


But if I change the Tools->Options->Gradle to 7.0.1 it seems to 
compile but doesn’t allow me to run.


The “Notifications tab” has a warning:

Cannot load: C:\...\gradleproject6

Priority LOW Category: Warning

Unsupported class file major version 60

Bug! Exception in phase ‘semantic analysis’ in source unit 
‘_BUildScript_’ Unsupported class file major version 60


Could not open cp_init generic class cache for initialization script 
‘C:\Program 
Files\Netbeans-12.3\netbeans\extide\modules\gradle\nb-tooling.gradle’ 
(C:\...\.gradle\cache\6.7\scripts\775509g0wn2dvwyx898pf3241).


Could not open cp_init generic class cache for initialization script 
‘C:\Program 
Files\Netbeans-12.3\netbeans\extide\modules\gradle\nb-tooling.gradle’ 
(C:\...\.gradle\cache\6.7\scripts\775509g0wn2dvwyx898pf3241).


Could not run build action using connection to Gradle installation 
‘C:\...\.gradle\wrapper\dists\gradle-6.7-bin\efvqh8uyq79v2n7crncuhu9sv\gradle-6.7’.


I’m guessing this is because Netbeans 12.3 was released before Java 16 
and doesn’t support Java 16. Now that Java 16 is official is there a 
way to fix this problem?


Thanks,

Jeff Wiegley



Re: Too many open gradle files

2021-05-10 Thread Laszlo Kishalmi

Known issue, fixed in12.3.

On 5/9/21 10:32 PM, Will Hartung wrote:
So, running 12.2, "routinely", recently, my IDE has been just seizing 
up saying that it can not get exclusive access to a bunch of files 
(like my .java files in my project).


The only recourse was a hard kill of the IDE, which loses any pending 
changes.


Somehow, I don't recall how, I managed to see a mention about "too 
many files" being accessed. Simply, the process had run out of slots 
for open files.


It happened again and I managed to fire off "lsof -p " to get a 
list of open files.


It returned a list of almost 13,000 (12,957 to be exact) entries.

After some digging around, over 12,000 of them were referring to 
directories in my ~/.gradle directory.


To be honest, I didn't even know I had a .gradle directory.

I checked it, and I found only ("only") 2500ish files/directories 
underneath .gradle.


Further study found things like this:

 496 
/Users/will/.gradle/caches/modules-2/files-2.1/org.openjfx/javafx-base/14
 469 
/Users/will/.gradle/caches/modules-2/files-2.1/org.openjfx/javafx-graphics/14
 448 
/Users/will/.gradle/caches/modules-2/files-2.1/org.openjfx/javafx-controls/14
 260 
/Users/will/.gradle/caches/modules-2/files-2.1/org.glassfish.jersey.media/jersey-media-json-jackson/2.30.1
 259 
/Users/will/.gradle/caches/modules-2/files-2.1/org.jboss.spec.javax.transaction/jboss-transaction-api_1.2_spec/1.1.1.Final
 259 
/Users/will/.gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging/3.3.2.Final


This says that I had the ...javafx-base/14 directory open 496 times.

Now, I don't use gradle. I did discover I had a gradle project I 
downloaded opened in the IDE.


For the time being, I have renamed .gradle to .gradle.old, to hide it 
from the IDE. I've reopened my IDE, and the gradle project is still 
open, but I haven't tried to build it (I don't plan too), and the 
.gradle directory has not reappeared. So, I will leave it linger for 
the time being.


I should note that when the IDE locked up, I had not (directly) 
accessed the gradle projects,nor built them. The IDE may have dug 
these up during a project scan, that's just a guess.


But curious if anyone else has encountered such a thing.

Regards,

Will Hartung



-
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: NetBeans 8 app flickering/uncontrolled window movement on Alienware Dell - anyone seen this ?

2021-05-06 Thread Laszlo Kishalmi
I'd put my bet on the JDK AWT VRAM handling, so when I suggested upgrade 
JDK, I meant upgrading it to a more recent version than 1.8. I'd Try JDK 
11 first, if that's still do not work I'd test more recent ones...


On 5/6/21 8:02 AM, Geertjan Wielenga wrote:
Maybe Swing-specific, so try reproduce with another Swing app or 
create a new small Swing app yourself to reproduce the problem.


Gj

On Thu, 6 May 2021 at 16:55, bruehlicke <mailto:bruehli...@gmail.com>> wrote:


Thanx. Tried 1.8u202 (latest I can use without commercial license)
and it happened as well after a while. Hmm ... currently only on
Alienware laptop.  ... wicket. Anyhow here running NetBeans on a
Gaming laptop having trouble  ?  It looks like a generic problem
and hence just running NetBeans should cause the same issue.

Anyhow, thank you for your suggestion
Bernd

On Wed, May 5, 2021 at 10:04 AM Laszlo Kishalmi
mailto:laszlo.kisha...@gmail.com>> wrote:

Try to upgrade your JDK


On 5/5/21 7:53 AM, bruehlicke wrote:
> We have a mature NetBeans 8.2 app with Java 1.8u112 running
on Win 10
> without any problems. Now we got an Alienware and from time
to time
> the app becomes unusable as the different windows within the
app are
> moving randomly around when fx just moving the mouse. I do
not want to
> use the work "flickering" as that is not describing it
correctly. It
> is like the old mouse droppings we have seen, just on the
entire
> windows on the app.
>
> We have tried
> 1) To turn off the Nvidea card and use the interval Intel
graphic
> after which it worked for a while but came back
> 2) Vica versa turning off Intel  same result.
> 3) Reboot usually naked it work for a while
> 4) It happens on both internal and external monitors.
>
> I know, it sounds like Sci-Fi. Just wanted to see if anyone
out there
> has had a similar issue and maybe even found a work-around.
>
> Until now we have only seen this on Alienware machines. So
it MIGHT be
> a SciFi effect ;-)
>
> Bests
> Bernd
>

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

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



Re: NetBeans 8 app flickering/uncontrolled window movement on Alienware Dell - anyone seen this ?

2021-05-05 Thread Laszlo Kishalmi

Try to upgrade your JDK


On 5/5/21 7:53 AM, bruehlicke wrote:
We have a mature NetBeans 8.2 app with Java 1.8u112 running on Win 10 
without any problems. Now we got an Alienware and from time to time 
the app becomes unusable as the different windows within the app are 
moving randomly around when fx just moving the mouse. I do not want to 
use the work "flickering" as that is not describing it correctly. It 
is like the old mouse droppings we have seen, just on the entire 
windows on the app.


We have tried
1) To turn off the Nvidea card and use the interval Intel graphic 
after which it worked for a while but came back

2) Vica versa turning off Intel  same result.
3) Reboot usually naked it work for a while
4) It happens on both internal and external monitors.

I know, it sounds like Sci-Fi. Just wanted to see if anyone out there 
has had a similar issue and maybe even found a work-around.


Until now we have only seen this on Alienware machines. So it MIGHT be 
a SciFi effect ;-)


Bests
Bernd



-
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: java.lang.NumberFormatException: For input string: ""

2021-05-03 Thread Laszlo Kishalmi

That seems to be right.

On 5/3/21 9:30 PM, Zulfi Khan wrote:

Hi,

I am getting following message when I am compiling my program on 
NetBeans 12.3 on Ubuntu 18.04:


cd /home/zulfi/NetBeansProjects/GUI1; 
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 
/snap/netbeans/45/netbeans/java/maven/bin/mvn "-Dexec.args=-classpath 
%classpath com.mycompany.gui1.GuiMain" 
-Dexec.executable=/usr/lib/jvm/java-11-openjdk-amd64/bin/java 
process-classes org.codehaus.mojo:exec-maven-plugin:3.0.0:exec

Scanning for projects...

-< com.mycompany:GUI1 >-
Building GUI1 1.0-SNAPSHOT
[ jar ]-

--- maven-resources-plugin:2.6:resources (default-resources) @ GUI1 ---
Using 'UTF-8' encoding to copy filtered resources.
skip non existing resourceDirectory 
/home/zulfi/NetBeansProjects/GUI1/src/main/resources


--- maven-compiler-plugin:3.1:compile (default-compile) @ GUI1 ---
Changes detected - recompiling the module!
Compiling 1 source file to 
/home/zulfi/NetBeansProjects/GUI1/target/classes


--- exec-maven-plugin:3.0.0:exec (default-cli) @ GUI1 ---
java.lang.NumberFormatException: For input string: ""
    at 
java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

    at java.base/java.lang.Integer.parseInt(Integer.java:662)
    at java.base/java.lang.Integer.parseInt(Integer.java:770)
    at com.mycompany.gui1.GuiMain.main(GuiMain.java:21)

BUILD SUCCESS

Total time:  4.664 s
Finished at: 2021-05-03T23:25:08-05:00
-

My program is given below:

package com.mycompany.gui1;
import javax.swing.*;
import java.lang.NumberFormatException;

/**
 *
 * @author zulfi
 */
public class GuiMain {
    public static void main(String[] args){
    final String strFirstNum="";
    final String strSecNum="";
    int val1=0;
    int val2=0;
    try{
    val1 = Integer.parseInt(strSecNum);
    val2 = Integer.parseInt(strFirstNum);
    }catch (NumberFormatException e) {
    e.printStackTrace();}
    int res = val1 + val2;
    JOptionPane.showMessageDialog(null, "Testing Sum = "+ res );

    }

}


Somebody please guide me.

Zulfi.


Re: Gradle - displaying dependency graph like Maven

2021-05-03 Thread Laszlo Kishalmi
That's the best thing you can do now. There is no UI Graph 
representation of dependencies implemented for Gradle.


On 5/3/21 12:00 AM, Giles Winstanley wrote:

`gradle dependencies` is a good starting place (I typically also use the
-q option to remove the cruft).

There's also, for example:
`gradlew -q dependencies --configuration runtimeClasspath`
which will give you depdencencies just a specific configuration.

With regard to Netbeans integration, you can set this up as a saved task
by right-clicking the build.gradle file in the project view, then
defining the options (just omit the "gradle" or "gradlew" part at the
beginning). Output will be to the standard output window.

Hope that helps,
Stan

On 03/05/2021 07:16, Thomas Kellerer wrote:

When debugging problems with transitively included libraries in Maven, I find 
the graph display of the POM extremely helpful.

But I can't find anything similar when using a Gradle project.

Am I missing something, or does this simply not exist?

I am using NetBeans 12.3

Regards
Thomas

-
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


-
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



-
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: removing the "new project" support for Ant projects

2021-04-23 Thread Laszlo Kishalmi
While Ivy is an excellent tool to manage dependencies. It has a niche 
market. So unless somebody steps for it and implements a better support 
for that, I fear voting for it won't do that much.


On 4/23/21 9:27 AM, Oliver Rettig wrote:


+1 for better ivy integration

> On 23.04.2021 15:22, Laszlo Kishalmi wrote:

> > Ant projects can be fairly simply can be migrated to Gradle. It can

> > support your current folder structure. Your file/directory based 
library


> > dependencies, and occasional customization you made.

>

> Been there, tried that, and failed.

> If you have a working Ant project keep it. To convert it to Gradle only

> because it is the new-kid-on-the-block is, in my opinion, a wrong move.

>

> I considered to convert to Gradle to get dependency management but in

> the end it was easier to add Ivy instead of working out how to convert

> some tweaks and tricks, if possible at all. And I would love to have a

> better Ivy integration in NB instead of making Ant a 2nd-class citizen.

>

> Just my 2 cent.

>

>

> --

> Christoph

>

> -

> 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: removing the "new project" support for Ant projects

2021-04-23 Thread Laszlo Kishalmi
If someone has a well establised Ant project and he would migrate that 
to Maven, then he/she is looking at the wrong direction.


Ant projects can be fairly simply can be migrated to Gradle. It can 
support your current folder structure. Your file/directory based library 
dependencies, and occasional customization you made.


Theoretically it is possible to write a module that would convert 
NetBeans Generated Ant projects to Gradle. Might do that one day.


On 4/21/21 10:40 AM, Will Hartung wrote:



On Wed, Apr 21, 2021 at 4:51 AM Sean Carrick > wrote:


You have given a very well thought out answer to my message and I
appreciate that. Now, let me ask you this: do you maintain legacy
systems that were built with the Swing Application Framework? If
so, were you able to convert them to using Maven?


No, I have not used SAF. I looked into it, but it was after it's "use 
by date", so the links and what not weren't really appropriate for 
someone trying it today. For some reason I really struggle with GUIs.


I can not speak to any direct SAF support NB had at an IDE level. I 
can only posit that, in the end, the SAF is "just a jar file", and at 
that level, adding SAF support to a Maven project is simply a matter 
of importing it into your local repository. This is straightforward 
(and we can discuss it off line if you like). If you have a project 
you're willing to let me see, I can try and port it for you and 
document the steps.


While I remain an "Ant devotee," The easiest workaround for
dealing with libraries and teams is to simply set the project up
from the very start to use a dedicated folder for storing
libraries. When that is done, there is a `lib` folder created in
the top-level project directory. Anytime that you or someone else
on the team adds a library to the project, that library is copied
to that `lib` folder. If your team is using a repository (if not,
I want to know how changes are tracked ;-)), that `lib` folder is
also on the root of the repository and is copied to any machine
that clones the library.


Back when we were doing this, we simply checked the libraries into SVN 
so that the project could be mostly stand alone and have a single 
source of truth.


I actually introduced Ant to our group back in the day, at that time I 
was doing everything in Emacs, and folks were still trying to shoehorn 
Java projects in to make, which is a bad idea. I had to run around 
with a wiffle ball bat to prevent developers from just shoving stuff 
on to the classpath to get stuff to run. We weren't packaging things 
properly, relying on the CLASSPATH env variable for stuff, etc. It was 
awful. Ant didn't cause this, but I will say that with Maven and 
modern packaging, it is rare and far between that I have classpath 
problems, especially as it was back in the day. I certainly enjoy not 
having to mess with classpaths.


Also, you said, "My pom.xml file lists 13 direct dependencies. The
actual number of jars that get imported is closer to 50." To me,
that is not a feature, but rather it is a pain in the rear. I want
to know, and I mean /*know*/, /exactly/ what my project's
dependencies are. My goal when designing software is to keep
external dependencies at a bare minimum. No, I do not try to
reinvent the wheel in each project, but I like to have absolute
control over dependencies. To that end, when using Any, I have
that control.

You have that control with Maven, but it's more of a "don't include 
this, and this, and this" vs 'just use this and that and the other". 
It's more exception based (and the IDE makes this process really easy, 
as you can just prune entire branches off of the dependency graph in 
the UI). Maven offers all of that control, I just find I rarely need 
to exercise it. Which is great when you just want to lazily get stuff 
done.


As a comparison, I have created a simple "Hello World" project
that contains a single `JFrame` class, using Ant and using Maven.
From the finishing of the New Project Wizard until the project was
ready to be run for the first time, the Ant project took just a
few seconds, whereas the Maven project took well over a minute to
complete the background scanning. When I compiled them into Jar
files, the Ant application weighed in at around 30 KiB, whereas
the Maven application weighed in at just over 1 MiB. So, the Maven
project included some "dependencies" that I did not need. I felt
like I had no control at all.


I can't speak to that, I don't know what projects you used. I created 
a new Java Application, added a New JFrame Form, dragged a label on to 
it, and, in the end, the jar file I had was < 5K. Plus there are 
nuances missing from the Maven discussion about default artifacts and 
how it starts. But, safe to say, my eventual jar file had the 
NewJFrame class, a manifest and the pom. We 

Re: Adding dependencies in Gradle

2021-04-22 Thread Laszlo Kishalmi

You can have a file dependency to the other project artifact.

Or use composite Gradle builds:
https://docs.gradle.org/current/userguide/composite_builds.html


On 4/22/21 2:55 PM, Don wrote:

That shows a general dependency on another project.  In a NetBeans Ant 
project there are 2 main folders:   Source   and Library.  Right-click 
on library brings up a menu which allows me to add a Project, a Jar, 
and a predefined library containing several jar files. Can I add a jar 
as a dependency or at least as something that will allow me to include 
classes from the library in my .java files?


On 4/22/21 11:19 AM, joe foe wrote:

You have to add the project as a dependency.

See
https://docs.gradle.org/current/userguide/declaring_dependencies.html#sub:project_dependencies 



Regards,
JoeFoe

On Thu, 22 Apr 2021, 16:25 Don, > wrote:


With the reduction of support for Ant, which I have been using
for my
Java projects since 2004 or so, I decided to start learning
Gradle.  I
downloaded NetBeans 12.3 and proceeded to re-create the library/.jar
files I use to implement some basic classes that are specialized
for our
environment.  In Ant, it was easy to add a library to another
library
project but I do not see any way to tell Project B that it needs to
include the .jar from Project A. What am I missing?



-
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: Gradle 7 support?

2021-04-13 Thread Laszlo Kishalmi

https://github.com/apache/netbeans/pull/2861


On 4/13/21 2:40 PM, Scott Palmer wrote:

I believe this is a known issue. Hopefully a fix will make it into 12.4.

Scott


On Apr 13, 2021, at 3:04 PM, Fred Welland  wrote:



*Product Version:* Apache NetBeans IDE 12.3

*Java:* 14.0.2; OpenJDK 64-Bit Server VM 14.0.2+12

*Runtime:* OpenJDK Runtime Environment 14.0.2+12

*System:* Linux version 5.8.18-100.fc31.x86_64 running on amd64; 
UTF-8; en_US (nb)



I am getting the following warning from NB:


Reason: groovy.lang.MissingPropertyException: Could not get
unknown property 'compileConfigurationName' for source set 'main'
of type org.gradle.api.internal.tasks.DefaultSourceSet.

groovy.lang.MissingPropertyException: Could not get unknown
property 'compileConfigurationName' for source set 'main' of type
org.gradle.api.internal.tasks.DefaultSourceSet.



This happens after a project "clean and build".    Build seems to 
'work' and I haven't' noticed anything broken in NB, yet.



Any suggestions?   Gradle 7, supported in NB 12.3?    I use 'prefer 
gradle wrapper' in NB.





Re: Manjaro/Arch XFCE - When running application in Tomcat passwords are asked

2021-04-04 Thread Laszlo Kishalmi

try to add the password at the server properties.

On 4/1/21 2:33 AM, Mladen Adamović wrote:

Hi all,

I'm running the latest Manjaro XFCE (fork of Arch).
I have enabled "Launch GNOME services at startup" in my XFCE.
I'm running an application in Tomcat 9.
Each first time I run the application, IDE asks me for a keyring 
master password (don't know why) and later followed by asking password 
for Tomcat manager application.


Anyone knows the way to get rid of these two password boxes?

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: NetBeans 12.3 . I can not open some projects

2021-04-02 Thread Laszlo Kishalmi
Delete your netbeans userdir (maybe cache as well) The way storing  java 
preferences on Windows got changed with older JDKs and not in a 
compatible way.


On 4/2/21 7:17 PM, Miguel Castañeda wrote:

Hi,
I had opened a java 5 version  project and after that, I can not open 
any java 8 project.I have this error message : 
java.lang.IllegalArgumentException: Key contains code point U+
at 
java.prefs/java.util.prefs.AbstractPreferences.get(AbstractPreferences.java:296)
at 
org.netbeans.modules.maven.queries.MavenFileOwnerQueryImpl.registerCoordinates(MavenFileOwnerQueryImpl.java:153)
at 
org.netbeans.modules.maven.ProjectOpenedHookImpl.registerWithSubmodules(ProjectOpenedHookImpl.java


How can I fix it ?
I uninstalled Java 8 and now my Java  version is jdk-11.05
My classpath =
Windows x64

--
Miguel Castañeda
Gestor Cultural
@rteyco
Bogotá D.C., Colombia, South Amerika
Cel.: 32044889439


Re: NetBeans Platform modules with Gradle

2021-03-29 Thread Laszlo Kishalmi

You might take a chance with:

https://github.com/radimk/gradle-nbm-plugin

Though it has not been updated for a while.

I'm sorry but the Gradle Tooling for NBMs are pretty down on my list at 
the moment. I'd rather see NetBeans itself (at least the platform) being 
build with Gradle first. However our Maven tooling has updates every now 
and then, so it might be not that hard to fork the old plugin and get it 
updated with based on the current Maven work we have.


On 3/29/21 11:40 AM, Adam Korynta wrote:
I’m asking about NetBeans modules (.nbm packages) being built with 
Gradle for building NetBeans RCP applications. Tutorial materials 
would be great as well, but I suspect they don’t yet exist.


Thank you,

Adam

On Mar 20, 2021, at 11:35 AM, Eric Bresie > wrote:


Are you asking for "Java with Gradle" as is available in current 
releases like the following?




Or tutorial materials?

Eric Bresie
ebre...@gmail.com 


On Tue, Mar 16, 2021 at 10:52 PM Adam Korynta > wrote:


Hello,

I am happy to see the progress being made with Apache NetBeans
and excited to see the NetBeans Platform tutorials getting some
love recently. I have used NetBeans Platform ant modules and
maven modules to great success in the past. Our client is looking
to take a more active role in the development process of
applications, but is more familiar with Gradle. I am very new to
Gradle myself, but am wondering if there is support for Gradle
NetBeans modules? I see an article from a couple years back
(https://blogs.oracle.com/geertjan/how-to-build-netbeans-modules-with-gradle

)
but am wondering if there has been support and success building
full applications this way. I see the gradle-nbm-plugin from
radimk here: https://github.com/radimk/gradle-nbm-plugin
 but wanted to get a
little more information before diving in.

Thank you,

Adam Korynta

/Resource Management Associates - Software Developer/

/1756 Picasso Avenue, Suite G, Davis, CA 95618/

/Phone 530-564-7043 ext. 217/

/Fax 530-231-5323/

/a...@rmanet.com /

/https://www.rmanet.com /

 





Re: Specify JVM arguments with Gradle

2021-03-25 Thread Laszlo Kishalmi

I think bootRun task is a JavaExec task which forks a VM

That does not inherit the Gradle SystemProperties. In this case I have 
to say you need to customize your bootRun task in your build.gradle file.



On 3/25/21 6:50 AM, Thomas Kellerer wrote:

Hmm...

I added

 -Dsomeprop=somevalue

into the "Run action" so the initial "bootRun" became:

 -Dsomeprop=somevalue  bootRun

but inside the application System.getProperty("someprop") returns null.

What am I missing here?


Thomas Kellerer schrieb am 24.03.2021 um 07:20:

Thanks.

Mark A. Flacy schrieb am 22.03.2021 um 17:08:

Right-click on the project in the Projects window, open the Project
Properties.  Look for Build -> Build Actions.


On Monday, March 22, 2021 10:14:18 AM CDT Thomas Kellerer wrote:

Hello,

is it possible to define specific JVM arguments (-Dxxx=...) that should be
used by Gradle when running (or testing) an application?

I do not want to modify build.gradle as those would be environment specific
settings, which should not be stored in the Git reposiotry.

When I do it on the commandline I can use:

 gradlew -Dxxx=foo ...

but I can't find the corresponding UI elements in the project properties
from inside NetBeans (12.3)

What am I missing?

Thanks
Thomas

-
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



-
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: Doesn't Help-->Check for Updates update 12.1 to 12.3?

2021-03-23 Thread Laszlo Kishalmi
That's for just plugin updates. We are planning to experiment using that 
for version updates as well, but it's too early to say anything.


On 3/23/21 8:41 PM, Varuna Seneviratna wrote:

Hello
       I tried to update 12.1 to 12.3 by going to Help-->Check for 
Updates but the message is your IDE is "Your IDE is up to date"


Isn't  Check for Updates for updating the IDE or only for plugin updates?

Varuna


Re: master password

2021-03-23 Thread Laszlo Kishalmi
Well, if it is Gnome. Our JNA support Gnome 2 API only which is no 
longer available in recent Ubuntu (and probably other) distributions. 
There was an option to install that library 18.04, but that is no longer 
available.


On 3/23/21 2:00 PM, Eric Bresie wrote:
Sounded like somethings were reinstalled ..but did some of it not get 
reinstalled fully or is missing?



FINE [org.netbeans.modules.keyring.gnome.GnomeProvider]
java.lang.UnsatisfiedLinkError: Unable to load library 'gnome-keyring':
libgnome-keyring.so: cannot open shared object file: No such file or directory
libgnome-keyring.so: cannot open shared object file: No such file or directory
Native library (linux-x86-64/libgnome-keyring.so) not found in resource path 
(/mnt/common/netbeans-12.3/netbeans/platform/lib/boot.jar:/mnt/common/netbeans-12.3/netbeans/platform/lib/org-openide-modules.jar:/mnt/common/netbeans-12.3/netbeans/platform/lib/org-openide-util.jar:/mnt/common/netbeans-12.3/netbeans/platform/lib/org-openide-util-lookup.jar:/mnt/common/netbeans-12.3/netbeans/platform/lib/org-openide-util-ui.jar)

FINE [org.netbeans.modules.keyring.win32.Win32Protect]: not running on Windows
FINE [org.netbeans.modules.keyring.utils.Utils]: chmod go-r 
/home/cenbe/.netbeans/12.3/config/Preferences/org/netbeans/modules/keyring.properties
WARNING [org.netbeans.modules.keyring.fallback.MasterPasswordEncryption]: 
Falling back to master password encryption; add 
-J-Dorg.netbeans.modules.keyring.level=0 to netbeans.conf to see why native 
keyrings could not be loaded
FINE [org.netbeans.modules.keyring.utils.Utils]: no such file to chmod: 
/home/cenbe/.netbeans/12.3/config/Preferences/org/netbeans/modules/keyring/general.properties
Eric Bresie
ebre...@gmail.com 

On March 22, 2021 at 2:18:03 PM CDT, Glenn Holmer 
mailto:ce...@kolabnow.com.invalid>> wrote:

On 3/22/21 12:45 PM, Neil C Smith wrote:
On Mon, 22 Mar 2021 at 17:05, Boris Heithecker 
mailto:boris.heithec...@gmx.net>> wrote:

Unfortunately, no one (including myself) has yet found time to
implement a simple switch, or system property to switch off either
implementation on Linux.


There is -J-Dnetbeans.keyring.no.native=true ? Still at least shows
the non-native one though? UI to disable entirely would be on my own
papercuts list.


Added that to netbeans.conf, restarted, did a git fetch, and got the
master password dialog :) Checked the log file and saw this:

WARNING
[org.netbeans.modules.keyring.fallback.MasterPasswordEncryption]:
Falling back to master password encryption; add
-J-Dorg.netbeans.modules.keyring.level=0 to netbeans.conf to see why
native keyrings could not be loaded

Added that, got the dialog again, and saw this in the log:

https://www.lyonlabs.org/temp/master-password-log.txt 



So it looks like there's something to the idea that he's looking for
some KDE stuff and can't find it (see my other message: no kwallet
installed, running a fresh install of Debian Buster w/MATE).

I remember that this used to get a lot of complaints years ago, but it's
been quite a while since I last saw that dialog.

--
Glenn Holmer (Linux registered user #16682)
"After the vintage season came the aftermath -- and Cenbe."
cenbe.vcf7 bytes <#attachment-1>
-
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: Fwd: [java] JUnit 4 tests lead to "Forked Java VM exited abnormally"

2021-03-09 Thread Laszlo Kishalmi
Well, I'd debug this one: Testcase: 
de.gnwi.mfsim.model.graphics.body.test.TestBodySphere:null: Caused an ERROR


There is something null in there. Unfortunately I can't tell anything 
much closer than that.



On 3/9/21 5:58 AM, Achim Zielesny wrote:

Dear Laszlo,

thanks a lot! We collected the extensive debug-log output in a text 
file ( available at https://w-hs.sciebo.de/s/uXUkqsDl0lhono0 
<https://w-hs.sciebo.de/s/uXUkqsDl0lhono0> ) - and now feel a little 
more lost. Again, any additional hint is highly appreciated - and many 
thanks in advance!


Best regards,
Achim

-- Forwarded message -
Von: *Laszlo Kishalmi* <mailto:laszlo.kisha...@gmail.com>>

Date: Mo., 8. März 2021 um 20:09 Uhr
Subject: Re: [java] JUnit 4 tests lead to "Forked Java VM exited 
abnormally"

To: mailto:users@netbeans.apache.org>>


You might need to check the VM args in the test, sometimes it passes 
some bootclasspath related arguments which got removed from newer 
JDK-s, That could result such an error. I'd recommed to switch on 
debug logging and check how the JVM is being invoked.



On 3/8/21 10:11 AM, Achim Zielesny wrote:

Dear NetBeans-Community,

the migration of several Java 8 projects from NetBeans 8.2 to Apache 
NetBeans 12.1/AdoptOpenJDK 11 worked very well and successfully. Only 
the JUnit tests (we still use junit-4.10.jar) do unfortunately no 
longer seem to work: A "Test file" or "Debug Test File" now generates 
an error message:


Forked Java VM exited abnormally. Please note the time in the report 
does not reflect the time until the VM exit.

junit.framework.AssertionFailedError
at jdk.internal.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.util.Vector.forEach(Vector.java:1388)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at 
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:128)


We feel a little lost - so any hints are highly appreciated!

Many thanks in advance and best regards,
Achim

--
Prof. Dr. Achim Zielesny

Westphalian University of Applied Sciences
Institute for Bioinformatics and Chemoinformatics
August-Schmidt-Ring 10
D-45665 Recklinghausen, Germany
www.w-hs.de <http://www.w-hs.de>

E-Mail: achim.ziele...@w-hs.de <mailto:achim.ziele...@w-hs.de> / 
achim.ziele...@googlemail.com <mailto:achim.ziele...@googlemail.com>
Website: 
https://www.w-hs.de/service/informationen-zur-person/person/zielesny/ 
<https://www.w-hs.de/service/informationen-zur-person/person/zielesny/>


Re: [java] JUnit 4 tests lead to "Forked Java VM exited abnormally"

2021-03-08 Thread Laszlo Kishalmi
You might need to check the VM args in the test, sometimes it passes 
some bootclasspath related arguments which got removed from newer JDK-s, 
That could result such an error. I'd recommed to switch on debug logging 
and check how the JVM is being invoked.



On 3/8/21 10:11 AM, Achim Zielesny wrote:

Dear NetBeans-Community,

the migration of several Java 8 projects from NetBeans 8.2 to Apache 
NetBeans 12.1/AdoptOpenJDK 11 worked very well and successfully. Only 
the JUnit tests (we still use junit-4.10.jar) do unfortunately no 
longer seem to work: A "Test file" or "Debug Test File" now generates 
an error message:


Forked Java VM exited abnormally. Please note the time in the report 
does not reflect the time until the VM exit.

junit.framework.AssertionFailedError
at jdk.internal.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.util.Vector.forEach(Vector.java:1388)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:128)

We feel a little lost - so any hints are highly appreciated!

Many thanks in advance and best regards,
Achim

--
Prof. Dr. Achim Zielesny

Westphalian University of Applied Sciences
Institute for Bioinformatics and Chemoinformatics
August-Schmidt-Ring 10
D-45665 Recklinghausen, Germany
www.w-hs.de 

E-Mail: achim.ziele...@w-hs.de  / 
achim.ziele...@googlemail.com 
Website: 
https://www.w-hs.de/service/informationen-zur-person/person/zielesny/ 



Re: NetBeans installed but can't execute

2021-03-07 Thread Laszlo Kishalmi

Well, first make sure that you have removed the netbeans package with apt:

sudo apt remove netbeans

When that's installed the Snap package does not work


Also I've noticed that your JAVA_HOME is bad. It should not point to the 
java executable, but a the directory where Java is being installed. On 
Ubuntu it is usually: /usr/lib/jvm/ java-8-openjdk-amd64 or 
/usr/lib/jvm/ java-8-openjdk-amd64


However the best thing you can do is not set the JAVA_HOME at all. So 
I'd recommend to remove the your JAVA_HOME from wherever you set that 
and reboot your machine.


On 3/6/21 4:10 PM, Zulfi Khan wrote:


Hi,

I am trying to execute NetBeans 10.0 on my Ubuntu 18.04, But my Java 
version is 11.0. I found the following link:



https://askubuntu.com/questions/1196172/netbeans-doesnt-work-in-18-04 



I installed NetBeans 11 but still I am getting the same problem 
because it is executing NetBeans 10. I don't know how to execute 
NetBeans 11 classic.



My $JAVA_HOME path is set to:

$ echo $JAVA_HOME

/usr/bin/java

I am attaching the image also which can show you all the problems. 
Somebody please guide me.



Zulfi.



-
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: Setting JVM args for Run Single File in Gradle project

2021-03-03 Thread Laszlo Kishalmi

Well, that's not really supported without any tweaks.

There is workaround though:

Create a custom task named: runSingle (It might be a JavaExec type) in 
your Gradle build. It can use the following project properties:


runClassName for the main class to be run and runArgs which is a string 
for the arguments (needed to be processed to array first), if that's 
being used


Configure your extra JVM Args in the runSingle task.


On 3/3/21 9:35 AM, Scott Palmer wrote:
Just a quick question... How do I configure JVM options for running a 
single file (via right-click) for a Gradle project in NB 12.x?

(I need to add a javaagent.)

If there are docs somewhere please let me know.

Thanks,

Scott


-
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: Error when connecting to Remote Git Repository

2021-02-25 Thread Laszlo Kishalmi
Well, if it is BitBucket (not BibBucket which I do not know of), then 
the trick with using it with ssh keys is Cloning the repository with the 
bitbucket user name instead of "git" (however it is the later which 
BitBucket offer by default): eg:


Instead of: git clone g...@bitbucket.org:/.git

Use : git clone @bitbucket.org:/.git


On 2/25/21 2:26 PM, Darin Miller wrote:

Hi Sebastian,

At work, we use BibBucket (git fork) where standard SSH keys, BB and 
Netbean do not play well together.  Try using an SSH key that was 
generated with PEM, i.e:


  ssh-key -t rsa -m PEM

I am not sure if the limitation is a "feature" or a "bug".

 o__
__>/ __
(__)\(__) Darin | 208-283-1574


On Thu, Feb 25, 2021 at 1:14 PM seb.-...@t-online.de 
 > wrote:


Hello,

I have a problem pushing my Netbeans Project to a Gitlab
Repository. I tried to connect to my repository with two other
programs that worked well so there should be no mistake with my
login credentials. When I try to clone or push to a remote
repository, I always get the error:
"Incorrect credentials for repository at
https://gitlab.com/xxx/xxx.git; .

In addition to that, an unexpected exception occurred with the the
error:

java.lang.NoClassDefFoundError: Could not initialize class
org.netbeans.modules.keyring.mac.SecurityLibrary
at
org.netbeans.modules.keyring.mac.MacProvider.delete(MacProvider.java:89)
at org.netbeans.api.keyring.Keyring.deleteImpl(Keyring.java:168)
at org.netbeans.api.keyring.Keyring.access$300(Keyring.java:52)
at org.netbeans.api.keyring.Keyring$3.run(Keyring.java:189)
at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

I am using Apache NetBeans IDE 11.0 (Build
incubator-netbeans-release-404-on-20190319) with Java 12.0.1 on
macOS 11.2.1 Big Sur.

I thought that NetBeans is too old and tried to update to 12.2. I
renamed all the NetBeans 11 folders at /Applications,
"/Application Support" and "/Caches" but I always get the error
"Cannot initialize registry. Exception:
org.netbeans.installer.utils.exceptions.InitializationException:
No components matching the requirement: nb-extide/12.2.0.0.201121
requires nb-all/12.2.0.0.201121 - 12.2.0.0.201121.

This error appers a few times and then the installer crashes.

For any help I would be thankful. I would like to update to
Netbeans 12, but its not necessary. If you need a log file I will
provide it.

Thanks

Sebastian





Re: Error when connecting to Remote Git Repository

2021-02-25 Thread Laszlo Kishalmi
That's bad. I guess it's because changes in BigSur. As I see NetBeans is 
not able to talk with the Native keyring. Please file a bug into the 
JIRA, at worst case NetBeans shoud offer to use its private KeyRing 
implementation instead of throwing a NCDFE.


On 2/25/21 12:12 PM, seb.-...@t-online.de wrote:


Hello,

I have a problem pushing my Netbeans Project to a Gitlab Repository. I 
tried to connect to my repository with two other programs that worked 
well so there should be no mistake with my login credentials. When I 
try to clone or push to a remote repository, I always get the error: 
"Incorrect credentials for repository at 
https://gitlab.com/xxx/xxx.git; .


In addition to that, an unexpected exception occurred with the the error:

java.lang.NoClassDefFoundError: Could not initialize class 
org.netbeans.modules.keyring.mac.SecurityLibrary
at 
org.netbeans.modules.keyring.mac.MacProvider.delete(MacProvider.java:89)

at org.netbeans.api.keyring.Keyring.deleteImpl(Keyring.java:168)
at org.netbeans.api.keyring.Keyring.access$300(Keyring.java:52)
at org.netbeans.api.keyring.Keyring$3.run(Keyring.java:189)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)

at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
[catch] at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)


I am using Apache NetBeans IDE 11.0 (Build 
incubator-netbeans-release-404-on-20190319) with Java 12.0.1 on macOS 
11.2.1 Big Sur.


I thought that NetBeans is too old and tried to update to 12.2. I 
renamed all the NetBeans 11 folders at /Applications, "/Application 
Support" and "/Caches" but I always get the error "Cannot initialize 
registry. Exception: 
org.netbeans.installer.utils.exceptions.InitializationException: No 
components matching the requirement: nb-extide/12.2.0.0.201121 
requires nb-all/12.2.0.0.201121 - 12.2.0.0.201121.


This error appers a few times and then the installer crashes.

For any help I would be thankful. I would like to update to Netbeans 
12, but its not necessary. If you need a log file I will provide it.


Thanks

Sebastian

 


Re: Problem running Netbeans 12.0 debugger.

2021-02-15 Thread Laszlo Kishalmi
It seems something is to be replaced with null during your maven 
execution evaluation. Maybe you have an extra property to be replaced 
somewhere, but left unspecified.


On 2/15/21 10:13 AM, Nelligan, Steven M wrote:


Any suggestions on how to fix this problem?

This works on other workstations.  I’ve removed and reinstalled 
Netbeans again, but it still fails.


I’m connecting to a Tomcat 7 server…

When I attempt to attach debugger:

I get the following trap:  (I’ve included most of the messages.log for 
reference of messages before this.


SEVERE [org.openide.util.Exceptions]

java.lang.NullPointerException

    at 
java.base/java.util.concurrent.ConcurrentHashMap$MapEntry.setValue(ConcurrentHashMap.java:3539)


    at 
org.apache.maven.model.interpolation.StringVisitorModelInterpolator$ModelVisitor.visit(StringVisitorModelInterpolator.java:1429)


    at 
org.apache.maven.model.interpolation.StringVisitorModelInterpolator$ModelVisitor.visit(StringVisitorModelInterpolator.java:1027)


    at 
org.apache.maven.model.interpolation.StringVisitorModelInterpolator$ModelVisitor.visit(StringVisitorModelInterpolator.java:170)


    at 
org.apache.maven.model.interpolation.StringVisitorModelInterpolator.interpolateModel(StringVisitorModelInterpolator.java:107)


    at 
org.apache.maven.model.building.DefaultModelBuilder.interpolateModel(DefaultModelBuilder.java:789)


    at 
org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:393)


    at 
org.netbeans.modules.maven.embedder.impl.NBModelBuilder.build(NBModelBuilder.java:53)


    at 
org.netbeans.modules.maven.embedder.MavenEmbedder.executeModelBuilder(MavenEmbedder.java:447)


    at 
org.netbeans.modules.maven.NbMavenProjectImpl.getRawModel(NbMavenProjectImpl.java:193)


    at 
org.netbeans.modules.maven.api.NbMavenProject.getRawModel(NbMavenProject.java:353)


    at 
org.netbeans.modules.maven.MavenProjectPropsImpl.lambda$get$0(MavenProjectPropsImpl.java:93)


    at 
org.netbeans.modules.openide.util.DefaultMutexImplementation.readAccess(DefaultMutexImplementation.java:188)


    at org.openide.util.Mutex.readAccess(Mutex.java:193)

    at 
org.netbeans.modules.maven.MavenProjectPropsImpl.get(MavenProjectPropsImpl.java:78)


    at 
org.netbeans.modules.maven.MavenProjectPropsImpl.get(MavenProjectPropsImpl.java:74)


    at 
org.netbeans.modules.maven.MavenProjectPropsImpl$PackagingProviderImpl.packaging(MavenProjectPropsImpl.java:304)


    at 
org.netbeans.modules.maven.api.NbMavenProject.getPackagingType(NbMavenProject.java:340)


    at 
org.netbeans.modules.maven.NbMavenProjectImpl$PackagingTypeDependentLookup.check(NbMavenProjectImpl.java:843)


    at 
org.netbeans.modules.maven.NbMavenProjectImpl$PackagingTypeDependentLookup.(NbMavenProjectImpl.java:833)


    at 
org.netbeans.modules.maven.NbMavenProjectImpl.(NbMavenProjectImpl.java:251)


    at 
org.netbeans.modules.maven.NbMavenProjectFactory.loadProject(NbMavenProjectFactory.java:95)


    at 
org.netbeans.modules.projectapi.nb.NbProjectManager.createProject(NbProjectManager.java:376)


    at 
org.netbeans.modules.projectapi.nb.NbProjectManager.access$300(NbProjectManager.java:69)


    at 
org.netbeans.modules.projectapi.nb.NbProjectManager$2.run(NbProjectManager.java:289)


    at 
org.netbeans.modules.projectapi.nb.NbProjectManager$2.run(NbProjectManager.java:218)


    at 
org.netbeans.modules.openide.util.DefaultMutexImplementation.readAccess(DefaultMutexImplementation.java:188)


    at org.openide.util.Mutex.readAccess(Mutex.java:225)

    at 
org.netbeans.modules.projectapi.nb.NbProjectManager.findProject(NbProjectManager.java:218)


    at 
org.netbeans.api.project.ProjectManager.findProject(ProjectManager.java:142)


    at 
org.netbeans.modules.projectapi.SimpleFileOwnerQueryImplementation.getOwner(SimpleFileOwnerQueryImplementation.java:136)


    at 
org.netbeans.api.project.FileOwnerQuery.getOwner(FileOwnerQuery.java:91)


    at 
org.netbeans.modules.projectapi.ProjectFileEncodingQueryImplementation.getEncoding(ProjectFileEncodingQueryImplementation.java:47)


    at 
org.netbeans.api.queries.FileEncodingQuery.getEncoding(FileEncodingQuery.java:71)


    at 
org.openide.text.DataEditorSupport.openDocument(DataEditorSupport.java:559)


    at 
org.openide.text.NbDocument.getDocument(NbDocument.java:591)


    at 
org.netbeans.modules.debugger.jpda.projectsui.LineTranslations$BreakpointLineUpdater.attach(LineTranslations.java:427)


    at 

Re: gradle problems (NetBeans 12.2)

2021-02-01 Thread Laszlo Kishalmi
Well, I'm sorry. Even if you can't share the whole project/scripts. It 
would be really usefull if you could create o dummy project where this 
issue can be demonstrated.


On 2/1/21 8:31 AM, Thomas Kellerer wrote:

Thanks for the feedback.

I tried 12.3-beta1, but that didn't change anything.

It seems I will have to evaluate other options for this project :(

Regards
Thomas


Laszlo Kishalmi schrieb am 29.01.2021 um 20:44:

Give it a try to 12.3 beta1. Well it might not get drastic changes, there are a 
few improvements made unfortunately not as many as I'd liked.

https://github.com/apache/netbeans/pulls?q=is%3Apr+is%3Aclosed+milestone%3A12.3+label%3AGradle

Though even if it won't entirely resolve your issues this one could help:

https://github.com/apache/netbeans/pull/2629

These are in 12.3-beta1

On 1/28/21 11:44 PM, Thomas Kellerer wrote:

Hello,

I am working with a gradle project that uses multiple sub-modules, something 
along the lines:

    project
  module_1
  module_2
  module_3
  module_4

Despite the fact that the build on the command line works just fine (and none 
of the IntelliJ users have a problem), NetBeans complains that one of the 
sub-modules cannot be found.

module_1 is used to build a docker container, if that makes a difference. The 
project is setup to use the local gradle wrapper.

module_2 uses classes from module_1, but NetBeans marks module_2 with the yellow 
exclamation mark and the tooltip says: "cannot resolve project :module_1".

The configurations node also has the yellow exclamation mark and the tooltip says 
"There are unresolved configurations".

When I open build.gradle for module_2, I see the following lines at the top:

  import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
  import com.bmuschko.gradle.docker.tasks.image.DockerPushImage
  import com.bmuschko.gradle.docker.tasks.image.DockerRemoveImage


which are all underlined with the red squiggly line, so NetBeans doesn't know 
what to do (again: gradle on the command line works just fine)

Doing a "Clean and build" (which works without an error) of the main project or 
each module separately from within NetBeans doesn't fix this.

When I open a class in module_2 that uses classes from module_1, things look OK. But if I 
e.g. use "Find usages" on one of the classes in module_1, the classes from 
module_2 are not found. So it seems module_2 isn't properly recognized by NetBeans.

This also means that "Fix imports" or "Fast import" don't work across the 
modules, which forces me to manually write the necessary import statements (which then in turn work 
as the class can be compiled).

Opening gradle projects has never bee a pleasant experience for me with NetBeans, I 
constantly have to go to the command line to "fix" things in NetBeans (again, 
none of the IntelliJ users have a problem). As I am the only one using NetBeans, I can't 
really address this in the team.

I cannot disclose the build scripts (or even the whole project) as this is 
confidential.

Any ideas how I can convince NetBeans to detect the sub-modules correctly?

I am willing to give 12.3-beta a try if someone says it drastically improved 
the gradle support.


-
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


-
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


-
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



-
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



  1   2   3   >