[netbeans]Using C with Apache Netbeans v19

2023-09-19 Thread dfansler
I used to use the Oracle Netbeans for developing a few simple programs.  I have a need to go back and modify one of those programs, so I just installed Apache Netbeans v19 along with jdk 11.  Netbeans comes up into an editor window, but I do not see how to load, or modify/compile my

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

2023-09-19 Thread Thomas Wolf
Thanks! Definitely better than using the lastModified() date on the File I was using :-) With respect to the build modification, I’m old school and still stuck on ant. But many thanks for the ImplementationVersion suggestion. tom > On Sep 19, 2023, at 2:03 PM, Laszlo Kishalmi > wrote: > >

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

2023-09-19 Thread Laszlo Kishalmi
Well, if using a home brew solution, I may rely on the hidden gem of: MyClass.class.getPackage().getImplementationVersion() If you provide a nice MANIFEST.MF with your jar that should work. The original problem would still persist, in that case you need to configure your build system. If tha

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

2023-09-19 Thread Thomas Wolf
Hi Laszlo, My J2SE application is installed by a jpackage-created installer on mac/linux/windows and can be either a client or a server. The application, upon startup, checks if there’s a new version of the app jar available on a server instance and, if so, downloads it so the next time the app

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

2023-09-19 Thread Laszlo Kishalmi
You probably do not want to do such a thing. Is there a more high level of use case why you would get the date of a jar? Usually depending on file dates would make you application very brittle, which would work on development, but when put into production, could lead hours of debugging, whit s

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

2023-09-19 Thread Thomas Wolf
Hi, My application has a bit of code that tries to do something based on the build date of the jar file. To get the jar file, it does something like this: File jarFile = new File(Startup.class.getProtectionDomain().getCodeSource().getLocation().toURI()); This works fine when the applic