Re: How to create property/getter/setter methods for JavaFX property using NB 22

2024-06-06 Thread Will Hartung
JavaFX properties look like this:

StringPrroperty nameProperty = new SimpleStringProperty();

public String getName() {
return nameProperty.get();
}
public void setName(String name) {
nameProperty.set(name);
}

public StringProperty nameProperty() {
return nameProperty;
}

There's also a lazy version that won't create the actual property until
it's used.

StringPrroperty nameProperty;

public String getName() {
if (nameProperty == null) {
return null;
} else {
return nameProperty.get();
}
}
public void setName(String name) {
if (nameProperty == null) {
nameProperty = new SimpleStringProperty();
}
nameProperty.set(name);
}

public StringProperty nameProperty() {
if (nameProperty == null) {
nameProperty = new SimpleStringProperty();
}
return nameProperty;
}

Finally, there's this version that delays creating a property until it's
legitimately needed. This is nice if you're doing a bunch of Swing/JavaFX
crossover stuff. No need for all the properties if the bean is being used
in, say, a Swing form or table. Also nice for raw loading of beans from a
DB for a report. JavaFX properties are a bit heavy. But the bean code is
just a bit much.

String _name;
StringProperty nameProperty;

public String getName() {
if (nameProperty != null) {
return nameProperty.get();
} else {
return _name;
}
}

public void setName(String name) {
if (nameProperty != null) {
nameProperty.set(name);
} else {
_name = name;
}
}

public StringProperty nameProperty() {
if (nameProperty == null) {
nameProperty = new SimpleProperty(_name);
}
return nameProperty;
}

I just use the first, easy style in my work. I'm not working with volumes
where the properties have been an issue.

Netbeans has never had JavaFX property support that I know of.

Even Lombok does not have support for FX style properties.

Myself, I've been just cutting and pasting into ChatGPT when I need them in
bulk. "The ultimate wizard".

I love JavaFX properties, they're super powerful.

Regards,

Will Hartung

On Tue, May 7, 2024 at 5:19 AM Sean Carrick  wrote:

> PavelTurk,
>
> Actually, the only difference between the getters/setters in your two
> messages are the content of the getters/setters and the parameter to the
> setter. NB gives you the skeleton, which you then edit to your needs...
>
> Once you insert the getters/setters through the Source...Insert Code
> (Alt+Insert), you end up with:
>
> public StringProperty getTest() {
> return test;
> }
>
> public void setTest(StringProperty test) {
> this.test = test;
> }
>
> With those skeletons in place, you edit them to fit your needs:
>
> public String getTest() {
> return test.get();
> }
>
> public void setTest(String test) {
> test.set(test);
> }
>
> The code entered by the insert code command is editable, unlike when doing
> visual development in Matisse (which is *actually editable*, if you know
> how). NB cannot know everything that you need, but does its best to aide
> you in not needing to manually type so much boiler-plate code. Once the
> boiler-plate is in place, it is up to the developer to edit the default
> code to fit their needs.
>
> I hope this helps you out.
>
> Sincerely,
>
> Sean Carrick
> Owner - PekinSOFT Systems
> s...@pekinsoft.com
> (309) 989-0672
>
>
> On Tue, May 7, 2024 at 6:56 AM PavelTurk  wrote:
>
>> Hi Tom,
>>
>> Thank you for your reply. But I think you didn't pay attention to my
>> example. Please, read it and you will understand that it is
>> only about JavaFX properties. To make it clear, this is NOT what I need:
>>
>>  public StringProperty getTest() {
>>  return test;
>>  }
>>
>>  public void setTest(StringProperty test) {
>>  this.test = test;
>>  }
>>
>> Best regards, Pavel
>>
>>
>> On 5/7/24 12:17 PM, Thomas Wolf wrote:
>> > The solution doesn’t really have anything to do with Java FX.  Put your
>> cursor where you want to put the getter/setter methods and then right-click
>> menu->Insert Code… and pick creation of getter/setter methods.
>> >
>> > Tom
>> >
>> >> On May 7, 2024, at 7:50 AM, PavelTurk  wrote:
>> >>
>> >> Hello all,
>> >>
>> >> Could anyone say how create property/getter/setter methods for JavaFX
>> property?
>> >>
>> >> For example, if I have:
>> >>
>> >>  private StringProperty test = new SimpleStringProperty();
>> >>
>> >> I want NB to generate:
>> >>
>>

Re: Adding support for a file extension

2024-06-05 Thread Will Hartung
On Wed, Jun 5, 2024 at 9:48 AM Michael Bien  wrote:

> try options -> miscellaneous -> files
>
> This should be able to associate extensions with known mime types.
>
>
Yes, perfect, thank you!

Regards,

Will Hartung


Adding support for a file extension

2024-06-05 Thread Will Hartung
I have my own little HTML templating files, but they have their own
extension.

So, even though they're 99% HTML, the IDE does not consider them HTML.
Notably, it won't let me format the files (which is all I really want,
honestly).

Is there a straightforward way to tell NB that my .tt files are "like HTML"?

Do I need to make a plugin for it? It should be a really simple one, right?

Thanks!

Regards,

Will Hartung


Re: Can't create test for class

2023-01-08 Thread Will Hartung
On Sun, Jan 8, 2023 at 7:25 AM Eric Bresie  wrote:

>
>
>
> On Sat, Jan 7, 2023 at 9:07 PM Will Hartung  wrote:
>
>> I have  maven javafx project. Java 17, NB 15. It's also a modular
>> application with a module-info.
>>
>
> Might want to consider updating to NB 16...I believe some of the
> functionality around some of this has improved a little bit.
>

I tried 16, and there was no change. I also tried simply closing the
project and reloading it.


>
>
>> I try to create a test for a class, and all I get is an empty class. It
>> has the JUnit imports, but no test methods. Just an empty class with an
>> empty constructor. None of the methods.\
>>
>
> Did you use  File..."New Unit Test"?  In this case then each test has to
> be manually added as desired.
>

I was using the "Create Unit Test for Class" facility.


>
> Also, I can't seem to add any of my classes to the generated class. Auto
>> complete doesn't see any of the classes, and when I compile the test, it
>> also complains it can not find the classes.
>>
>
> Have you tried any of the "hints" / "fixes" on the left gutter?
> This often times when hovered over will help with some basic fixes.
>

It simply says cannot find symbol.


>
> Maven projects tend to have additional "dependencies" listed in the
> Project explorer.  Dependencies can be added in this context or can be
> manually added in the pom.xml files
>
> Be mindful it's important to have a good build of the dependency classes;
> if there is some kind of problem compiling one of them (i.e. say a missing
> dependency), then usage of that generated class may not work until such
> time as it's been successfully built and available for use elsewhere.
>

The project (without the test) builds fine, the class I want the test for
is within the project.


>
>
>> Yet, I created a simple JavaFX project, added a test to that, and it
>> worked fine.
>>
>> I took my pom.xml from my project, and replaced the one from the simple
>> project with it, and everything worked fine.
>>
>> So, I don't know what else I could check to see why the testing does not
>> work for my project, but works for another with an identical pom file
>> (barring the project name).
>>
>
> Is the new project also a Maven project or was it originally an "Ant"
> project?  Netbeans treats these slightly differently and the project
> explorer shows different things (i.e. in "ant projects" right clicking
> allows configuring "Properties...Libraries''; with "maven projects" project
> shows "Dependencies [including a "Test Dependencies]" to be leverage (right
> clicking on the "Dependencies" here allows "Add Dependencies" which
> reflects it here and will modify the pom.xml file at the same time).
>

It's a Maven project.


>
> Also, when trying to build, see if there are any clues in the Output pane
> that may help provide some additional guidance.
>

Is just a simple syntax error:
COMPILATION ERROR :
-
pkg/MyTest.java:[17,24] cannot find symbol
  symbol:   class MyProjectClass
  location: package pkg
1 error
-

Eric Bresie
> ebre...@gmail.com
>

Thank Eric!

Regards,

WIll Hartung


Can't create test for class

2023-01-07 Thread Will Hartung
I have  maven javafx project. Java 17, NB 15. It's also a modular
application with a module-info.

I try to create a test for a class, and all I get is an empty class. It has
the JUnit imports, but no test methods. Just an empty class with an empty
constructor. None of the methods.

Also, I can't seem to add any of my classes to the generated class. Auto
complete doesn't see any of the classes, and when I compile the test, it
also complains it can not find the classes.

Yet, I created a simple JavaFX project, added a test to that, and it worked
fine.

I took my pom.xml from my project, and replaced the one from the simple
project with it, and everything worked fine.

So, I don't know what else I could check to see why the testing does not
work for my project, but works for another with an identical pom file
(barring the project name).

Thanks.

Regards,

Will Hartung


Re: Clicking on stack trace in output window

2022-11-08 Thread Will Hartung
On Tue, Nov 8, 2022 at 4:00 PM Michael Bien  wrote:

> Hi Will,
>
> is this from the output window or the "Analyze Stack" window?
>

It's the output window. Where the stack traces appear when exceptions are
printed out.

> in any case.. would be good to file a bug report since this sounds like
> a bug.
>
> I'm just kind of surprised it's not been noticed.

Regards,

Will Hartung


Clicking on stack trace in output window

2022-11-08 Thread Will Hartung
It seems that when developing code using the Java module system (i.e. using
a module-info.java), that when you get a stack trace you get lines like
this:

at FXRdf@1.0-SNAPSHOT
/bit.fxrdf.DataSetManager.getDataset(DataSetManager.java:12)

But when you click on them, it doesn't jump into the source code, like it
does with a normal project.

Is there something that's getting in the way of this? It's been doing this
for some time now.

Regards,

Will Hartung


OSGI multi-module Maven example?

2022-09-16 Thread Will Hartung
Does anyone have an OSGI multi-module Maven example?

Specifically I'm looking to a typical mutli-module maven project, where
there's a "main" project, with "libraries", which are in the submodules.

But the "libraries" are OSGI modules, and the "main" project basically uses
the modules.

I don't know what the dev lifecycle is for a Maven/OSGI project. I'd like
to just be "mvn clean install" on the parent, or just "Run" on the "main"
project.

Clearly there are several ways to deal with OSGI modules, but I'm looking
for something basic to let me move forward with OSGI participants but,
ideally, not having to shuffle a lot of things around.

Many of the OSGI basic tutorials are about loading the modules from a
framework runtime, but I'm looking to have the "main project" do that.

My fantasy is right-click -> Run, and see "hello world starting" "hello
world service activated" "Hello World!" "hello world service deactivated"
"hello world stopping".

So, if there's a "hello world" main project using a "hello world" service
that someone can point me at, that'd be great.

Regards,

Will Hartung


Why is the JavaFX JavaDoc so bad?

2022-03-25 Thread Will Hartung
Why is the JavaFX JavaDoc so bad?

I'm using Maven, JavaFX 17.0.2. I've downloaded the javadocs, I've
downloaded the sources.

But during autocomplete, it seems most of the javadoc doesn't load. Not
all, there's certainly some, but if you go into autocomplete on something
(say a TextField), most of the entries are blank.

Or, something like a simple javafx.geometry.Point2D.

If you try to do a "new Point2D", and autocomplete just gives "double d,
double d1" instead of x, y.

But if you look at the javadoc:
https://openjfx.io/javadoc/18/javafx.graphics/javafx/geometry/Point2D.html#%3Cinit%3E(double,double)

The javadoc has "x, y".

This is systemic through the JavaFX libraries. Are they being built wrong?
I mean, it's JavaDoc. We've had this since 1996...

Just curious why it's so messed up with JavaFX.

Thanks,

Will Hartung


Re: JSF CDI code assist

2021-12-09 Thread Will Hartung
On Mon, Dec 6, 2021 at 12:00 PM Jason Abreu  wrote:

> I have also created a sample web project using Ant and observe the same
> behavior.  With the new Jakarta EE, the code assist in JSP EL ("${...}")
> and JSF EL ("#{...}") does not show any of my CDI beans, only a "No
> suggestions" message.  This occurs with both Ant and Gradle projects.
> The code completion DOES work when using an older Java EE API project.
>

So if you open a legacy project, the behavior works? But with a new
project, it does not?

Have you tried "cloning" the working project to see if it works today? Can
you replicate your "SampleBean" example based on the older project? How do
the new project and the old projects differ?

And, honestly, it is a deal breaker. Otherwise you may as well be using a
"dumb" editor. Auto complete is part and parcel to the modern IDE
experience.


Re: With JDK 17, Oracle moves back to a free license

2021-09-14 Thread Will Hartung
On Tue, Sep 14, 2021 at 10:40 AM Geertjan Wielenga <
geertjan.wiele...@googlemail.com> wrote:

>
>
>-
>- “Oracle will provide these free releases and updates starting with Oracle
>JDK 17 <https://www.oracle.com/javadownload> and continue for one full
>year after the next LTS release
>
> <https://blogs.oracle.com/java/post/moving-the-jdk-to-a-two-year-lts-cadence>.
>Prior versions are not affected by this change.”
>
> How much of your software needs to run for one year only?
>

They give you a whole year to port to the new LTS!

I thought it was an interesting development. There's also apparently issues
with distributing the Oracle JDK, since lots of folks are bundling the JDK
into platform EXEs nowadays.

So, it's no panacea, but interesting.

Regards,

Will Hartung


With JDK 17, Oracle moves back to a free license

2021-09-14 Thread Will Hartung
JDK 17 is out.

And there was this interesting development.

https://blogs.oracle.com/java/post/free-java-license

Top two bullet points:

+   Oracle is making the industry leading Oracle JDK available for free,
including all quarterly security updates.  This includes commercial and
production use.

+   The new license is the "Oracle No-Fee Terms and Conditions" (NFTC)
license.  This license for the Oracle JDK permits free use for all users,
even commercial and production use.  Redistribution is permitted as long as
it is not for a fee.

So, I thought this was interesting news.

Regards,

Will Hartung


Re: Ant project not using project specific JDK

2021-09-11 Thread Will Hartung
On Sat, Sep 11, 2021 at 6:54 PM Geertjan Wielenga
 wrote:

> Best to provide complete step by step instructions for someone to
> reproduce the problem so they can help you.
>
> Gj
>

$ git clone https://github.com/oracle/visualvm.git
< set your jdk to 1.8 >
$ cd visualvm/visualvm
$ unzip nb124_platform_21062021.zip
$ ant build-zip
...
BUILD SUCCESSFUL

Launch NB 12.4

Open Project

On the root project (VisualVM) right click->Properties->Libraries->Java
Platform, set it appropriately (i.e. 1.8)
On the root project, right click->Package as->ZIP Distribution
...
/tmp/vm/visualvm/visualvm/uisupport/src/org/graalvm/visualvm/uisupport/ProfilerTabbedPane.java:52:
error: package sun.swing does not exist
import sun.swing.SwingUtilities2;
1 error

Note at the top of the build output that it's also running the same
build-zip target.

Regards,

Will Hartung


Re: Errors with a new JavaFX project on Netbeans 12.4

2021-09-06 Thread Will Hartung
On Sun, Sep 5, 2021 at 2:09 PM Scott Palmer  wrote:

>
> The easiest way to get JavaFX working smoothly is to use a JDK that has
> JavaFX modules built-in.  Azul and BellSoft provide such installs of Open
> JDK as free downloads.  They make development with JavaFX simpler, I
> recommend them.
>

That may be, but, honestly, I haven't had any real problems with the maven
projects using whatever random JDK I have been running and having it
download the dependencies maven style.

The FX projects do have a unique POM, as the projects need a special
starting sequence. For example, you can't just right click on App.java and
click Run, you have to run the project so it can do its magic.

Maybe that's different for a JDK with FX installed.

I prefer having the project and maven do the heavy lifting than require a
magic JDK.

Regards,

Will Hartung


Re: Errors with a new JavaFX project on Netbeans 12.4

2021-09-04 Thread Will Hartung
You don't want to use a generic Maven Java project.

You should use either "FXML JavaFX Maven Archetype (Gluon)" or "Simple
JavaFX Maven Archetype (Gluon)"

It takes more than simply adding dependencies to get JavaFX to work, and
these two projects tweak the pom.xml file appropriately.

Regards,

Will Hartung


On Sat, Sep 4, 2021 at 10:03 PM Zulfi Khan 
wrote:

> Hi,
>
> I am able to run: FXMLJavaFXMaven Archetype and SimpleJavaFXMavenArchetype
> provided by Natebeans 12.4. Now I created the application using following
> steps:
>
>
> File-→NewProject-→ Java with Maven and Java
> Application-→ProjectName(JavaFx2) and then I right clicked on javafx2 from
> the project list-→New-→other-→JavaFX2 (Frome categories) and File
> Types(JavaFxMain Class)-→Next-→ClassName(Fx2FXMain) and
> Package(com.mycompany.javafx2)-→finish, I got following code with full of
> red balls (i.e. errors):
>
> import javafx.application.Application;//err package not exist
>
> import javafx.event.ActionEvent;//err package not exits and so in all
> import declaration
>
> import javafx.event.EventHandler;
>
> import javafx.scene.Scene;
>
> import javafx.scene.control.Button;
>
> import javafx.scene.layout.StackPane;
>
> import javafx.stage.Stage;
>
>
> /**
>
> *
>
> * @author zulfi
>
> */
>
> public class Fx2FXMain extends Application {
>
> @Override
>
> public void start(Stage primaryStage) {
>
> Button btn = new Button();
>
> btn.setText("Say 'Hello World'");
>
> btn.setOnAction(new EventHandler() {
>
> @Override
>
> public void handle(ActionEvent event) {
>
> System.out.println("Hello World!");
>
> }
>
> });
>
> StackPane root = new StackPane();
>
> root.getChildren().add(btn);
>
> Scene scene = new Scene(root, 300, 250);
>
> primaryStage.setTitle("Hello World!");
>
> primaryStage.setScene(scene);
>
> primaryStage.show();
>
> }
>
>
> /**
>
> * @param args the command line arguments
>
> */
>
> public static void main(String[] args) {
>
> launch(args);
>
> }
>
> }
>
>
> All import instructions are giving the error, package does not exits.
> Somebody please guide me.
>
>
> Zulfi.
>
>


Re: MacOS Big Sur 12.4 won't start.

2021-08-28 Thread Will Hartung
I simply overinstalled it, and it started. So, something, somewhere got
corrupted.

It retained my plugins and such, so, all is well.

Thanks for the help!

Regards,

Will Hartung


On Fri, Aug 27, 2021 at 4:30 PM Carl Mosca  wrote:

> Might also try removing both of these:
>
> ~/Library/Application Support/NetBeans/12.4
> and
> ~/Library/Caches/NetBeans/12.4
>
> On Fri, Aug 27, 2021 at 7:25 PM Carl Mosca  wrote:
>
>> I had not installed 16 before now.  It seems to work OK.
>>
>> On Fri, Aug 27, 2021 at 6:29 PM Will Hartung 
>> wrote:
>>
>>> Ok, I tried that. I removed the 12.4 cache folder, went to the bin
>>> directory and ran netbeans directly from the terminal.
>>>
>>> it silently stops.
>>>
>>> It looks like it's trying to start with JDK 16. Does 12.4 work with JDK
>>> 16?
>>>
>>> I stuck a set -x in nbexec, and, among other things it showed this.
>>>
>>> + '[' -x /usr/libexec/java_home ']'
>>> ++ /usr/libexec/java_home --version 1.8+
>>> +
>>> jdkhome=/Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Home
>>>
>>> Thanks!
>>>
>>> On Fri, Aug 27, 2021 at 2:42 PM Carl Mosca  wrote:
>>>
>>>> You should be able to (try to) start from the command line like this:
>>>>
>>>> "/Applications/NetBeans/Apache NetBeans
>>>> 12.4.app/Contents/Resources/NetBeans/netbeans/bin/netbeans"
>>>>
>>>>
>>>> or similar.
>>>>
>>>>
>>>> but I seem to recall a log that might help as well.
>>>>
>>>>
>>>> Clearing the cache directory may be necessary. ~
>>>> /Library/Caches/NetBeans/12.4
>>>>
>>>> On Fri, Aug 27, 2021 at 5:21 PM Will Hartung 
>>>> wrote:
>>>>
>>>>> NB 12.4 won't start on MacOS Big Sur.
>>>>>
>>>>> It used to start. It used to work fine.
>>>>>
>>>>> But I click on the icon on my Dock, and it bounces once and quits.
>>>>>
>>>>> I double click the app in the Finder, it tries to launch and silently
>>>>> fails.
>>>>>
>>>>> NB 12.2 launches fine.
>>>>>
>>>>> How can I start NB, I guess from the command line, to see what it
>>>>> might be complaining about. I didn't see any new files or changes under
>>>>> /Applications, or /Library/Application Support that would suggest 
>>>>> something
>>>>> is being logged during the start up..
>>>>>
>>>>> So, I'm kind of at an impasse for the moment.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Will Hartung
>>>>>
>>>>>
>>>>
>>>> --
>>>> Carl J. Mosca
>>>>
>>>
>>
>> --
>> Carl J. Mosca
>>
>
>
> --
> Carl J. Mosca
>


Re: MacOS Big Sur 12.4 won't start.

2021-08-27 Thread Will Hartung
Ok, I tried that. I removed the 12.4 cache folder, went to the bin
directory and ran netbeans directly from the terminal.

it silently stops.

It looks like it's trying to start with JDK 16. Does 12.4 work with JDK 16?

I stuck a set -x in nbexec, and, among other things it showed this.

+ '[' -x /usr/libexec/java_home ']'
++ /usr/libexec/java_home --version 1.8+
+
jdkhome=/Library/Java/JavaVirtualMachines/adoptopenjdk-16.jdk/Contents/Home

Thanks!

On Fri, Aug 27, 2021 at 2:42 PM Carl Mosca  wrote:

> You should be able to (try to) start from the command line like this:
>
> "/Applications/NetBeans/Apache NetBeans
> 12.4.app/Contents/Resources/NetBeans/netbeans/bin/netbeans"
>
>
> or similar.
>
>
> but I seem to recall a log that might help as well.
>
>
> Clearing the cache directory may be necessary. ~
> /Library/Caches/NetBeans/12.4
>
> On Fri, Aug 27, 2021 at 5:21 PM Will Hartung 
> wrote:
>
>> NB 12.4 won't start on MacOS Big Sur.
>>
>> It used to start. It used to work fine.
>>
>> But I click on the icon on my Dock, and it bounces once and quits.
>>
>> I double click the app in the Finder, it tries to launch and silently
>> fails.
>>
>> NB 12.2 launches fine.
>>
>> How can I start NB, I guess from the command line, to see what it might
>> be complaining about. I didn't see any new files or changes under
>> /Applications, or /Library/Application Support that would suggest something
>> is being logged during the start up..
>>
>> So, I'm kind of at an impasse for the moment.
>>
>> Thanks,
>>
>> Will Hartung
>>
>>
>
> --
> Carl J. Mosca
>


MacOS Big Sur 12.4 won't start.

2021-08-27 Thread Will Hartung
NB 12.4 won't start on MacOS Big Sur.

It used to start. It used to work fine.

But I click on the icon on my Dock, and it bounces once and quits.

I double click the app in the Finder, it tries to launch and silently fails.

NB 12.2 launches fine.

How can I start NB, I guess from the command line, to see what it might be
complaining about. I didn't see any new files or changes under
/Applications, or /Library/Application Support that would suggest something
is being logged during the start up..

So, I'm kind of at an impasse for the moment.

Thanks,

Will Hartung


Re: Simple C/C++ project not working NB 12.4 Mac Big Sur

2021-08-14 Thread Will Hartung
Yea, that did not work, thank you though.

I figured it was some kind of pseudo terminal thing, while I can make in
terminal window, I can't debug anything.

Thanks though.

Regards,

Will Hartung


On Sat, Aug 14, 2021 at 10:37 AM Валера Солдатов 
wrote:

> Hm. 'pty' is some internal terminal. Usually this error appears on
> unknown platforms on "run" step. In your case you see error on "build"
> or "clean" step. Anyway. Can you try to change Run|Console Type property
> in Project Properties window? 'Standard Output' is better choice I
> think. Sorry If my answerdoesn't fix your build.
>
> 14.08.2021 19:30, Will Hartung пишет:
> > I have the C/C++ plugin, it says "Version 1.3".
> >
> > I have XCode installed. I can type 'gcc' on the command line, and it
> > "works" (it's a front for clang on MacOS).
> >
> > I create a simple C/C++ Application with a main.c, try to build/run
> >
> > And i get
> >
> > cd '/Users/will/projects/Cache64'
> > /usr/bin/make -f Makefile CONF=Debug clean
> > Cannot run program
> >
> "/private/var/folders/0s/kxxky8ls5zj8m2w99btrf9jmgn/T/dlight_will/a317ce3a/201916055/pty":
>
> > error=2, No such file or directory
> >
> > If I cd to the folder, and just type "make", it seems to work.
> >
> > If I type:
> >
> > /usr/bin/make -f Makefile CONF=Debug clean
> >
> > It works as well.
> >
> > So, kind of at an impasse here.
> >
> > Tips appreciated.
> >
> > Thanks!
> >
> > Regards,
> >
> > Will Hartung
> >
>
>


Simple C/C++ project not working NB 12.4 Mac Big Sur

2021-08-14 Thread Will Hartung
I have the C/C++ plugin, it says "Version 1.3".

I have XCode installed. I can type 'gcc' on the command line, and it
"works" (it's a front for clang on MacOS).

I create a simple C/C++ Application with a main.c, try to build/run

And i get

cd '/Users/will/projects/Cache64'
/usr/bin/make -f Makefile CONF=Debug clean
Cannot run program
"/private/var/folders/0s/kxxky8ls5zj8m2w99btrf9jmgn/T/dlight_will/a317ce3a/201916055/pty":
error=2, No such file or directory

If I cd to the folder, and just type "make", it seems to work.

If I type:

/usr/bin/make -f Makefile CONF=Debug clean

It works as well.

So, kind of at an impasse here.

Tips appreciated.

Thanks!

Regards,

Will Hartung


Re: Netbeans 11.3 enterprise application

2021-08-10 Thread Will Hartung
But don't we already have that issue with the code generators and other
tech plugins that we do maintain?

On Tue, Aug 10, 2021 at 8:09 AM Geertjan Wielenga <
geertjan.wiele...@googlemail.com> wrote:

>
> That would create different problems — if we’d host our own archetypes,
> we’d have to maintain them too and keep them in sync with their underlying
> technologies and best practices.
>
> Gj
>
> On Tue, 10 Aug 2021 at 17:06, Will Hartung  wrote:
>
>> The shame for this is that the reason it's broken is not, per se, "NBs"
>> fault.
>>
>> The issue is that the maven archetypes it originally relied on are now
>> gone and unsupported when the hosting site up and vanished.
>>
>> There's no real magic here, it's just a maven project. But the external
>> dependency rotted away and was never in NBs control in the first place.
>>
>> And I never got a clear answer on where or how NB could host maven
>> archetypes published to the public repository.
>>
>> Regards,
>>
>> Will Hartung
>>
>>
>> On Tue, Aug 10, 2021 at 5:26 AM Geertjan Wielenga
>>  wrote:
>>
>>> There's a difference in having project wizards (we can simply hide them)
>>> and having functionality for maintaining existing applications (we can keep
>>> that).
>>>
>>> Gj
>>>
>>> On Tue, Aug 10, 2021 at 2:23 PM Gregor Kovač  wrote:
>>>
>>>> Hi!
>>>>
>>>> Please don't remove it. I have an JEE 6 app (with EARs and WARs) I
>>>> still have to maintain.
>>>>
>>>> Best regards,
>>>>
>>>> Gregor
>>>> Tom Coudyzer je 10. 08. 21 ob 13:30 napisal:
>>>>
>>>> ;-) agree
>>>>
>>>> /Tom
>>>>
>>>> On 10 Aug 2021, at 11:33, Geertjan Wielenga
>>>>  
>>>> wrote:
>>>>
>>>> 
>>>> Probably the support for Java EE applications should be removed, or
>>>> made available as an external plugin since, as pointed out above, the
>>>> applicable approach nowadays is to use WARs and REST calls.
>>>>
>>>> So, rather than it being strange that this doesn't work out of the box,
>>>> it is strange that it is in the box at all. :-)
>>>>
>>>> Gj
>>>>
>>>> On Tue, Aug 10, 2021 at 11:17 AM Tom Coudyzer 
>>>> wrote:
>>>>
>>>>> Thanks Pieter!
>>>>>
>>>>> I agree it’s odd the not working out of the box behaviour doesn’t help
>>>>> to onboard people to start using Netbeans. However I don’t know if usage
>>>>> increase of Netbeans is one of the goals of the project. I am too new in
>>>>> the Netbeans world to have a valid opinion.
>>>>>
>>>>> Thanks again.
>>>>>
>>>>> /Tom
>>>>>
>>>>> Sent from my iPad
>>>>>
>>>>> On 9 Aug 2021, at 22:54, Pieter van den Hombergh <
>>>>> pieter.van.den.hombe...@gmail.com> wrote:
>>>>>
>>>>> 
>>>>> I have build with maven, so independent of an IDE.
>>>>> I needed to change the package format of the ejb module to jar,
>>>>> Then building in the order ejb, web, top project and ear did result in
>>>>> an war file, which should be loadable in a web container like payara.
>>>>>
>>>>> steps I did (after the edit)
>>>>>  cd .../myproject
>>>>>  mvn install
>>>>>  cd myproject-ejb/
>>>>>  mvn install
>>>>>  cd ../myproject-web/
>>>>>  mvn install
>>>>>  cd ../myproject-ear/
>>>>>  mvn package
>>>>>  dir target/myproject-ear.war
>>>>> I would advise using a maven multimodule structure, using a parent
>>>>> pom. That would avoid having to do all these manual steps.
>>>>>
>>>>> But since the project is what the netbeans wizard (even the 12.4 one)
>>>>> produces, it is a bit odd that it does not work out of the box.
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Aug 3, 2021 at 12:15 PM Tom Coudyzer 
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Seeking for some help on creating an Enterprise application  (with
>>>>>> Maven) via Netbeans 11.3 a

Re: Netbeans 11.3 enterprise application

2021-08-10 Thread Will Hartung
The shame for this is that the reason it's broken is not, per se, "NBs"
fault.

The issue is that the maven archetypes it originally relied on are now gone
and unsupported when the hosting site up and vanished.

There's no real magic here, it's just a maven project. But the external
dependency rotted away and was never in NBs control in the first place.

And I never got a clear answer on where or how NB could host maven
archetypes published to the public repository.

Regards,

Will Hartung


On Tue, Aug 10, 2021 at 5:26 AM Geertjan Wielenga
 wrote:

> There's a difference in having project wizards (we can simply hide them)
> and having functionality for maintaining existing applications (we can keep
> that).
>
> Gj
>
> On Tue, Aug 10, 2021 at 2:23 PM Gregor Kovač  wrote:
>
>> Hi!
>>
>> Please don't remove it. I have an JEE 6 app (with EARs and WARs) I still
>> have to maintain.
>>
>> Best regards,
>>
>> Gregor
>> Tom Coudyzer je 10. 08. 21 ob 13:30 napisal:
>>
>> ;-) agree
>>
>> /Tom
>>
>> On 10 Aug 2021, at 11:33, Geertjan Wielenga
>>  
>> wrote:
>>
>> 
>> Probably the support for Java EE applications should be removed, or made
>> available as an external plugin since, as pointed out above, the
>> applicable approach nowadays is to use WARs and REST calls.
>>
>> So, rather than it being strange that this doesn't work out of the box,
>> it is strange that it is in the box at all. :-)
>>
>> Gj
>>
>> On Tue, Aug 10, 2021 at 11:17 AM Tom Coudyzer  wrote:
>>
>>> Thanks Pieter!
>>>
>>> I agree it’s odd the not working out of the box behaviour doesn’t help
>>> to onboard people to start using Netbeans. However I don’t know if usage
>>> increase of Netbeans is one of the goals of the project. I am too new in
>>> the Netbeans world to have a valid opinion.
>>>
>>> Thanks again.
>>>
>>> /Tom
>>>
>>> Sent from my iPad
>>>
>>> On 9 Aug 2021, at 22:54, Pieter van den Hombergh <
>>> pieter.van.den.hombe...@gmail.com> wrote:
>>>
>>> 
>>> I have build with maven, so independent of an IDE.
>>> I needed to change the package format of the ejb module to jar,
>>> Then building in the order ejb, web, top project and ear did result in
>>> an war file, which should be loadable in a web container like payara.
>>>
>>> steps I did (after the edit)
>>>  cd .../myproject
>>>  mvn install
>>>  cd myproject-ejb/
>>>  mvn install
>>>  cd ../myproject-web/
>>>  mvn install
>>>  cd ../myproject-ear/
>>>  mvn package
>>>  dir target/myproject-ear.war
>>> I would advise using a maven multimodule structure, using a parent pom.
>>> That would avoid having to do all these manual steps.
>>>
>>> But since the project is what the netbeans wizard (even the 12.4 one)
>>> produces, it is a bit odd that it does not work out of the box.
>>>
>>>
>>>
>>> On Tue, Aug 3, 2021 at 12:15 PM Tom Coudyzer  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
>>>>
>>>
>>>
>>> --
>>> Pieter Van den Hombergh.
>>> No software documentation is complete with out it's source code.
>>>
>>> --
>> -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
>> |  In A World Without Fences Who Needs Gates?  |
>> |  Experience Linux.   |
>> -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
>>
>>


Re: Netbeans 11.3 enterprise application

2021-08-07 Thread Will Hartung
For the bulk of what folks do today Geertjan is right. Simply create a WAR.

WARs can host JAX-RS end points, run JSP and JSF, host SessionBeans, JPA
Entities, etc. If you're not using Message Beans, or Timers, or a select
few other things made manifest in an actual EAR application, simply create
a WAR file and move forward.

On Sat, Aug 7, 2021 at 12:03 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  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: (Java) Remote debugging (and breakpoints) of App server internals

2021-07-25 Thread Will Hartung
On Fri, Jul 23, 2021 at 4:29 PM Stephan van Beerschoten <
step...@vanbeerschoten.net> wrote:

> Hi there, how would I go about setting breakpoints in server side modules
> that are part of my App server? I'm using WildFly, but the same would be
> true for any of them I guess.
>
> I can set breakpoints in my own code that work just fine, but I need to
> get a breakpoint in the internal apache-cxf engine of my App server to
> troubleshoot an issue I have.
>

Find the appropriate version of the library your server is using, grab its
source code, and set breakpoints. With Maven, you (might) be able to
download the source attached to the library from the repository. In that
case, you can set breakpoints within that source code.

If you do download the source code, you don't have to worry about any
project structure. You can just create a new project, and drag the source
into it. You don't need to build it, just need to make the IDE aware of it.

The real game is making sure the versions match, that can't take some
digging to find out what version your server is using.

It helps if you can build the server from source, but even that only goes
so far. In your case, WIldfly doesn't build the Apache CXF stuff, it just
imports it. But at least by looking at the server source, you can ideally
ascertain the correct dependency that they're using.

Regards,

Will Hartung


Re: Jsf replacement

2021-06-28 Thread Will Hartung
On Sun, Jun 27, 2021 at 12:36 PM Som Lima  wrote:

> Is Java Server Pages being pushed  back and replaced with another
> technology   ?
>

No.

There was chatter of adding an MVC style action framework to the JEE
standard, but I believe that has stalled. The call for those kinds of
frameworks has diminished greatly with modern web technologies.

JSF is still going strong, however. It's really crazy powerful. The generic
web components view of it just scratches the surface.

Regards,

Will Hartung


Re: ^H not working for Replace function on MacOS

2021-06-08 Thread Will Hartung
On Tue, Jun 8, 2021 at 11:21 AM Geertjan Wielenga <
geertjan.wiele...@googlemail.com> wrote:

>
> Can we start by seeing if it works for you after changing the keymapping,
> and then investigate further from there?
>

Yes, that works.

Curiously when I go to the shortcut field, I hold down CTRL and H and it
appears as CTRL+BACKSPACE (which overrides "remove surrounding code", which
I can't find on a menu anywhere).

It does not show up as CTRL+H.

Mind, I wrote a simple Swing app and added a KeyListener to a control, and
it seems to be showing CTRL and H, not BACKSPACE. So I don't think it's a
Mac Java thing, plus it works with a raw 12.4.

So, odd all around.

Thanks!

Regard,

Will Hartung


Re: ^H not working for Replace function on MacOS

2021-06-08 Thread Will Hartung
On Tue, Jun 8, 2021 at 10:03 AM Geertjan Wielenga <
geertjan.wiele...@googlemail.com> wrote:

> You could map it to a different key combination?
>

Of course I could, but that's not the question.

Something Changed from a clean 12.4 and whatever my current settings are,
and are not restored via a "reset to defaults", and I don't see anything
that says it changed. So, how do you think that might happen? And where
would that change manifest?

Regards,

Will Hartung


^H not working for Replace function on MacOS

2021-06-08 Thread Will Hartung
This is not new, it's been sort of plaguing me for some time, across NB
versions, across OSes.

Simply, Ctrl-H does not work for the Search/Replace function.

I press Ctrl-H and I just get a beep.

I have my Caps Lock key bound as my Ctrl Key, but that's not it as all of
the other Ctrl combinations work (NB shouldn't be able to detect that
anyway).

I don't know what makes ^H special in this case, or where I can look to fix
it.

It may very well be local to my configuration. I think it used to work on
my office mac, but it's not working on this one, or my previous one.

And I have no idea where to look to figure out what's going on.

If I remove the Application Support/Netbeans/12.4 folder, the IDE starts,
asks to import 12.2, and I say no. ^H works then.

I went to Preferences->Keymap->Manage Profiles->Netbeans->Reset Defaults,
and that didn't fix it either.

I tried exporting the Keymap, but nothing shows up there either.

Any suggestions?

Regards,

Will Hartung


Re: Failing at updating Netbeans to 12.4 on a Mac

2021-06-03 Thread Will Hartung
The new version will import a lot of the settings from the old version, so
it's sort of a self updating thing.

On Thu, Jun 3, 2021 at 7:30 PM Geertjan Wielenga
 wrote:

> You always need to install new versions from scratch. Download the
> installer for 12.4 and run it from scratch.
>
> Gj
>
> On Fri, 4 Jun 2021 at 03:36, Andreas Reichel <
> andr...@manticore-projects.com> wrote:
>
>> But this does not work on Linux with 12.3 either:
>>
>>
>> Best regards
>> Andreas
>>
>> On Thu, 2021-06-03 at 21:34 -0400, Carl Mosca wrote:
>>
>> Yes the new version should be installed.
>>
>> On Thu, Jun 3, 2021 at 9:32 PM Chris Olsen  wrote:
>>
>> Hello, Everyone --
>>
>>   I currently am running Netbeans 11.3 on a relatively old Mac.  I tried
>> to update ( = "Check for updates) but it failed.
>>
>>   a)  Should it, in a just world, have worked?
>>
>>   b)  Should I just not care, uninstall 11.3 and install 12.4?
>>
>>   I am NOT a Mac person and  messing this up would engender LOTS of
>> head-scratching on my part...
>>
>>   Thanks in advance!
>>
>>   -- Chris
>>
>> -
>> 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
>>
>>
>>


Servers not imported

2021-05-21 Thread Will Hartung
I haven't been paying attention much in the past.

Just used the macOS installed for 12.4, did the "import settings from 12.2"
thing, and the Servers did not get imported.

Is that a known issue?

Regards,

Will Hartung


Re: Should I install nb-javac plugin?

2021-05-21 Thread Will Hartung
Wait a minute, nb-javac is optional? I thought it was a Really Nice Thing,
but we have to jump through the hoops for it because of the licensing.

We don't need nb-javac?


Re: Too many open gradle files

2021-05-10 Thread Will Hartung
Awesome, thanks!

On Sun, May 9, 2021 at 11:48 PM Laszlo Kishalmi 
wrote:

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


Too many open gradle files

2021-05-09 Thread Will Hartung
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


Re: hashCode: same every run?

2021-05-06 Thread Will Hartung
That loophole about different values from run to run is solely for the
default implementation of hashcode, which is based on the actual internal
implementation of the instance.

Consider:

class MyClass {

int val = 1;

public MyClass() {
}
}

MyClass c1 = new MyClass();
MyClass c2 = new MyClass();

System.out.println("c1 hc = " + c1.hashCode());
System.out.println("c2 hc = " + c2.hashCode());
System.out.println("c1 == c2 " + (c1 == c2));
System.out.println("c1 eq c2 " + (c1.equals(c2)));

c1 hc = 401424608
c2 hc = 2101440631
c1 == c2 false
c1 eq c2 false

By most accounts, these two instances (c1 and c2) are "equal". They both
have the same internal state (but are not the same object, == fails as it
should). But the default JVM equals implementation does not check the
internal state of the object.

As long as this process is running, c1 will retain it's hash code, and so
will c2. But if you run it again, there is no guarantee that these values
will be the same, just consistent within the specific executable.

But, this is not how hashCode and equals are implemented in the real world.
By default the JVM does not "properly" implement hashCode and equals. I
mean, arguably, it's accurate: here are two instances that not not "equal",
thus they don't have the same hash code. By that aspect of the contract,
it's fine. It's just not very useful, and thus requires all classes having
to implement their own versions of equals and hashCode.

Since the classes inevitably dictate the behavior of equals and hashCode,
they can "guarantee" that the values returned transcend the execution state.

You can analyze the hashCode implementation for String and discern whether
the value may change from run to run (it won't, but you can at least
check). You can discern this from any class that implements equals and
hashCode. So, for 99.99% of the use cases of hashCode, changing values
from run to run is not an issue, and is under the developers control. The
docs simply say it can because the default implementations of hashCode do
that. The default implementation of hashCode isn't particularly useful for
most use cases.

Regards,

Will Hartung


Re: Maven EJB project creates all modules as WAR files

2021-04-22 Thread Will Hartung
On Thu, Apr 22, 2021 at 7:36 AM Wayne Gemmell | Connect <
wa...@connect-mobile.co.za> wrote:

> Hi Will
>
> Thanks for the feedback. I've changed my app to be a war. It was
> surprisingly easy. What should I watch out for in terms of changes?
> I presumy my timer beans will have to be replaced by cron jobs. Is there
> anything else that may sneak up on me. I'm starting testing at the moment.
>

Yes, timer beans are another thing.

IMHO, Timer beans are "OK", but I've had more issues with them than not
over the years, particularly in a clustered/load balanced environment. Most
timer beans are not just singletons, but cluster wide singletons. So
there's hoop jumping involved to handle that.

The idea of a cron job is sound. Today, I would just use a cron job to
tickle a simple web service trigger to start the job. This has the
advantage that in a load balanced environment, you point this to the
frontend load balancer, and any one of the backends handles the job. This
solves the problem of not having to worry about which machine controls the
timer beans, having to orchestrate which ones are doing what, prevents
having the master node problem of "we'll run timer beans on node 1", which
is fine until node 1 is down for some reason.

The dark side of cron jobs is that they will run whether the previous job
has completed or not. Not a problem for a report that runs at 2am, but can
be a problem for something that runs every 1 minute, or 5 minutes. Also,
cron only has 1m resolution.

So, that's a concern as well. All of these have issues, you just have to
pick what fits you best.

Best part about a URL triggered job is if something goes awry, you can just
kick off the job manually. Harder to do that with timer beans.

You can also look into the Quartz library, it's a java based package that
can do cron like things, if that's of interest. (Cron is still probably a
better idea, because it's so easy to configure vs restarting an app.)

Other than that, if you're not using those EJB artifacts, like MDBs, JCA,
Timers, it should go well. I've never used the new Batch facility, I don't
know where it lives.

A single WAR certainly can simplify things.

Regards,

Will Hartung


Re: removing the "new project" support for Ant projects

2021-04-21 Thread Will Hartung
On Tue, Apr 20, 2021 at 11:43 PM Thomas Kellerer  wrote:

> Another +1 for NOT removing Ant support.
>

Nobody is talking about removing Ant support completely.

As far as the "New Project" dialog is concerned:
>
> What about creating a new category "Other" (or maybe even "Legacy") that
> in turn contains the "Java with Ant" category to make the "Ant option" less
> prominent.
>

My singular issue with this is that it simply implies that they're going to
leave stuff that "doesn't work", that they/we know "doesn't work", and have
no intentions to fix it. Having broken stuff shipped with the IDE doesn't
provide value, IMHO.

If there were actual maintainers for these, it would be less of an issue. I
can't speak for anyone else, I imagine maintaining these aren't arduous,
but they do involve ramp up time on the IDE and such. They're likely not a
quick fix. For someone familiar with the NB side of it, yea, they are all
likely pretty minor. But getting to that level is likely not quick, and
those that may have that expertise are focusing on the more difficult parts
of the IDE.

Regards,

Will Hartung


Re: removing the "new project" support for Ant projects

2021-04-21 Thread Will Hartung
 a lightweight docking library (pure Java, no outside dependencies). I am
> hoping that the legacy projects built on the SAF will then be able to be
> successfully ported off of the Ant build system and into the Maven realm...
>
Honestly, this is a great opportunity to delve a bit deeper into Maven.
Simply, if you plan on breathing a little life into SAF, publishing it as a
Maven artifact to Maven Central opens it up to an astonishing number of
developers. Do not discount how easy it is for folks to fire up "hello
world" projects using Maven.

Regards,

Will Hartung


Re: removing the "new project" support for Ant projects

2021-04-20 Thread Will Hartung
> person who gathered shared libraries from various locations and manually
> linked them to your application, so that your application would work
> properly. I do not shun all advances in technology, but when something is
> as stable and useful as Ant, I just don't get why some people just want it
> gone. I use automation systems whenever they make sense for me. A lot of
> things, I would rather take care of myself so that I can be sure the stuff
> is the way I planned it and want it. Old school, I know, but I am who I
> am...
>
We worked with NB ant builds and libraries for many years, but it was
better for the team when we switched to Maven. The value it brought far
outweighed the costs of adoption and continued use. For my personal
projects, I still use it. Even if every now and then, I shake my fist at
it, like anything else today.

Regards,

Will Hartung


Fwd: Delivery Status Notification (Failure)

2021-04-20 Thread Will Hartung
-- Forwarded message -
From: Mail Delivery Subsystem 
Date: Tue, Apr 20, 2021 at 1:33 PM
Subject: Delivery Status Notification (Failure)
To: 


[image: Error Icon]
Address not found
Your message wasn't delivered to *geertjan.wiele...@googlemail.com.invalid*
because the domain googlemail.com.invalid couldn't be found. Check for
typos or unnecessary spaces and try again.
The response was:

DNS Error: 4858257 DNS type 'mx' lookup of googlemail.com.invalid responded
with code NXDOMAIN Domain name not found: googlemail.com.invalid



-- Forwarded message --
From: Will Hartung 
To: Geertjan Wielenga 
Cc:
Bcc:
Date: Tue, 20 Apr 2021 13:33:34 -0700
Subject: Re: removing the "new project" support for Ant projects


On Tue, Apr 20, 2021 at 12:33 PM Geertjan Wielenga
 wrote:

> No one is suggesting removing support for Ant altogether.
>
> The suggestion is to remove the possibility of creating new Ant projects.
>

And to be fair, the problem is not with Ant per se. The problem is simply
that the Ant projects and wizards within the IDE are not being supported.
And that lack of support leads to bad experiences, especially with new
users. And by new users, I mean folks new to Java, new to NB, or just new
to whatever tech they want to try ("Gee, what's it like writing a web
service?").

I have nothing against Ant, I don't like the bad experiences in precisely
the place where a bad experience can be quite disrupting -- first contact
with the IDE.

As the paraphrase goes: "Patches welcome". If someone would like to chime
in, step up, and audit and update the Ant projects, then the door is wide
open.

But having them linger in limbo just isn't satisfactory to me, but I don't
think someone would want me (or anyone) to just make a pull request yanking
them out.

Regards,

Will Hartung


Re: removing the "new project" support for Ant projects

2021-04-20 Thread Will Hartung
On Tue, Apr 20, 2021 at 10:10 AM Lisa Ruby 
wrote:

> For those of you who have used Maven for a long time it may seem simple
> and straightforward, but for those of us who haven't it's not. I've
> struggled to try and understand it and figure out how to use it for my
> software project and gave up. And it's a huge amount of overhead, extra
> disk space usage, and more bits and pieces to keep track of that isn't
> justifiable for small simple projects. ANT works just fine for me, and I
> will keep using it for as long as I possibly can. I need to focus my time
> on getting my software out, not on the tools I have to use to do it.
>

There are several issues, depending on your project.

If you have a "simple" Ant project, it's mostly a matter of copying your
code over, resolving the dependencies (i.e. correlating the libraries you
use to the ones in the repository), and building.

The singular "huge" amount of overhead for Maven is the large index that's
routinely downloaded from Maven Central, cataloging all of the available
libraries. It's a large download that's uncompressed on the file system (>
1GB).

Outside of that, Maven is lightweight.

Ant is faster, to be sure, but Maven is "fast enough" for most cases.

For complicated projects, anything goes. Maven is a declarative system.
"This is what I want done" vs Ants imperative system "This is what I want
to do". There is an absolute paradigm mismatch between the two, but that
does not mean it's not reconcilable.

The other side of the coin is that, technically, this isn't the place for
converting Ant to Maven. That's a "Ant" problem or "Maven" problem, not
necessarily an IDE problem.

That said, perhaps we could get a write up on someone going through the
process on some of the common NB Ant projects to show how it's done. An
automated system would likely be more complicated and less effective than a
list of steps and heuristics that someone can go through. No ideal, to be
sure.

If you'd like to contact me directly with specifics about your project,
maybe I can help you prototype a project transition.

That said, as I mentioned in the other thread, I don't think that NB should
give up legacy support of such projects, just perhaps deprecating the "new
projects".

Regards,

Will Hartung


Re: Maven EJB project creates all modules as WAR files

2021-04-20 Thread Will Hartung
On Mon, Apr 19, 2021 at 12:55 AM Wayne Gemmell | Connect <
wa...@connect-mobile.co.za> wrote:

> Is the perception that nobody does Maven EAR's anymore or that nobody uses
> EARs? I have a web app that has given me no shortage of issuse with ant.
> I'm trying to move it to Maven. If nobody is using maven then I need to
> move to something else. If nobody is using EAR's anymore then I'm pretty
> stuck figuring out this Maven issue.
>

Well, it's several things.

EARs are less popular because their necessity has been greatly reduced.
Session beans can be placed in WARs now, so for many use cases, a WAR is
completely adequate to the task.

However, it's not suitable for all use cases.

Notably, MDBs can not be deployed in WARs. But only as an EJB either
deployed standalone, or bundled within an EAR.

With the hue and cry over micro services and "down with the monolith", just
the idea of a large application bundled in a EAR is falling out of favor.

Also, there's a history of advocacy underlying this. Sun used NetBeans as a
mechanism to advocate for Java and Java EE. It behooved them to have
something like NetBeans to make Java EE development easier. So, it was
important for NetBeans to have really first class Java EE support. Bundling
the Java EE wizards and templates along with Glassfish all helped promote
that.

Of course, now, with the great Java Diaspora out of Oracle, the goals and
drivers are different.

For your project, if all you have is a web app and some session beans, then
a simple WAR file is good to go. The Ant projects seem to essentially be
deprecated now, so I would not rely on those for anything. If practical,
especially if your project is young, I would migrate it to Maven. The Maven
WAR is a pretty simple project and seems to work ok. Maven isn't going away
any time soon, Gradle, it's primary competitor, doesn't really have the
traction to overcome it yet, and it's been going for some time. If nothing
else, the pom.xml file has become a de facto portable project format if,
for nothing else, to capture dependencies.

Honestly, I think NB should have an internal conversation about removing
the "new project" support for Ant projects, while still being able to open
existing ones. It just confuses a lot of people if they're not going to be
supported.

And I still haven't heard any concrete position the project has on
internalizing Maven archetypes used for project wizards, or the process of
adopting that.

Legacy archetypes that used to work in NB 8 are now failing because they've
vanished from Maven central. So, an external dependency broke an internal
feature.

Feel free to follow up with specific questions about getting your project
to work and/or converted to Maven.

Regards,

Will Hartung


Re: Maven EJB project creates all modules as WAR files

2021-04-16 Thread Will Hartung
On Fri, Apr 16, 2021 at 5:26 AM Tomáš Procházka  wrote:

> If there is any specific text in dialog related to this function, you
> can try to search it on Github.
> That should lead you near related code.
>
> Tom
>

It's not that simple.

There is an EJB project wizard that takes parameters to discern which
modules to create. This is for the EAR with EJB and/or WAR module. It
creates a master project along with up to 3 sub-projects (EAR, EJB, WAR).

These are based on maven prototypes, but the person that went through and
made everything wars, just stomped on this workflow when trying to upgrade
to the more recent versions. Honestly, it was really egregious.

Also, Netbeans does not "own" the maven prototypes used for the projects.
They're hosted someplace completely different. The originals are hosted
someplace that I don't think exists any more. Codehaus I think. The WAR
ones are hosted on someone's github.

And by "hosted", I mean that the prototypes are registered with Maven
Central, but the source code to them is not part of the NB source code.
When I asked before, nobody really chimed in on whether NB can/should host
these prototypes (I think they should), or how the build servers are or can
be accomodated to post the artifacts to Maven Central (where they must be,
or at least hosted in some Maven repo that NB "knows" about in order to
generate these).

I should also say this is for the Maven based projects, I have not looked
at the Ant ones in some time. The maven ones are just a wreck.

And, yea, when this was last broached it was sort of a "nobody does this
any more", so I backed out as well.

Regards,

Will Hartung


Stack trace not highlighting and clickable

2021-04-06 Thread Will Hartung
I honestly haven't tried this with anything else.

But in my JavaFX project, when I get stack traces in the Output window, I
can't click on the lines to jump to the code in the IDE.

I seem to recall being able to do this before.

The stack traces are just plain text now.

Am I mistaken?

Thanks.

Regards,

Will Hartung


Adding jar to java modules maven project

2021-03-11 Thread Will Hartung
Working with a JDK 11 project that uses module-info, how do I add a
dependency that's not modularized? That's just a plain, legacy jar?

If I simply add the dependency, auto complete can't see it, fix imports
can't see it, etc.

So how is that done?

Thanks,

Will Hartung


Tying File Type/TopComponent in to IDE

2021-01-19 Thread Will Hartung
I have a custom file type, created with the wizard.

I do not want the text editor associated with it. I just want a GUI. I've
been playing with this off and on for some time now.

My DataObject has its own DataNode with createNodeDelegate and TopComponent.

The DataNode inserts OpenCookie into the lookup.

In the end, this seems to work. The file type appears with the proper icon
in the Favorite window, I can double click and the gui opens, it marshals
my data, and I can open different ones at the same time. If I open the same
node again, it returns the original window.

However, from the file type wizard, my DataObject has several action
reference annotations

With this it has references to: Open, Cut, Copy, Delete, Rename,
SaveAsTemplate, among others, all referring to the openide actions, such as
org.openide.actions.OpenAction.

However, when realized, none of these manifest in the IDE. When I open the
file, the EDIT menu does not appear in the main menu, the right click menu
is nothing but Open, the toolbar is mostly blank.

I have a simple button that put a Savable in to the lookup from teh
TopCompont, but that seems to do nothing. In fact, there's not "save" or
action at all.

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
  Savable s = new Savable() {
@Override
public void save() throws IOException {
System.out.println("Saving " +
getLookup().lookup(PersonaDataObject.class));
}
};
ic.add(s);  //InstanceContent of TopComponent done in constructor
with  associateLookup(new AbstractLookup(ic));

}

How do I tie this together to get these default IDE actions into my File
Type.

I have tried this with calling the registerEditor method, and not calling
it. The annotations are there to build up the layer.xml file, as I
understand it. I was thinking maybe I was stomping on the lookup with
DataNode when I added the OpenCookie.

private PersonaDataNode(final PersonaDataObject obj, InstanceContent
ic) {
super(obj, Children.LEAF, new AbstractLookup(ic));
ic.add(new OpenCookie() {
@Override
public void open() {
TopComponent tc = findTopComponent(obj);
if (tc == null) {
tc = new PersonaTopComponent(obj);
tc.open();
}
tc.requestActive();
}
});
}

But this code seems idiomatic to me.

I have most of the Netbeans books, but they don't explicitly address this.

There is some magic somewhere that I'm missing, I feel.

Thanks,

Will Hartung


Updating text file in MultiView

2021-01-17 Thread Will Hartung
I have a XMLMultiView from the generic New File Type wizard.

I'm creating the GUI form for the XML file.

How do I keep the XML file up to date after I make changes in the GUI?

Do I need to create a Saveable and put it in the lookup to mark it as
"dirty", or will that happen automatically when the XML file is updated?

Can I update the XML file only when the tabs are switched vs for every
change? In that case, I would have to add a Saveable since the XML may not
have changed yet.

Anyway, how does that workflow all work out?

Regards,

Will Hartung


Re: XML in Netbeans Module

2021-01-16 Thread Will Hartung
On Sat, Jan 16, 2021 at 3:40 PM Mark A. Flacy 
wrote:

> Greetings,
>
> Netbeans itself uses tons of XML internally; I've gotten away with just
> importing xml-apis:xml-apis.  It probably matters what you are trying to
> do,
> of course.
>

Can you be more specific?

I'm using JAXB for Marshalling/Unmarshallng.

For OSGI dependencies, that's in the nbm-maven-plugin's configuration block.
>

This worked for me. This is notably for just a unit test, so I'm not sure
how much of the Module infrastructure is spooled up for this.

For the moment it seems to be working, hopefully I'll be running the module
itself soon to see what happens.

Thanks.

Regards,

Will Hartung


> --
> Mark A. Flacy
> mfl...@verizon.net
>
> On Saturday, January 16, 2021 1:38:23 PM CST Will Hartung wrote:
> > I have a simple Maven NB module project, with Java 11, and I need to use
> > XML.
> >
> > I have these dependencies:
> > 
> > com.sun.activation
> > javax.activation
> > 1.2.0
> > 
> > 
> > javax.xml.bind
> > jaxb-api
> > 2.3.0
> > 
> > 
> > org.glassfish.jaxb
> > jaxb-runtime
> > 2.3.0
> > 
> >
> > During build, I get:
> >
> > ==
> > NBM Plugin generates manifest
> > Adding on module's Class-Path:
> > javax.annotation:jsr250-api:jar:1.0
> > org.glassfish.jaxb:jaxb-runtime:jar:2.3.0
> > org.glassfish.jaxb:jaxb-core:jar:2.3.0
> > org.glassfish.jaxb:txw2:jar:2.3.0
> > Adding OSGi bundle dependency - com.sun.activation:javax.activation
> > Adding OSGi bundle dependency - javax.xml.bind:jaxb-api
> > Project uses classes from transitive OSGi bundle
> > com.sun.istack:istack-commons-runtime:jar:3.0.5 which will not be
> > accessible at runtime.
> > To fix the problem, add this module as direct dependency. For OSGi
> > bundles that are supposed to be wrapped in NetBeans modules, use the
> > useOSGiDependencies=false parameter
> > Project uses classes from transitive OSGi bundle
> > org.jvnet.staxex:stax-ex:jar:1.7.8 which will not be accessible at
> runtime.
> > To fix the problem, add this module as direct dependency. For OSGi
> > bundles that are supposed to be wrapped in NetBeans modules, use the
> > useOSGiDependencies=false parameter
> > Project uses classes from transitive OSGi bundle
> > com.sun.xml.fastinfoset:FastInfoset:jar:1.2.13 which will not be
> accessible
> > at runtime.
> > To fix the problem, add this module as direct dependency. For OSGi
> > bundles that are supposed to be wrapped in NetBeans modules, use the
> > useOSGiDependencies=false parameter
> > ==
> >
> > Should I wrap the XML stuff into a module? How do I make one module
> > dependent on another module with Maven? Or do I have to make a module
> suite?
> >
> > For now this is a simple module, and I have no problem bundling the XML
> > stuff for this simple test.
> >
> > The message says: "use the useOSGiDependencies=false parameter" but I
> have
> > no idea where this parameter should be specified.
> >
> > 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
>
>


XML in Netbeans Module

2021-01-16 Thread Will Hartung
I have a simple Maven NB module project, with Java 11, and I need to use
XML.

I have these dependencies:

com.sun.activation
javax.activation
1.2.0


javax.xml.bind
jaxb-api
2.3.0


org.glassfish.jaxb
jaxb-runtime
2.3.0


During build, I get:

==
NBM Plugin generates manifest
Adding on module's Class-Path:
javax.annotation:jsr250-api:jar:1.0
org.glassfish.jaxb:jaxb-runtime:jar:2.3.0
org.glassfish.jaxb:jaxb-core:jar:2.3.0
org.glassfish.jaxb:txw2:jar:2.3.0
Adding OSGi bundle dependency - com.sun.activation:javax.activation
Adding OSGi bundle dependency - javax.xml.bind:jaxb-api
Project uses classes from transitive OSGi bundle
com.sun.istack:istack-commons-runtime:jar:3.0.5 which will not be
accessible at runtime.
To fix the problem, add this module as direct dependency. For OSGi
bundles that are supposed to be wrapped in NetBeans modules, use the
useOSGiDependencies=false parameter
Project uses classes from transitive OSGi bundle
org.jvnet.staxex:stax-ex:jar:1.7.8 which will not be accessible at runtime.
To fix the problem, add this module as direct dependency. For OSGi
bundles that are supposed to be wrapped in NetBeans modules, use the
useOSGiDependencies=false parameter
Project uses classes from transitive OSGi bundle
com.sun.xml.fastinfoset:FastInfoset:jar:1.2.13 which will not be accessible
at runtime.
To fix the problem, add this module as direct dependency. For OSGi
bundles that are supposed to be wrapped in NetBeans modules, use the
useOSGiDependencies=false parameter
==

Should I wrap the XML stuff into a module? How do I make one module
dependent on another module with Maven? Or do I have to make a module suite?

For now this is a simple module, and I have no problem bundling the XML
stuff for this simple test.

The message says: "use the useOSGiDependencies=false parameter" but I have
no idea where this parameter should be specified.

Regards,

Will Hartung


Re: Java EE8 Status

2021-01-14 Thread Will Hartung
On Thu, Jan 14, 2021 at 7:27 AM HRH  wrote:

>
> However, an observation that caught my attention on StackOverflow is that
> the highest percentage of the activities (post and replies) on the
> technologies I mentioned earlier took place between 2009 to 2015, followed
> by a drastic drop onward, so I am not sure how to construe this sharp drop.
> Does this mean, the majority of the Java EE developers now have a matured
> skillset and they do not need to ask those “how-to” questions anymore, not
> many web-applications being developed across the board, Java developers are
> shifting to other development areas like AI, standalone apps on small
> devices, etc.—or they are gradually migrated/migrating to other non-Java
> platforms (i.e. Python)?
>

The big move has been to Javascript top to bottom, using Single page apps
in the browser and Javascript (ala Node) on the back end.

I am not keen in that world. JS has been reinventing the wheel much like
Java did in the 90's and 2000's. "Make the world JavaScript".

I can't disagree too much with that call. Early on, when I originally chose
Java for a project it was because of JSP and Servlets. Specifically, JSPs
WERE Servlets, just in a different form. This universality was important as
they could all be treated the same. Having a Java stack from top to bottom
I felt was important to leverage the network effect of the staff. What I
did not want was someone with a XXX problem unable to talk to someone else
because they only knew YYY. This was my concern at the time with the
Microsoft stack of mixing ASP and C++ and VB (pre .Net). I wanted the team
to have the same footing.

In fact, I was quite vocal, years later, when someone decided they "just
had to" use Clojure for a component of the system. Now, I'm a Lisp guy, I
like Lisp, I can see the charms of Clojure. But if we kept that, we would
have had 20 Java folks, and 1 Clojure guy. Inevitably, the Clojure guy
left, and we had 20 Java folks and no Clojure folks. And, naturally, we
later had some issues with the Clojure code that took far too long to
resolve because we didn't have the expertise in house. Whatever potential
advantages that brought in development (which I assert were minimal, since
I rewrote the Clojure code in Java, which I was told wasn "impossible" to
"prove" that it could be done, and, no it was not as elegant as the Clojure
was, but totally serviceable), were lost when we had to fight that issue
later.

So, I can understand the desire for consistency across the team and code
sharing and reuse across the platform.


Community Slack channel?

2021-01-13 Thread Will Hartung
On the How to Participate (
https://cwiki.apache.org/confluence/display/NETBEANS/How+to+Participate )
wiki page, there's a link for a Slack channel.

The invite has expired.

Does it get much traffic? Is it worth refreshing and joining this? Or are
the mailing lists pretty much the sole forum for conversation?


Re: Java EE8 Status

2021-01-12 Thread Will Hartung
On Tue, Jan 12, 2021 at 12:31 AM Som Lima  wrote:

>
> My concerns layed to rest with my direction set.
>
> I feel I must ask one more question from this knowledge pool. A bonus
> question if you please.
>
> It is my understanding struts is a competitor to spring but I don't
> believe
> It is part of EE.
>
> Where does struts1 + 2 fit into the Big picture you guys  painted   ?
>

Formally, Struts in any form has nothing to with JEE. It's only a
competitor to a portion of Spring.

Struts 1 needs to die in a fire. It should remain only to be held up as an
example of things not to do, especially today. It's single claim to fame
back in the day was simply that it arrived first. Struts 1 is awful, IMHO.
Modern JSP and Servlets alone are far better, and there are much better
frameworks. Struts II is a vast improvement and related to Strut 1 in name
only. I would put them both aside, frankly.

In JEE, you have JSP 2.x + Servlets and JSF. JSP 2.x is, IMHO, one of the
finest web application templating systems out there. JSP + Tag files +
Expresion Language is really powerful. If you want a templating language
for other things, JSP is a rough fit. But if you want one for web pages,
it's really remarkable.

That said, modern JSF is really amazing. It's really powerful, but it
certainly comes with complexity. JSF is a true modular and component based
framework that scary powerful abstractions can be laid upon. Most people
don't take it there, but the underlying capability is there. If you were to
go with a more server side rendering system, JSF is very viable.

There's been calls for a JEE standard MVC framework. Struts II was
considered an MVC framework. The term "Action Framework" is another term of
art for it. That effort stalled and derailed when Oracle dumped JEE on to
the world. I don't know the current status. Spring has an action/MVC
framework as well. JAX-RS with a little work is a pretty usable action
framework.

Today, most folks seem to trend to javascript heavy, single page apps with
JSON backend services. In that case, you don't need much of anything server
side. I can not speak to those, as that's not my area of expertise. As a
rule, I find most modern webapps to be not very good. There needs to be a
balance between the heavy pages and static pages with live controls. In
that realm, I think JSF is a better fit, but I have not worked on such an
app in some time.

Regards,

Will Hartung


Re: Java EE8 Status

2021-01-12 Thread Will Hartung
On Mon, Jan 11, 2021 at 11:13 PM nikita.zinov...@gmail.com <
nikita.zinov...@gmail.com> wrote:

> I'm really amazed that Payara finally made it to a fully clustered App
> server setting, people say they have seamless green/blue deployments there
> with a cluster of 2-3 payara servers. I wish we could also get a clustered
> PostgreSQL or an equivalent...
>

We've been running a cluster of GF/Payara servers for years. It was an
adhoc cluster, not using the in built GF facilities for deployment. Rather,
we just did sticky load balancing with little session sharing, and JMS
topics for crossleg communication. It was originally done for availability,
keeping the system up if one leg were to go down, so it was just two legs.
We eventually had to move to 3 for performance reasons as a single machine
could not take the traffic. GF has some nice clustering facilities, but for
us it was simply easier to manage the deploys to the legs manually than to
practice and learn the GF kit. We were live and just not inconvenienced
enough to try to pursue it.

We also run an OpenMQ cluster across all of the machines. We had good
success with OpenMQ, but we certainly beat the heck out of it and have had
different issues surrounding it.

The back end is Postgres that has a live streaming replica. The front end
is HAProxy. We are running 3 Payara instances on each leg, each supporting
a different part of the application. We also had an independent cluster of
3 Payara instances running a specific service that has since been migrated
to a completely different service. All of these were integrated via SAML
SSO. We broke the applications up in Payara mostly for monitoring and
independence. When things went awry it was much easier to find which
application was misbehaving when they were isolated like that. But we
certainly had scenarios in the past in lower load environments where
everything was on one instance of Payara. The dev server, for example, had
everything in a single instance.


> (PostgreSQL offering, say, in Google cloud seems to be nice, scalable,
> auto backed-up, but not clustered, it seems Oracle Autonomous DB can now do
> it, but I never had chance to try Oracle Cloud and have no idea how
> expensive it is, probably, not so much... Oh, and it seems there's also
> Google's Spanner DB).
>

AWS Aurora Postgres is an impressive piece of kit. It's quite remarkable
how a database implementation can change when you assume you have dozens of
machines, stable memory, high bandwidth networking, and geographical
isolation. If you're friendly to AWS, it's worth considering, but you can
not use a cloud database without the rest of your application co-deployed
in the same infrastructure. The lag will crush you.

Regards,

Will Hartung


Re: NetBeans IDE 12.2 - Failed to automatically set-up JavaFX Platform

2020-12-31 Thread Will Hartung
Are you using the Ant based projects?

I have been able to create JavaFX using the Maven templates just fine using
12.2 and JDK 11.

And the Ant based projects may very well be dated and not well tested or
supported.

I tried one of those and NB doesn't quite know about my JDK 11 platform, at
least as far as the wizard is concerned.

But the Maven ones point to all the new dependencies that are downloaded
automatically and so far work great. It should be straightforward to adapt
the book's examples to Maven projects.

HNY

Regards,

Will Hartung


On Thu, Dec 31, 2020 at 6:37 PM HRH  wrote:

> Glad to help.
>
> On Thursday, December 31, 2020, 11:02:39 PM GMT+3:30, Paolo Colamarino <
> ptb.colamar...@gmail.com> wrote:
>
>
> Thank you for explanations.
> Many thanks.
> I have done what you have told me.
> But I am starting to study JavaFX and NetBeans.
> I am reading a book (attached: title.PDF).
> The book proposes me an exercise (attached: example.PDF).
> I get this result (attached: myresult.PDF).
>
> Il giorno gio 31 dic 2020 alle ore 18:35 HRH  ha
> scritto:
>
> Now you have informed Netbeans about the SceneBuilder home directory (as
> indicated by your attached PDF). Prior to opening or creating a JavaFX
> project, go to Tools->options->Java and select the JavaFX tab and this will
> activate the JavaFx (if not activated already) and the panel will show the
> JavaFX Scene Builder integration along with the Scene Builder Home. I would
> do this step every time the IDE is started to ensure the JavaFX is
> activated, otherwise, the FXML files do not integrate with the Scene
> Builder properly (at least this has been my experience with Netbeans 12.0).
> On Thursday, December 31, 2020, 8:40:45 PM GMT+3:30, Paolo Colamarino <
> ptb.colamar...@gmail.com> wrote:
>
>
> YES.
> I have manually inserted the installation directory.
> The result is attached to the email (SceneBuilder.PDF)
>
> Il giorno gio 31 dic 2020 alle ore 07:32 HRH  ha
> scritto:
>
> Does it allow you to select the Scene Builder installation directory?
>
> On Wednesday, December 30, 2020, 12:30:47 PM GMT+3:30, Paolo Colamarino <
> ptb.colamar...@gmail.com> wrote:
>
>
> I obtain the message:
>
> Please, select a valid Scene Builder home ...
>
>
>
> Il giorno mer 30 dic 2020 alle ore 04:03 HRH  ha
> scritto:
>
> Paolo,
> What happens if you do Tools->Options->Java-JavaFx?
>
> On Wednesday, December 30, 2020, 1:43:51 AM GMT+3:30, Paolo Colamarino <
> ptb.colamar...@gmail.com> wrote:
>
>
> HI,
> I have installed  jdk-15 and after Apache NetBeans IDE 12.2.
> I open NetBeans and after
> File > New project > Categories > JavaFX > Projects > JavaFX Application >
> Next
> I obtain an error message : Failed to automatically set-up JavaFX Platform
> Why ?
>
> Thanks
>
> Paolo Colamarino
>
>
> -
> 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 FX Scenebuilder w/12.2

2020-12-29 Thread Will Hartung
Yea, that was it. When I went to the JavaFX tab, it also installed a new
module.

Just odd that these settings did not get imported over from 12.0 as I would
have expected.

Thanks all!

Regards,

Will Hartung

On Tue, Dec 29, 2020 at 7:05 AM David  wrote:

> As I recall you have to specifically integrate SceneBuilder into Netbeans
> with each Netbeans install. A quick google found
>
> *Starting Scene Builder from NetBeans IDE*
>
>1. From the Main menu, select Tools and choose Options. On the Mac OS
>platform, select *NetBeans* and choose Preferences from the Main menu.
>2. In the Options window, click Java and then the JavaFX tab.
>3. Specify the location of the *Scene Builder* installation folder and
>then click OK.
>
>
> Hope this helps
>
> David Johnson
>
> On Mon, 2020-12-28 at 19:35 -0800, Will Hartung wrote:
>
>
>
> On Mon, Dec 28, 2020 at 4:03 PM Scott Palmer  wrote:
>
> I had similar issues until I manually launched SceneBuilder and opened
> some FXML files. After that it seemed to work.
>
> Scott
>
>
> One thing I think I noticed was that in 12.0, when I clicked on a FXML
> file, there was an Open and Edit option. If I double clicked on the file in
> 12.0, it would open SceneBuilder. But if I clicked the Edit menu option, it
> would open the XML file in NetBeans.
>
> On 12.2, I no longer see Open and Edit. I see Open, View, and Open
> Advanced...
>
> Neither View or Open Advanced... do anything.
>
> Oh, and this is on Mac OS Mojave.
>
> Thanks again,
>
> Will Hartung
>
>
>


Re: Java FX Scenebuilder w/12.2

2020-12-28 Thread Will Hartung
On Mon, Dec 28, 2020 at 4:03 PM Scott Palmer  wrote:

> I had similar issues until I manually launched SceneBuilder and opened
> some FXML files. After that it seemed to work.
>
> Scott
>

One thing I think I noticed was that in 12.0, when I clicked on a FXML
file, there was an Open and Edit option. If I double clicked on the file in
12.0, it would open SceneBuilder. But if I clicked the Edit menu option, it
would open the XML file in NetBeans.

On 12.2, I no longer see Open and Edit. I see Open, View, and Open
Advanced...

Neither View or Open Advanced... do anything.

Oh, and this is on Mac OS Mojave.

Thanks again,

Will Hartung


Java FX Scenebuilder w/12.2

2020-12-28 Thread Will Hartung
I just installed 12.2 and imported my 12.0 settings.

In 12.0, if you double click on an FXML file, it would open the file in
SceneBuilder.

In 12.2, it does not. Is there a setting I'm missing?

Thanks

Will Hartung


Does NetBeans install a Maven settings.xml?

2020-12-16 Thread Will Hartung
I was debugging a repository issue with a maven project, and noticed that
the pom based repository was being mirrored by Maven Central.

I found this section in my ~/.m2/settings.xml file:
  

  maven-central
  https://repo1.maven.org/maven2/

*,!eclipselink.repository,!jvnet-nexus-promoted,!netbeans.repository

  

Looking over the settings.xml file, it appears that this is entirely a
NetBeans construct. (I have no memory of tweaking settings.xml myself).

Does NB install/update a local settings.xml? When does it do this?


Re: Loss of focus after using Wizards NB12 JDK 8 MacOS 10.14.6

2020-10-09 Thread Will Hartung
More follow up.

This does not seem to happen on the latest OpenJDK from Ubuntu. This is
likely a Java/Mac thing, I've seen other mentions about this happening in
other Java projects, but it's often associated with remote viewing
programs. But that's not the case here. I've also seen anecdotes that it's
"easy to duplicate in NetBeans".

Mind, I have no idea how this would even be approached. How to discern that
it is, indeed, a JDK thing specific to the Mac (but I've also heard
anecdotes of it happening on Windows).

It's spectacularly annoying. Honestly, it makes the IDE borderline
unusable. I'm debating hosting a Linux VM on my mac to move forward
(perhaps rootless x client). I've even explored VSCode as an alternative,
but it was honestly not as good an experience. I think I'd rather fight
shortcut keys and VirtualBox/Linux on a shared folder than VSCode.

(This isn't a knock against VSCode, it's a knock against VSCode using Java
from a long time NB user, it's just more pain than I'm willing to accept
right now if I don't have too. It's as much me as it is VSCode.)


On Fri, Oct 9, 2020 at 9:19 AM Will Hartung  wrote:

> Just an FYI, this also happens on the latest Oracle JDK 11.
>
> Simple test.
>
> Create a new class, or open an existing Java class
> Add some member variables.
> ^IGetters and Setters
> Cancel the dialog.
> Caret/Focus is gone.
>
> On Sat, Sep 26, 2020 at 3:15 PM Will Hartung 
> wrote:
>
>> *Product Version:* Apache NetBeans IDE 12.0
>> *Java:* 1.8.0_261; Java HotSpot(TM) 64-Bit Server VM 25.261-b12
>>
>> *Runtime:* Java(TM) SE Runtime Environment 1.8.0_261-b12
>>
>> *System:* Mac OS X version 10.14.6 running on x86_64; UTF-8; en_US (nb)
>>
>> Simply, whenever I use one of the wizards (like Override Method, or
>> anything from the ^I menu, both if I use ^I or right-click Insert Code),
>> the wizard runs and does its work, but after that I have no focus in
>> NetBeans.
>>
>> I can drag the mouse, double click words, things like that. But I can't
>> type. I can open new editor windows, like other files, and can not type.
>> The caret vanishes. The only solution is to switch to another app, and then
>> switchback, and all is back to normal.
>>
>> This is running the latest Oracle JDK. I've seen it in NB 8.x, I've seen
>> it on earlier instances of JDK 8.
>>
>> I have not tried latest JDKs.
>>
>> This may well be related.
>> https://bz.apache.org/netbeans/show_bug.cgi?id=119617
>>
>> But I don't know if that was migrated to the new system or not.
>>
>> Regards,
>>
>> Will Hartung
>>
>>


Re: Loss of focus after using Wizards NB12 JDK 8 MacOS 10.14.6

2020-10-09 Thread Will Hartung
Just an FYI, this also happens on the latest Oracle JDK 11.

Simple test.

Create a new class, or open an existing Java class
Add some member variables.
^IGetters and Setters
Cancel the dialog.
Caret/Focus is gone.

On Sat, Sep 26, 2020 at 3:15 PM Will Hartung  wrote:

> *Product Version:* Apache NetBeans IDE 12.0
> *Java:* 1.8.0_261; Java HotSpot(TM) 64-Bit Server VM 25.261-b12
>
> *Runtime:* Java(TM) SE Runtime Environment 1.8.0_261-b12
>
> *System:* Mac OS X version 10.14.6 running on x86_64; UTF-8; en_US (nb)
>
> Simply, whenever I use one of the wizards (like Override Method, or
> anything from the ^I menu, both if I use ^I or right-click Insert Code),
> the wizard runs and does its work, but after that I have no focus in
> NetBeans.
>
> I can drag the mouse, double click words, things like that. But I can't
> type. I can open new editor windows, like other files, and can not type.
> The caret vanishes. The only solution is to switch to another app, and then
> switchback, and all is back to normal.
>
> This is running the latest Oracle JDK. I've seen it in NB 8.x, I've seen
> it on earlier instances of JDK 8.
>
> I have not tried latest JDKs.
>
> This may well be related.
> https://bz.apache.org/netbeans/show_bug.cgi?id=119617
>
> But I don't know if that was migrated to the new system or not.
>
> Regards,
>
> Will Hartung
>
>


Loss of focus after using Wizards NB12 JDK 8 MacOS 10.14.6

2020-09-26 Thread Will Hartung
*Product Version:* Apache NetBeans IDE 12.0
*Java:* 1.8.0_261; Java HotSpot(TM) 64-Bit Server VM 25.261-b12

*Runtime:* Java(TM) SE Runtime Environment 1.8.0_261-b12

*System:* Mac OS X version 10.14.6 running on x86_64; UTF-8; en_US (nb)

Simply, whenever I use one of the wizards (like Override Method, or
anything from the ^I menu, both if I use ^I or right-click Insert Code),
the wizard runs and does its work, but after that I have no focus in
NetBeans.

I can drag the mouse, double click words, things like that. But I can't
type. I can open new editor windows, like other files, and can not type.
The caret vanishes. The only solution is to switch to another app, and then
switchback, and all is back to normal.

This is running the latest Oracle JDK. I've seen it in NB 8.x, I've seen it
on earlier instances of JDK 8.

I have not tried latest JDKs.

This may well be related.
https://bz.apache.org/netbeans/show_bug.cgi?id=119617

But I don't know if that was migrated to the new system or not.

Regards,

Will Hartung


Re: Ant Project Deploys to Glassfish 5.0.1 with NB 11.0 but not NB 12.0

2020-08-18 Thread Will Hartung
On Tue, Aug 18, 2020 at 12:51 PM Flick - CDPS, Peg 
wrote:

>   Initializing Mojarra 2.3.2 ( 20170627-2139
> e63598abf2ed2bb1a24674f308a734e0dce18a72) for context
> '/WebServiceStatutes'|#]
>   WebModule[/WebServiceStatutes]StandardWrapper.Throwable
> MultiException stack 1 of 1
> java.lang.RuntimeException:
> at rest.ApplicationConfig.(ApplicationConfig.java:1)
>

Your application is throwing an exception, you need to dig deeper in to
what that exception is, and why. Your ApplicationConfig constructor is
exploding.


Re: [java] formatter questions

2018-08-22 Thread Will Hartung
On Wed, Aug 22, 2018 at 5:53 AM, Chris McGee  wrote:

> I’ll give it some thought as to whether we want to continue to use the
> abandoned code formatter or rely on developer diligence to keep the code
> base formatted correctly.
>

The point is that odds are very high that whatever is making this plugin
incompatible is most likely some little bit of meta data. The code is the
code, NB Platform, in general, is more stable than not.

Even a developer new to the platform could probably build this add on,
tweak it to make it compatible, and bring it up to date quite quickly. I
mean, who knows, right? Maybe, maybe not.

Were someone on your team to do that, and submit the patch back to the
original developer, then, tada the module is now "maintained". For maybe a
couple hours work, until the next release of NB.

Considering the time savings and other value you gain from using this
plugin, don't you think it might be worth an hour or two to at least have
someone take a serious look at it?

Check it out, build it, take a look at it. If you have problems, folks here
may be able to give detailed tips on getting the plugin to work again. They
can readily help with the NB parts. The eclipse part, not so much, right?
And this is likely a NB issue, not an eclipse formatter thing.

AT WORST, you have a fork of this module now working for you, and you have
an internal website somewhere hosting the fork artifact so it's available
to your users as a module (this entails an XML file and your module, it's
no big deal). Not the most egregious burden. Ideally, the author will
incorporate your change and its now "up to date", just as it always has
been.

So, in total, the ask here isn't that great.

What do you think?

Regards,

Will Hartung


Re: Plug-in support and compatibility suggestion

2018-08-07 Thread Will Hartung
I mis-replied this before, so resending it.

On Tue, Aug 7, 2018 at 9:04 AM, Emilian Bold  wrote:

> Beansbinding can be brought back easily. We have the existing code
> service-based, we only have to put the GPL w/ CPE plugin somewhere online
> and suggest it to users, just like we suggest nb-javac.
>

Well, that's an interesting point.

Now, I don't know, but I don't think there can be an "official" Apache
point for distribution of GPL and other non-APL code, right?

But there could be some semi-official "Friends of Netbeans" place that
would be "friendly" to things like that and would be a sane default for
Netbeans to go and fetch things from.