Changing the version of Gradle for an old project
Hello In earlier IDE versions I used to be able to select the version of Gradle used on a project (a drop-down list with white on white text, but which revealed the gradle version under the cursor). I cannot find that drop-down list in Netbeans IDE 21. What's the current recommended way to change the version of gradle on a project? Today I used the gradle wrapper from the linux console as a workaround. Thank you Emma P.S. I'm using the latest NetbeansIDE on JDK 21, which is on the latest LTS UbuntuStudio Linux. I am using a 4K monitor with the Ubuntu display settings scaling factor at 125% to make the text more comfortable to read on many applications I use.
Suggested gradle improvement
I have been doing a bit of programming recently. I'm giving Test Driven Development a go and have decided on using groovy Gradle instead of Ant for all of my projects. *(Aside: It feels premature to migrate to Kotlin Gradle right now under NB IDE 19.)* I would like to suggest adding a test debug task that is basically equivalent to *test --debug-jvm* to the gradle task navigator panel and the RMB menu on a project (sub-project). This task activates the debugger when testing. I have added this task via the project properties in the meantime. May I also mention a separate problem I have noticed while thinking about this suggestion? I use TestNG for my testing. Creating a TestNG Test Case using the IDE menus doesn't seem to work. I haven't figured out why or confirmed it is not a problem I have introduced somehow in a previous version of NB IDE. I hand-craft the files presently as a workaround, which is not too time consuming. I really appreciate the effort that goes into NB IDE. Emma
Re: Maven indexing
I gave up on Maven a couple of years ago for the reasons already given. No matter what size partition I used it would be too small within a year or so. I used to grab the dependencies I needed and switched off the Maven Index download in NB. Recently (couple of years) I started using the Maven repository again but through Gradle. Gradle does not load and decompress the whole index. Gradle loads solely the dependencies (artifact : group : version) specified in the build.gradle file. When building, Gradle loads the dependency files into a folder under ~/.gradle if it's not already there. I liked it so much that I'm now migrating my Ant builds to Gradle as and when. I might do the Maven projects too. I was wondering if that part of Gradle's functionality could be recruited to selectively download relevant dependencies. It looks like the Maven pom contains the same information as Gradle's dependencies configuration. Please forgive me if this seems daft to you. Regards
Adding a TestNG Test Case file does not work in NB IDE 16
Hello I am using NB IDE 16 with Gradle 7.6. In the past I have hand-crafted TestNG Test Cases without relying on the Freemarker Templates. I tried and failed to add a TestNG Test Case to my project as follows: 1. From the Projects tab, select the Test Packages [java] in the tree node. 2. RMB menu New > Other ... 3 NB displays the New File Dialog. 4. Choose Unit Tests in Category 5. Select TestNG Test Case 6. Press Next to show the next dialog headed New TestNG Test Case 7. Leave the defaults as is (they look correct) 8 Click the Finish button 9 Dialog box goes away. 10 nothing happens. If I try the same with a new TestNG Test Suite and press the Finish button the dialog box does not disappear and I notice a very fleeting error message, which I struggle to read. I think it says something about an spi file. I could not find a way to fix it myself. Is there a fix that I can apply? Regards
Re: Tools > Options > Java > Gradle drop down list
Hi Michael, I'm using the default LAF, pale greys, white background for text input. Have not yet tried the dark LAF. On Sun, 22 Jan 2023, 15:05 Michael Bien, wrote: > what look and feel are you using for NetBeans? Did you change the default? > > the white items shouldn't be white, those should be "grayed out" to make > the other versions stick out more. Red means no longer supported. > > -mbien > > On 22.01.23 15:49, Emma Atkinson wrote: > > Hello > > I'm using NB IDE 16 on UbuntuStudio and I have a minor problem with a > > dropdown list of Gradle Distribution Versions. To find the drop down > > list I am talking about navigate as follows: > > > > Tools > Options > Java > Gradle > Execution > Gradle Distribution > > Version > Use Standard Gradle Version > > > > I think the problem is that the text I want to see is white text on a > > white background for most of the entries. The Gradle version I am > > using is black text on white background. There is a 7.5 in the list > > too. There are two options with red text on white background way down > > the list (2.13 and 2.3) The drop down list is long but mainly white > > options. Running the cursor over the list causes the option under the > > cursor to change to white on blue background, which I can read. > > Hence, it's just a mild irritation I don't encounter often. > > > > Is there something I can do to fix this for me and get it out of my > > head space? > > > > Thank you > > Emma > > > > > > > >
Tools > Options > Java > Gradle drop down list
Hello I'm using NB IDE 16 on UbuntuStudio and I have a minor problem with a dropdown list of Gradle Distribution Versions. To find the drop down list I am talking about navigate as follows: Tools > Options > Java > Gradle > Execution > Gradle Distribution Version > Use Standard Gradle Version I think the problem is that the text I want to see is white text on a white background for most of the entries. The Gradle version I am using is black text on white background. There is a 7.5 in the list too. There are two options with red text on white background way down the list (2.13 and 2.3) The drop down list is long but mainly white options. Running the cursor over the list causes the option under the cursor to change to white on blue background, which I can read. Hence, it's just a mild irritation I don't encounter often. Is there something I can do to fix this for me and get it out of my head space? Thank you Emma
New Gradle project creates the wrong sort of project
I'm not sure if this is a bug or intended functionality. If I want to create a simple Java SE application Gradle project I do the following: Select New Project Select Java with Gradle Select *Java Application *for a simple application Click the Next button Enter a project name Click the Finish button However, this creates a multi-project application with a single subproject called *app*. One has to change this default name to something meaningful by hand. There is no refactoring support that I could find to rename the subproject. This is equivalent to *> gradle init --type java-application* NB IDE 16 has a better way to create a multi-project with a single subproject if that is what one wants: just select *Multi-Project Build* instead of *Java Application* , which allows one to give one or more subprojects and give them sensible names. According to the Gradle 6.7 Release Notes, where this behaviour was first released, if one wants to create a simple Java SE project in NB IDE 16 selecting Java Application should use the *basic *project type equivalent to: *> gradle init --type basic* Do you agree or am I missing something? *References* Gradle 6.7 introduced this behaviour. Documentation for the build init plugin may be found at https://docs.gradle.org/6.7/userguide/build_init_plugin.html The release notes may be found at https://docs.gradle.org/6.7/release-notes.html. The release notes say to use project type *basic* if one does not need the complexity of a multi-project build. Regards
New Simple Gradle Java Application with TestNG
When NB IDE 16.0 creates a "simple" new Gradle Java project I presume it executes *gradle init *with some command line options. The *gradle init* command offers a choice of test frameworks. Netbeans chooses *JUnit Jupiter*. However, the *gradle init* command also offers *JUnit 4* (gradle's default), *TestNG* and *Spock*. Is there a way for me to get NB IDE to choose the TestNG option? More generally speaking, what are the best ways to create projects in NB 16 using the other *gradle init* choices? Thank you
Configuring NB IDE to show JavaFX Javadocs popups for modular Gradle projects.
Is there an up-to-date guide or set of instructions describing the various ways I can set-up NB IDE 12.6 to show JavaFX (openjfx) v.17 Javadoc pop-ups for modular Gradle projects. I read recently a very well written JIRA case dated late 2019 summarising 6 sub-cases for each build setup. One of the sub-cases said that javadoc for modular (java + JavaFX) Gradle projects was fixed/closed for NB IDE 11.3 (See https://issues.apache.org/jira/browse/NETBEANS-3303). I use ubuntu Linux. A more recent version than the Jira case. Knowing that popups can be made to work or that they don't is helpful too. Seasons Greetings & thank you to all devs working on NB & the IDE. Emma
Re: NetBeans Platform "Golden Path"
"The jlink tool links a set of modules, along with their transitive dependencies, to create a custom runtime image." JPMS is necessary if you want to use jlink, according to the oracle manual. It is the reason I am migrating my old programs to JPMS as and when the mood takes me. On Thu, 8 Jul 2021, 13:50 Scott Palmer, wrote: > Use of jlink and jpackage does NOT require that you use JPMS. > > I have never made a “modular” application using JPMS, but I use jpackage > all the time (but I wasn’t making NetBeans platform apps). You just need to > know which modules from the JDK to include in the runtime, assuming you > don’t need all of them. > > In my projects I use a custom Gradle task to run jlink and jpackage. It > might be more difficult with Maven, but it should be possible. > > Scott > > > Additionally, although recent developments like jlink and jpackage have > made it somewhat easier to produce stand-alone application bundles that > don't require the user to first install a JRE, which is nice, it seems that > these tools sometimes require the use of JPMS modules, which can be > problematic in NetBeans (see above). > > - > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org > For additional commands, e-mail: users-h...@netbeans.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > >
Re: removing the "new project" support for Ant projects
Christoph It so happens I have just read a migration guide that looks reasonable and do-able. It's at https://docs.gradle.org/current/userguide/migrating_from_ant.html and addresses option for Ant and mentions Ivy. The guide suggests Ant and Gradle builds coexist until one has confidence that both build tools produce the same things. I'm not yet sure I can foresee how Netbeans IDE might play along with or assist the approach suggested. One thing they do not cover is how to switch NB-IDE project configuration to a standard Gradle project. I definitely do not know how to do that without making a mess. On Fri, 23 Apr 2021, 15:35 Christoph Theis, wrote: > On 23.04.2021 15:22, Laszlo Kishalmi wrote: > > Ant projects can be fairly simply can be migrated to Gradle. It can > > support your current folder structure. Your file/directory based library > > dependencies, and occasional customization you made. > > Been there, tried that, and failed. > If you have a working Ant project keep it. To convert it to Gradle only > because it is the new-kid-on-the-block is, in my opinion, a wrong move. > > I considered to convert to Gradle to get dependency management but in > the end it was easier to add Ivy instead of working out how to convert > some tweaks and tricks, if possible at all. And I would love to have a > better Ivy integration in NB instead of making Ant a 2nd-class citizen. > > Just my 2 cent. > > > -- > Christoph > > - > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org > For additional commands, e-mail: users-h...@netbeans.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > >
Re: removing the "new project" support for Ant projects
Surely the issue with any feature or function or tool is whether there is sufficient Dev support to fix emerging bugs, properly adapt to latest versions of Java lang, JFX, JLink etc and answer tricky questions from users. If Ant Dev expertise and time is getting harder to find it makes sense to plan a migration to a new preferred build tool(s) for new projects and new NB-IDE users. Assuming an easy to use alternative is available, labelling Ant projects legacy or deprecated might be all that is required for now. Keep Ant support running and when dev support availability falls behind the bleeding edge put a warning somewhere obvious to users when creating new projects or migrating to an unsupported versions of Java lang, JFX, Jlink etc. Is Ant at that stage? I don't know because I don't develop often enough. Any problems always come as a surprise. I take these problems, language advances and the terminology that enters over time as the usual friction in getting a quick programming job done. Big thank you from me for all providing support. On Wed, 21 Apr 2021, 08:26 Wayne Gemmell | Connect, < wa...@connect-mobile.co.za> wrote: > On Wed, 21 Apr 2021 at 06:32, Sean Carrick wrote: > >> Actually, I have always been of the philosophy that "if it ain't broke, >> don't fix it." This seems to be a philosophy lost in today's modern world. >> Your comments show your bias toward always being on the bleeding edge of >> technology. Personally, I do not care what anyone chooses to use for a >> build tool or a programming language. What gets to me is that someone (or >> group of someones) somewhere decides that a certain technology is "too >> old", so they are wanting to kill it. It does not seem to matter that there >> are hundreds, thousands, or millions of people who use that specific >> technology throughout the world. They just decide it needs to be killed and >> everyone should just get on-board with their decision. >> > Ant may not be broken but when something does go wrong it's almost > impossible to debug. That said, it may be the obscure Netbeans > implementation that is the issue, not Ant itself. > > Another issue is that you can't keep it in version control and deploy to > multiple team members very easily. Minor filesystem differences make that > sort of thing impossible to do out of the box. > > Searching out the correct version of a library when spinning up someone > elses project is also ridicuiously difficult. Especially if the author > included sim links instead of the actually jar name with the version in it. > > Being old school myself I remember getting a coffee while my 486 booted so > as long as I expect Maven to take a while then it isn't an issue, not > knowing you will need to wait is a bit disconcerting. > > All that said, I'm not actually advocating for Maven, I'm just at the > "anything but Ant" point of my life. The hours I've spent dealing with that > obscure crap are hours I can't get back. > > Wayne >
Re: removing the "new project" support for Ant projects
I develop small projects and prototypes. I was considering migrating to Gradle when the time comes to retire Ant support. I have managed to get OpenJFX and linker working well enough under Ant. It helps that I was used to object linking in the 1980's on DEC PDP11s. Personally, I find Maven overkill for my projects. The main concern is the repository index is massive. As it stands, I'll have to reconfigure the hard drives to decompress it. On Tue, 20 Apr 2021, 17:58 , wrote: > 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. > > > I agree, if and ONLY if you provide at least a rudimentary way to convert > ANT projects to Maven projects. I have been struggling with this issue > too long. I have hundreds of Ant based projects that I would love to turn > over immediately to Maven... but I can't , am struggling, and haven't coded > a darn line in two months... I used to code 10 hours a day ... and now... > embarrassed by my inability to convert.,. > > I exaggerate a bit, I still code in "Old" Netbeans 8.2, but I know the > days are numbered... > > > > On 2021-04-20 08:23, Will Hartung wrote: > > > > 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: Java FX Project identity
Changing project type is not straightforward. I suggest you migrate an old project's source and test files to construct a new project (of different type) the best way you can. My experience follows. A year or two ago I tried to change a console program into JFX 11 + JDK 11 program within Netbeans. I was updating from JDK 9 + Ant build. I was going to JDK 11 + Ant build, modules, separate library for JFX11 and finishing off with building with jlink. There were a few knowledge hurdles to jump, changing the project type was the first one I had to clear. I was unable work out a way to change project type that didn't create anomalies. It would look ok at first, then I would subsequently discover problems I didn't really understand. I need to trust the build and test functions when jumping the other hurdles. I wasted lots of time on this. Too much. Netbeans does a range of things under the hood when you select a project type for a new program. For example, the Ant build scripts or the way they are configured changes. I also discovered differences in the project definition files adding and removing specific configuration settings related to the project type; I might be describing the same thing but I'm not sure. In the end, I created a new JavaFX project in a new project folder, created packages and a simple module structure (for jlink to work on). I then copied the sources across renaming the console program's source files into the new structure as necessary (e.g. main to main1) . It was laborious and a bit messy but not too bad as it was a small project and much quicker than the time wasted so far. I then edited the source files. I deleted the main1 source file once I had copied the lines I needed across. Emma On Mon, 22 Mar 2021, 18:11 HRH, wrote: > I haven't been creating JavaFx for a few months but I didn't have any > problems (using Maven and NB 12.0) creating FX projects. IDE created the > FXML file and the SceneBuilder would automatically start if I clicked on a > given FXML. Check your setup and make sure the SceneBuilder is configured > properly. > > > > On Monday, March 22, 2021, 10:14:30 PM GMT+4:30, Will Hartung < > willhart...@gmail.com> wrote: > > > What does it take to convince NB that a project is a JavaFX project? > > If you create one from the Wizard, then the IDE knows about FXML files. It > has options to create them, if you double click on one it launches > SceneBuilder, etc. > > If you create a plain Java Maven project, it doesn't know about any of > those things. For example, you can not create an FXML file with the New > menu. > > Adding java fx dependencies doesn't do anything to the IDE. > > Now, I've "uplifted" a normal project a little bit. > > Part of a FXML project is a custom nbactions.xml file. This, most notably, > leverages the maven javafx:run goal instead of generic main class method. > > I think when I added this nbactions.xml file, the IDE now became more > aware of JavaFX. Now, many of the JavaFX specific things show up in the New > menu and wizards. > > But I still can not double click on an FXML file and launch SceneBuilder. > So, I'm missing some other link. > > Any idea how I can make that final connection? And where is it manifest? I > don't see any hidden files, or any files I can not explain differing from > one project to another. Is there another place project specific information > is stored besides within the project directory itself? > > Thanks. > > Regards, > > WIll Hartung > >
Re: Netbeans and malware article
I wouldn't treat this as a negative thing about which to be defensive. It can be positive and show the team in a good light. Here's a suggestion We are aware of news report ... etc. We contacted the researchers behind the news. They found 26 infected projects. The owners have been contacted and their accounts have been made private, which we think is the correct action. We contacted the researcher who has given us some additional information. We will examine the information to identify whether there is anything we could add or change to Netbeans. There appears to be no need for urgent action ahead of the imminent release of Netbeans IDE version 12. Perhaps add. We welcome suggestions from Netbeans users. Please send your constructive proposals and suggestions to . Then give the key details of the problems uncovered. Just a suggestion. Emma On Sat, 30 May 2020, 14:11 Geertjan Wielenga, wrote: > > OK, I’ll put together a blog we can refer to that will say this — > “research has been done on GitHub that identified 26 small Ant-based Java > projects, mostly games, some of them by the same person, none of the > projects appeared to be enterprise/professional, that had been infiltrated > by malware. The projects have been set to private on GitHub and the project > owners have been approached about this. The malware campaign has had very > low impact and is considered by GitHub to be over.” > > Most of the above is not in the research article, but comes from me asking > repeated questions on Twitter to the guy behind tbe report. > > Gj > > > On Sat, 30 May 2020 at 13:57, Emilian Bold wrote: > >> Note this is not a CVE since it's not a NetBeans vulnerability. >> >> Executing any build will run with the local user privileges on any >> popular IDE and injecting something dubious in a build is trivial. >> >> Still, I think GitHub could have approached the Apache security team so >> the NetBeans PMC has a reply to this. >> >> It would be trivial to push a check for that cache.dat file but it's not >> the role of the IDE to play at being an antivirus. >> >> --emi >> >> sâm., 30 mai 2020, 14:03 Geertjan Wielenga a scris: >> >>> >>> It seems to me like we should put out a blog entry with some response to >>> this. Just so that we have a central point to refer to when people ask >>> about this. >>> >>> However, I have no idea what that blog entry should say, beyond “if >>> someone wants to do so, they can inject malware into the build process of >>> software, here’s an example of how they can do that”, and then point to >>> that report. >>> >>> Gj >>> >>> On Sat, 30 May 2020 at 12:08, Emma Atkinson >>> wrote: >>> >>>> Should someone from the Apache Netbeans governing team, approach >>>> Microsoft for information on this matter? >>>> >>>> I would have thought Microsoft GitHub would welcome any approach that >>>> might go some way toward tackling the problem. Knowing details should >>>> enable the Netbeans and NetbeansIDE communities to help. It would also be >>>> good for the public to know Apache Netbeans takes these matters as >>>> seriously as Oracle would have done. Be on the front foot. >>>> >>>> This might be a matter of reducing risk rather than eliminating a >>>> vulnerability. Any fix may not involve much effort. Perhaps a written or >>>> updated guide might be all that is needed. If the contaminated accounts >>>> belong to computer science students, perhaps some changes to Apache >>>> Netbeans IDE defaults, or added warnings would help users avoid inadvertent >>>> contamination of their code or build environments from untrusted origins. A >>>> general lesson in good practice perhaps. >>>> >>>> Emma >>>> >>>> >>>> On Sat, 30 May 2020, 09:32 Emilian Bold, >>>> wrote: >>>> >>>>> I'm leaning towards this being a student project honestly. Why would a >>>>> company developing a legacy project grab random unknown Ant-based >>>>> projects from GitHub? >>>>> >>>>> But NetBeans is used a lot for teaching and I suspect teachers don't >>>>> introduce Maven / Gradle since they are more complex and they use the >>>>> default Ant-based build system. >>>>> >>>>> So, if a smart student wants to troll his fellow students it does >>>>> something like this. >>>>> >>>>> Note that G
Re: Netbeans and malware article
Should someone from the Apache Netbeans governing team, approach Microsoft for information on this matter? I would have thought Microsoft GitHub would welcome any approach that might go some way toward tackling the problem. Knowing details should enable the Netbeans and NetbeansIDE communities to help. It would also be good for the public to know Apache Netbeans takes these matters as seriously as Oracle would have done. Be on the front foot. This might be a matter of reducing risk rather than eliminating a vulnerability. Any fix may not involve much effort. Perhaps a written or updated guide might be all that is needed. If the contaminated accounts belong to computer science students, perhaps some changes to Apache Netbeans IDE defaults, or added warnings would help users avoid inadvertent contamination of their code or build environments from untrusted origins. A general lesson in good practice perhaps. Emma On Sat, 30 May 2020, 09:32 Emilian Bold, wrote: > I'm leaning towards this being a student project honestly. Why would a > company developing a legacy project grab random unknown Ant-based > projects from GitHub? > > But NetBeans is used a lot for teaching and I suspect teachers don't > introduce Maven / Gradle since they are more complex and they use the > default Ant-based build system. > > So, if a smart student wants to troll his fellow students it does > something like this. > > Note that GitHub has the full logs of who uploaded, downloaded, > visited and cloned those 26 projects but made no remarks about them. I > think those logs would be highly informative as to source and the > target domain / country. My money is on students from India / China / > Greece / Brazil. > > --emi > > On Fri, May 29, 2020 at 11:50 PM Alan > wrote: > > > > The odds that a virus scanner would have a pattern for something like > this are very low indeed, so in this specific case I doubt it would make a > difference. However, excluding paths for any reason leaves an aperture open > that could be exploited. > > > > The targeted attacks I've seen are amazingly specific. For example, > someone profiled a customer site looking for the queries with the slowest > response time, then launched requests against those pages at a rate low > enough to not trigger DDoS protection on the network firewall, but to bring > the site down anyway. > > > > This malware has the hallmarks of such a specific attack. Scan the end > product for open source components, then infect the components, get in, get > the code, go away. Not something your general antivirus software is ever > going to even notice. > > > > On 2020-05-29 16:32, Juan Algaba wrote: > > > > I wonder if excluding netbeans from antivirus scanning (for performance > reasons), but not the project folders, make you more at risk to something > like this? > > > > On Fri, May 29, 2020 at 12:40 PM Alan > wrote: > >> > >> The malware is oddly focused. I suspect a specific group was being > targeted. If eventually GitHub releases the project names that might > provide a clue. > >> > >> On 2020-05-29 15:30, Emilian Bold wrote: > >> > >> so I guess this is all just about me. :-) > >> > >> Hehe. > >> > >> Still, they worked too much to target Ant and NetBeans. I think the > >> Gradle wrapper is a much easier target and developers will run > >> ./gradlew without a 2nd tought. > >> > >> --emi > >> > >> On Fri, May 29, 2020 at 10:25 PM Geertjan Wielenga > wrote: > >> > >> Sure, those are simply Ant files. > >> > >> I also wonder about the 26 open source projects they refer to on > GitHub, without naming them, where this problem was encountered. I have > about that number of NetBeans projects in my GitHub repo, so I guess this > is all just about me. :-) > >> > >> Gj > >> > >> On Fri, 29 May 2020 at 21:22, Scott Palmer wrote: > >> > >> The malware explicitly targets NetBeans: > >> > >> The malware is capable of identifying the NetBeans project files and > embedding malicious payload both in project files and build JAR files. > Below is a high -evel description of the Octopus Scanner operation: > >> > >> • Identify user's NetBeans directory > >> • Enumerate all projects in the NetBeans directory > >> • Copy malicious payload cache.dat to nbproject/cache.dat > >> • Modify the nbproject/build-impl.xml file to make sure the malicious > payload is executed every time NetBeans project is build > >> • If the malicious payload is an instance of the Octopus Scanner itself > the newly built JAR file is also infected. > >> > >> > >> > >> Though they did also mention: > >> > >> "If malware developers took the time to implement this malware > specifically for NetBeans, it means that it could either be a targeted > attack, or they may already have implemented the malware for build systems > such as Make, MsBuild, Gradle and others as well and it may be spreading > unnoticed," GitHub added. > >> > >> > >> I’m not sure if there is any sort of sanity check NB can do to the > cache.dat file to
Re: Netbeans long pauses
One thought crossed my mind. If you haven't done so already, it might be worthwhile examining the command that starts Netbeans IDE. I used to have wierd trouble I didn't understand. After some experimenting, I thought it was due to the build of the jdk in the distro I was using. It's now a habit to override the default. Basically, I set up the application launch menu item to use the -jdk-home=xx option when launching to pick my preferred jdk and make certain I'm not using the distro's default jdk build. It's one fewer unknowns. I've not had wierd trouble for many years. I use KDE. I'm not sure how to modify application launch commands under Gnome. Emma On Tue, 12 May 2020, 15:13 Bayless Kirtley, wrote: > I'll try 11.3 then. > > Bayless > > > On 5/11/20 9:08 PM, Laszlo Kishalmi wrote: > > Try with NetBeans 11.3. 11.1 is not supported any more. > > > > > > On 5/11/20 6:04 PM, Bayless Kirtley wrote: > >> Surely there is a better answer than that. I just spent a week > >> getting everything running like I want. Everything except Netbeans > >> works perfectly, including all my Java programs. I really like the > >> new desktop too. Surely Netbeans should work with the currently most > >> popular distro of Linux. > >> > >> Bayless > >> > >> > >> On 5/11/20 3:34 PM, John G. Weed wrote: > >>> I had this problem and got so frustrated that I eventually moved off > >>> of Mint entirely. I now run Ubuntu. If I ran Netbeans and forgot to > >>> exit the application before logging off, I was almost 100% > >>> guaranteed that I wold have to reboot the computer to get back in. > >>> There wasn't a single day that wouldn't require a reboot from a hung > >>> system. Netbeans and Mint are allergic to each other for some > >>> reason. Best I could figure was a Java problem. It all was for the > >>> best anyway, as Ubuntu is much more stable and after 13 months I've > >>> not had a Netbeans required reboot once. Bottom line, migrate off of > >>> Mint > >>> > >>> Sincerely, > >>> > >>> John .G Weed > >>> Sr. Systems Architect/Programmer Analyst @ Cicero Systems, LLC > >>> *"Reason. Resolve. Respond"* > >>> (571) 277-9998 > >>> www.linkedin.com/in/john-weed-28378a161 > >>> > >>> *"Steal a man's reputation for probity, and the more shrewd and > >>> clever he is, the more hated and mistrusted he'll become." *Marcus > >>> Tullius Cicero (106BC-43BC) > >>> > >>> *Confidentiality Notice:* The information contained in this > >>> electronic transmission is privileged and confidential and is > >>> intended only for the recipient(s) named above. If the reader of > >>> this message is not the recipient(s) named above, or an authorized > >>> agent of such recipient(s) responsible for delivering it to the > >>> intended recipient(s), you are hereby notified that you have > >>> received this electronic transmission in error. Any review, > >>> dissemination, distribution, or copying of this electronic > >>> transmission including any attachments is strictly prohibited. If > >>> you have received this electronic transmission in error, please > >>> notify the sender immediately. > >>> > >>> On Mon, May 11, 2020, at 16:26, Bayless Kirtley wrote: > After installing Netbeans 11.1 on Linux Mint 19.3, it has a nasty > habit > of suddenly locking up. It seems to be the whole computer. This > happens > pretty regularly when trying to do a simple refactor, renaming a > variable. It also happens but less often when just editing or typing > code. These pauses always seem to last between 30 and 60 seconds. This > really makes it virtually unusable. On the refactor, it always happens > even before accepting the new name so it has not actually started > renaming yet. These are small Java desktop projects of a dozen or so > classes and usually only one or two projects open at a time so no more > than 2 or 3000 lines. I assume I have something wrong but no idea > where > to start looking. Any help will be greatly appreciated. > > Bayless > > > > - > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org > For additional commands, e-mail: users-h...@netbeans.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > > >>> - > >>> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org > >>> For additional commands, e-mail: users-h...@netbeans.apache.org > >>> > >>> For further information about the NetBeans mailing lists, visit: > >>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > >>> > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org > >> For additional
Bower Deprecated for New Projects
I have been setting up Netbeans IDE 11.3 to have a go at developing a small JavaScript project. I followed the HTML/JS tutorial steps. When I went to set up Bower, the website said it was deprecated for new projects and directed me to Yarn, Webpack and Parcel. There was also a link to migrating away from bower. I didn't find a JIRA ticket to examine this matter. I have absolutely no idea what might be involved in moving away from Bower.io. I failed to set up Netbeans IDE with Yarn probably because I really don't know what I am doing in this regard, just experimenting. Is this matter already in hand? Should I raise a JIRA ticket? If so, would you agree that as Bower continues to be maintained for now it is of low priority? Emma
Re: JJazzLab : a music application based on the Netbeans Platform
Hi Jerome I like the look and fancy giving it a spin. (My MIDI programs don't evolve pass the prototype stage, I'm sorry to say). I didn't find system requirements on your website. Is your program compatible with a 32-bit JRE? Are you particularly seeking Windows users or would feedback using other 32 bit Linux on a old netbook be helpful too? Emma On Sat, 5 Oct 2019, 08:37 Jerome Lelasseux, wrote: > Thanks. I did some googling and checked the GlobalSign website, I only > found a free SSL certificate (for website), not for code signing. I also > found Certum which does "cheap" code signing for open source projects, but > it's the entry-level certificate, not the EV level certificate. > > Le samedi 5 octobre 2019 à 01:03:00 UTC+2, Emilian Bold < > emilian.b...@gmail.com> a écrit : > > > Don't know what the proper channel is (Twitter?) but GlobalSign gives > away free EV code signing certificates for open-source > software/developers. > > --emi > > On Sat, Oct 5, 2019 at 12:57 AM Jerome Lelasseux > wrote: > > > > Dear Netbeans family, > > > > After many many (too many) evenings and week-ends spent learning and > coding, I'm proud to make the 1st release of my free music application > based on the Netbeans Platform. > > > > It's here: https://www.jjazzlab.com (NOT www.jazzlab.com !) > > > > If you're a musician and practice your instrument using backing tracks > (maybe with apps like Band in a box or iReal Pro, or with backing tracks > from YouTube), then you might be interested to try, and I would love to get > your feedback (and bug reports!). > > > > If you're not a musician but you're a Windows user, you can also help in > 2 minutes: just download and install the app, then deinstall. You will > probably get a Windows Smart Screen alert, don't worry, click on the "more > info" text and you'll see the "Run Anyway" button. Explanations below. > > > > > > Windows Smart Screen problem: > > Although I spent 80$ buying a 1 year code signing certificate from > DigiCert, my installer is still blocked by Windows Smart Screen because > Microsoft security servers don't have enough data (=people downloading the > app and successfully installing it on Windows) to assess my installer's > "reputation". So it's a chicken and egg problem : I need many people to > install my app to remove the blocking by Windows, but Windows scares most > people to do so ! I was recommended one solution: buy the 600$/year EV code > signing certificate, obviously I would prefer to avoid this solution for a > software I provide for free... > > > > Of course don't hesitate to forward the link to your musician friends, > or add a link to www.jjazzlab.com. > > > > Thank you > > > > Jerome > > > > > - > 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: property 'do.jlink.internal' not set
SOLVED I have solved the problem. There may be a minor bug to be addressed depending on one's view about reducing the likelihood of users making avoidable mistakes.. If one create a non-modular application the Netbeans Ant scripts skip generating the jlink image. This makes sense as jlink images need to select the modules used by the application to avoid drawing in the whole JRE. I suggest the minor bug was that a non-modular application allowed the user to check the Create jlink box on without a warning. I do not know if detecting whether the application has a modular structure in a reliable manner is particularly easy. Could it be as simple as displaying a warning recommending the user converts the application into a modular application if the Create jlink box is enabled but no module-info.java file? Regards Emma On Thu, 18 Jul 2019 at 11:38, Emma Atkinson wrote: > Hello > I do not know if this is a bug. I have checked JIRA and nothing appeared > to me. > > I am using Product Version: Apache NetBeans IDE 11.0 (Build > incubator-netbeans-release-404-on-20190319) on JDK-11. > > Create New Project > Select "Java with Ant > Select "Java Application" > Accept all defaults and tick box "Create Main Class" > Go to Project Properties > Build > Packaging > Enable the box "Create JLINK distribution" > Enable "Create Launcher" > Click OK to save properties. > Using RMB select "Clean and Build" > The Output window shows > > To run this application from the command line without Ant, try: > /usr/java/jdk-11/bin/java -cp > /home/emma/NetBeansProjects/JavaApplication28/dist/JavaApplication28.jar > javaapplication28.JavaApplication28 > -init-macrodef-copylibs: > creating macro http://www.netbeans.org/ns/j2se-project/3:copylibs > -do-jar-copylibs: > Skipped because property 'do.mkdist' not set. > -do-jar-delete-manifest: > Deleting /home/emma/NetBeansProjects/JavaApplication28/build/null939241021 > -do-jar-without-libraries: > -do-jar-with-libraries: > -post-jar: > -do-jar: > -pre-deploy: > -check-jlink: > > > *-do-deploy:Skipped because property 'do.jlink.internal' not > set.-post-deploy:* > deploy: > jar: > BUILD SUCCESSFUL (total time: 0 seconds) > > The build script does not build a jlink image. > I cannot find property* 'do.jlink.internal' *anywhere. > > I have built a jlink image successfully in one of the previous Netbeans > versions but cannot recall how I did it. > > Any clues on investigating this matter would be appreciated. > > Thank you. > > > > > >
property 'do.jlink.internal' not set
Hello I do not know if this is a bug. I have checked JIRA and nothing appeared to me. I am using Product Version: Apache NetBeans IDE 11.0 (Build incubator-netbeans-release-404-on-20190319) on JDK-11. Create New Project Select "Java with Ant Select "Java Application" Accept all defaults and tick box "Create Main Class" Go to Project Properties > Build > Packaging Enable the box "Create JLINK distribution" Enable "Create Launcher" Click OK to save properties. Using RMB select "Clean and Build" The Output window shows To run this application from the command line without Ant, try: /usr/java/jdk-11/bin/java -cp /home/emma/NetBeansProjects/JavaApplication28/dist/JavaApplication28.jar javaapplication28.JavaApplication28 -init-macrodef-copylibs: creating macro http://www.netbeans.org/ns/j2se-project/3:copylibs -do-jar-copylibs: Skipped because property 'do.mkdist' not set. -do-jar-delete-manifest: Deleting /home/emma/NetBeansProjects/JavaApplication28/build/null939241021 -do-jar-without-libraries: -do-jar-with-libraries: -post-jar: -do-jar: -pre-deploy: -check-jlink: *-do-deploy:Skipped because property 'do.jlink.internal' not set.-post-deploy:* deploy: jar: BUILD SUCCESSFUL (total time: 0 seconds) The build script does not build a jlink image. I cannot find property* 'do.jlink.internal' *anywhere. I have built a jlink image successfully in one of the previous Netbeans versions but cannot recall how I did it. Any clues on investigating this matter would be appreciated. Thank you.
Re: Integration tests in NetBeans and module-info
I too searched for a solution in my case with TestNG. I did not want to contaminate the module.info with test lines that had to be edited out once testing was passed successfully. Defeats one object of black box integration testing adding a risk that an inadvertent change crept in. My solution was to put TestNG on the classpath until I find something better. Other potential solutions I thought of involve changing the build scripts to accommodate a "test" module.info file under the test hierarchy or a module.info delta file for testing. Some sort of flag in the module file to indicate a "for testing" annotation would be another way, I suppose. These are not great either. I am surprised this wasn't considered when Oracle introduced modules into JDK-9. May be it was. So I stand ready to be corrected. Emma On 10:27, Tue, 2 Jul 2019 Alex Sviridov Hi all, > > I use NB 11.0 and I work on JPMS module with integrations tests. My folder > structure is like this: > . > |-- pom.xml > `-- src > |-- it > | `-- java > | `-- com > | `-- soebes > | `-- maui > | `-- it > | `-- BitMaskIT.java > |-- main > | `-- java > | `-- com > | `-- soebes > | `-- maui > | `-- it > | `-- BitMask.java > `-- test > `-- java > `-- com > `-- soebes > `-- maui > `-- it > `-- BitMaskTest.java > > The problem is NB wants JUnit modules for integrations tests to be > declared in module-info. > Otherwise it shows errors. At the same time code all execution tests are > compiled and > run without problems. Could anyone say how to fix it? > > > -- > Best regards, Alex Sviridov >
Re: Netbeans 11.0-vc4 with a Java EE project (Dataverse)
Phil I think the error dialog saying Feature FeatureInfo[java] is incomplete: some module(s) are missing: org\.netbeans\.libs\.javafx\.(linux|win|macosx) might be caused by running on JDK8. When I used the option *--jdkhome * to specify jdk-11 (*please check the release notes for the right one*) the error did not appear. Regards Emma On Thu, 28 Mar 2019 at 15:19, Philip Durbin wrote: > Hi! I just filled out the survey (late, please give us more notice next > time) and I have a little feedback that I'd like to share here for a couple > reasons: > > - From my perspective, the survey goes into a black hole. If there is any > transparency about what responses have been recorded so far, I don't know > where to find them. If they're available, I'm interested in them. > - The survey didn't allow me to enter any comments. It's all multiple > choice. I have more I would have said in the survey. But maybe that's what > mailing lists are for. :) > > So here we go. > > I've been feeling "stuck" on Oracle NetBeans 8.2 for a long time because > of the lack of Java EE support in Apache NetBeans. The guy at the desk to > me got our Java EE project (Dataverse) working in NetBeans 9 but I didn't > have such a good time with NetBeans 10. > > I'm thrilled to say that this morning I got NetBeans 11 working with our > Java EE project. I'm no longer stuck on 8.2. THANK YOU! > > However, not all is well. Being open source, we try to onboard as many new > contributors as possible to our project and if you follow our dev guide as > it appears now (4.11 for my reference), your first experience with NetBeans > 11 and our project is that it says "(broken)" next to the project name in > the Projects tab. (Screenshot attached.) If you right-click the project and > click "Resolve Problems", this is the error you see: > > Feature FeatureInfo[java] is incomplete: some module(s) are missing: > org\.netbeans\.libs\.javafx\.(linux|win|macosx) > > We don't use JavaFX in our project so it's a very strange error. > > Next I clicked "Help" and then "Online Docs and Support". These show docs > for NetBeans 10 with no mention that I could find of what Java EE > developers are suppose to do. If there are new docs for NetBeans 11 that > you'd like us to look at before you release, please let us know. > > From previous attempts to get our project running on anything newer than > NetBeans 8.2 I knew that I should check out which plugins are installed and > enabled. I don't expect our contributors to know this so I just made a pull > request to improve our dev guide to explain how to go from "broken" to a > Java EE project. > > After activating "Java Web and EE", there is no green checkmark in the > Active column. Some new menu items appear but "clean and build" still isn't > available. I restarted NetBeans and explain this step in my pull request: > > https://github.com/IQSS/dataverse/pull/5695 > > In case it helps, I'm on Mac OS X 10.14.3. > > In my pull request I didn't document how to launch NetBeans but maybe I > should since a lot of our contributors are new developers, sometimes > college students, who may not be very familiar with the command line. I > doubt anyone here needs this (and you probably have better ways) but I'll > include my little script below since it's on my mind: > > #!/bin/sh > VERSION='11.0-vc4' > BIN="$HOME/java/netbeans/$VERSION/netbeans/bin/netbeans" > echo "Launching Netbeans from $BIN" > $BIN & > > I guess the other thing I'll mention is that my pull request also includes > the workaround to get the Netbeans Connector Chrome Extension working. > > Finally, I've already given a little feedback on the survey itself, about > how I was confused that you don't let your participants type anything > (multiple choice only) but I'm new to your process. The other specific > thing is that I would have appreciate an "I don't know" option for the > question about performance of NetBeans 10 vs 11. > > Thanks for reading all this! I hope it's helpful! Again, I really > appreciate that Java EE support has been restored and that I'm no longer > feeling held back on old versions of Oracle NetBeans. Thank you! > > Phil > > -- > Philip Durbin > Software Developer for http://dataverse.org > http://www.iq.harvard.edu/people/philip-durbin > > > - > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org > For additional commands, e-mail: users-h...@netbeans.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Netbeans ant build script not finding Log4j2 V2.11.1 module-info.class
Hey guys, What a lovely surprise! I was just about to begin working out the command line options. I'll take a look at the pull request to see if I can learn something. Thank you (Denk u wel) Emma On 08:11, Thu, 4 Oct 2018 Geertjan Wielenga, wrote: > https://github.com/apache/incubator-netbeans/pull/941 > > We've identified the problem and done work on fixing it. > > Gj > > On Wed, Oct 3, 2018 at 1:55 PM Emma Atkinson > wrote: > >> I will try without using Netbeans but I do not have time to work on this >> until tomorrow. >> Thank you for devoting your time to helping me solve this. >> >> Emma >> >> >> On Wed, 3 Oct 2018 at 12:29, Geertjan Wielenga < >> geertjan.wiele...@googlemail.com> wrote: >> >>> Well, I'd suggest to first get it to work without any tooling at all. >>> I.e., forget NetBeans for the moment and use the command line to set up a >>> simple Java 9 multi-release app that makes use of Log4J. Possibly the >>> problem is with Log4J and that's what you can find out by creating such an >>> application and for help you could join the Log4J mailing list. I.e., if >>> something doesn't work outside NetBeans it won't work within NetBeans >>> either. >>> >>> Gj >>> >>> >>> On Wed, Oct 3, 2018 at 1:13 PM Emma Atkinson >>> wrote: >>> >>>> Screenshot.png shows how I have set up Netbeans. I think you can see >>>> everything. >>>> >>>> I normally use the *import* org.apache.logging.log4j.Logger and >>>> *import* org.apache.logging.log4j.LogManager. The Log4j2 >>>> module-info.class file exports *org.apache.logging.log4j*. >>>> >>>> I have committed a version of the test case with the word logging >>>> deleted. And then returned it to what I think is correct in the subsequent >>>> commit. >>>> I have tried it every way, with and without the classpath entries. BTW >>>> adding a jar to both the modulepath and classpath has been a bit hit and >>>> miss (ignoring adding log4j-api.jar if it is already on the modulepath) so >>>> I used a Library entry for the module path and explicitly added the jars to >>>> the classpath. >>>> >>>> Adding the classpath entries with >>>> *import* org.apache.logging.log4j.Logger >>>> *import* org.apache.logging.log4j.LogManager >>>> >>>> means the editor finds the classes Logger and LogManager as you would >>>> expect. >>>> The Compile File error message is that it cannot find the module >>>> log4j.api. >>>> https://github.com/cosmiczoo/Log4j2TestCase latest commit is as close >>>> as I can get. >>>> >>>> >>>> On Wed, 3 Oct 2018 at 11:15, Geertjan Wielenga >>>> wrote: >>>> >>>>> I also see this on https://logging.apache.org/log4j/2.0/download.html: >>>>> >>>>> To use Log4j 2 in your application make sure that both the API and >>>>> Core jars are in the application’s classpath. Add the dependencies listed >>>>> below to your classpath. >>>>> >>>>> >>>>>1. log4j-api-2.11.1.jar >>>>>2. log4j-core-2.11.1.jar >>>>> >>>>> >>>>> >>>>> In short, we need instructions for how exactly to set up the project >>>>> to match the environment that you have. >>>>> >>>>> Gj >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Wed, Oct 3, 2018 at 12:11 PM Geertjan Wielenga < >>>>> geertjan.wiele...@googlemail.com> wrote: >>>>> >>>>>> Shouldn't the import statements be this: >>>>>> >>>>>> import org.apache.log4j.LogManager; >>>>>> import org.apache.log4j.Logger; >>>>>> >>>>>> ...and not this: >>>>>> >>>>>> import org.apache.logging.log4j.LogManager; >>>>>> import org.apache.logging.log4j.Logger; >>>>>> >>>>>> ...if you're using log4j-1.2-api-2.11.1.jar? >>>>>> >>>>>> Gj >>>>>> >>>>>> >>>>>> On Wed, Oct 3, 2018 at 11:56 AM Emma Atkinson < >>>>>> emma.atkins...@gmail.com> wrote: >>>>>> >>>>>>> I cannot find a way
Re: Netbeans ant build script not finding Log4j2 V2.11.1 module-info.class
I will try without using Netbeans but I do not have time to work on this until tomorrow. Thank you for devoting your time to helping me solve this. Emma On Wed, 3 Oct 2018 at 12:29, Geertjan Wielenga < geertjan.wiele...@googlemail.com> wrote: > Well, I'd suggest to first get it to work without any tooling at all. > I.e., forget NetBeans for the moment and use the command line to set up a > simple Java 9 multi-release app that makes use of Log4J. Possibly the > problem is with Log4J and that's what you can find out by creating such an > application and for help you could join the Log4J mailing list. I.e., if > something doesn't work outside NetBeans it won't work within NetBeans > either. > > Gj > > > On Wed, Oct 3, 2018 at 1:13 PM Emma Atkinson > wrote: > >> Screenshot.png shows how I have set up Netbeans. I think you can see >> everything. >> >> I normally use the *import* org.apache.logging.log4j.Logger and *import* >> org.apache.logging.log4j.LogManager. The Log4j2 module-info.class file >> exports *org.apache.logging.log4j*. >> >> I have committed a version of the test case with the word logging >> deleted. And then returned it to what I think is correct in the subsequent >> commit. >> I have tried it every way, with and without the classpath entries. BTW >> adding a jar to both the modulepath and classpath has been a bit hit and >> miss (ignoring adding log4j-api.jar if it is already on the modulepath) so >> I used a Library entry for the module path and explicitly added the jars to >> the classpath. >> >> Adding the classpath entries with >> *import* org.apache.logging.log4j.Logger >> *import* org.apache.logging.log4j.LogManager >> >> means the editor finds the classes Logger and LogManager as you would >> expect. >> The Compile File error message is that it cannot find the module >> log4j.api. >> https://github.com/cosmiczoo/Log4j2TestCase latest commit is as close as >> I can get. >> >> >> On Wed, 3 Oct 2018 at 11:15, Geertjan Wielenga >> wrote: >> >>> I also see this on https://logging.apache.org/log4j/2.0/download.html: >>> >>> To use Log4j 2 in your application make sure that both the API and Core >>> jars are in the application’s classpath. Add the dependencies listed below >>> to your classpath. >>> >>> >>>1. log4j-api-2.11.1.jar >>>2. log4j-core-2.11.1.jar >>> >>> >>> >>> In short, we need instructions for how exactly to set up the project to >>> match the environment that you have. >>> >>> Gj >>> >>> >>> >>> >>> >>> On Wed, Oct 3, 2018 at 12:11 PM Geertjan Wielenga < >>> geertjan.wiele...@googlemail.com> wrote: >>> >>>> Shouldn't the import statements be this: >>>> >>>> import org.apache.log4j.LogManager; >>>> import org.apache.log4j.Logger; >>>> >>>> ...and not this: >>>> >>>> import org.apache.logging.log4j.LogManager; >>>> import org.apache.logging.log4j.Logger; >>>> >>>> ...if you're using log4j-1.2-api-2.11.1.jar? >>>> >>>> Gj >>>> >>>> >>>> On Wed, Oct 3, 2018 at 11:56 AM Emma Atkinson >>>> wrote: >>>> >>>>> I cannot find a way to make this work, I hope you can help. I should >>>>> be happy to be pointed to an existing answer >>>>> >>>>> *The Problem* >>>>> I have a very simple Java application demonstrating the problem I am >>>>> having with using the latest Log4j2 V2.11.1 as a module (log4j.api) and >>>>> building it in Netbeans. The example compiles, builds and runs when I use >>>>> the classpath, but cannot compile the module-info.java file when I use the >>>>> modulepath. I have uploaded the code and Netbeans files at the following >>>>> link: >>>>> >>>>> https://github.com/cosmiczoo/Log4j2TestCase >>>>> >>>>> Log4j2 V2.11.1 is a Multi-release JAR (MR-JAR). The module-info.class >>>>> file is in log4j-api-2.11.1.jar under the folder META-INF/versions/9, >>>>> which >>>>> seems correct. >>>>> >>>>> The Netbeans editor can see the module log4j.api because it appears in >>>>> the drop-down menu of completion suggestions and does not have wiggly red >>>>> line under it. My simple test program
Netbeans ant build script not finding Log4j2 V2.11.1 module-info.class
To recreate the test case and Netbeans set up. - I created a Java Application using the new project function. I set it up to run on JDK 10. - I added a module-info.java file using a RMB on Project Navigator > Log4j2TestCase > Source Packages > New > Java Module Info... - I created a Library entry (named Apache Log4j2 2.11) that refers to the log4j-api-2.11.1.jar via Tools > Libraries pressing New Library... button. I only added the one jar, no javadoc, no sources. - Using a RMB on the Project Navigator > Log4j2TestCase > Libraries > Add Library... I added the Library entry named Apache Log4j2 2.11. - Using a RMB on the Project Navigator > Log4j2TestCase > Libraries > Add JAR/Folder ... I added a separate reference to log4j-api-2.11.1.jar and log4j-core-2.11.1.jar. Netbeans put the log4j-core-2.11.1.jar on the modulepath and added a line to my module-info.java. - RMB on Project Navigator > Log4j2TestCase selected Properties > Libraries. I moved the reference to the jar files down into the classpath. - I edited the module-info.java file to delete the automatically added line * requires *org.apache.logging.log4j.core*;* - I added two import statements to the Log4j2TestCase.java (containing the main entry point) * import* org.apache.logging.log4j.LogManager; * import* org.apache.logging.log4j.Logger; As it stands Log4j will not find its configuration XML file so it will say that it is using default setting which means it output errors and above and suppresses messages that are warnings, info and debug. - I created an object called LOGGER. - I created a LOGGER.error("some text "); so that it would output to the console under default settings if it ran. But first we need to build the application. - Select the module-info.java file and using a RMB menu option to Compile File. The ant build script will run and eventually output an error message saying that it cannot find the module log4j.api. I hope this is comprehensive enough.
Re: Netbeans ant build script not finding Log4j2 V2.11.1 module-info.class
Screenshot.png shows how I have set up Netbeans. I think you can see everything. I normally use the *import* org.apache.logging.log4j.Logger and *import* org.apache.logging.log4j.LogManager. The Log4j2 module-info.class file exports *org.apache.logging.log4j*. I have committed a version of the test case with the word logging deleted. And then returned it to what I think is correct in the subsequent commit. I have tried it every way, with and without the classpath entries. BTW adding a jar to both the modulepath and classpath has been a bit hit and miss (ignoring adding log4j-api.jar if it is already on the modulepath) so I used a Library entry for the module path and explicitly added the jars to the classpath. Adding the classpath entries with *import* org.apache.logging.log4j.Logger *import* org.apache.logging.log4j.LogManager means the editor finds the classes Logger and LogManager as you would expect. The Compile File error message is that it cannot find the module log4j.api. https://github.com/cosmiczoo/Log4j2TestCase latest commit is as close as I can get. On Wed, 3 Oct 2018 at 11:15, Geertjan Wielenga wrote: > I also see this on https://logging.apache.org/log4j/2.0/download.html: > > To use Log4j 2 in your application make sure that both the API and Core > jars are in the application’s classpath. Add the dependencies listed below > to your classpath. > > >1. log4j-api-2.11.1.jar >2. log4j-core-2.11.1.jar > > > > In short, we need instructions for how exactly to set up the project to > match the environment that you have. > > Gj > > > > > > On Wed, Oct 3, 2018 at 12:11 PM Geertjan Wielenga < > geertjan.wiele...@googlemail.com> wrote: > >> Shouldn't the import statements be this: >> >> import org.apache.log4j.LogManager; >> import org.apache.log4j.Logger; >> >> ...and not this: >> >> import org.apache.logging.log4j.LogManager; >> import org.apache.logging.log4j.Logger; >> >> ...if you're using log4j-1.2-api-2.11.1.jar? >> >> Gj >> >> >> On Wed, Oct 3, 2018 at 11:56 AM Emma Atkinson >> wrote: >> >>> I cannot find a way to make this work, I hope you can help. I should be >>> happy to be pointed to an existing answer >>> >>> *The Problem* >>> I have a very simple Java application demonstrating the problem I am >>> having with using the latest Log4j2 V2.11.1 as a module (log4j.api) and >>> building it in Netbeans. The example compiles, builds and runs when I use >>> the classpath, but cannot compile the module-info.java file when I use the >>> modulepath. I have uploaded the code and Netbeans files at the following >>> link: >>> >>> https://github.com/cosmiczoo/Log4j2TestCase >>> >>> Log4j2 V2.11.1 is a Multi-release JAR (MR-JAR). The module-info.class >>> file is in log4j-api-2.11.1.jar under the folder META-INF/versions/9, which >>> seems correct. >>> >>> The Netbeans editor can see the module log4j.api because it appears in >>> the drop-down menu of completion suggestions and does not have wiggly red >>> line under it. My simple test program has a module-info.java file that >>> requires log4j.api and nothing else. This bit works as I would expect. >>> >>> >>> I have located an unanswered question on StackOverflow asking a similar >>> question >>> https://stackoverflow.com/questions/50568139/netbeans-java-9-modules-log4j-2-11-module-not-found >>> >>> >>> *To Reproduce My Test * >>> >>> I *Clean* the project. It completes successfully. >>> I then use a RMB option to *Compile File* the module-info.java file. >>> This generates an error pointing to the line *requires log4j.api* in my >>> module-info.java. >>> >>> /Log4j2TestCase/src/module-info.java:7: error: module not >>> found: log4j.api >>> requires log4j.api; >>> 1 error >>> ZipFileIndex clearCache failed >>> /Log4j2TestCase/nbproject/build-impl.xml:1131: The following >>> error occurred while executing this line: >>> /Log4j2TestCase/nbproject/build-impl.xml:358: Compile failed; >>> see the compiler error output for details. >>> at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1425) >>> at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1133) >>> at >>> org.netbeans.modules.java.source.ant.JavacTask.execute(JavacTask.java:120) >>> at >>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) >>> >>> and so on. Please let me know if you want more. >>> >>> I have tried building this program under JDK-9, JDK-10 and JDK-11. My >>> Netbeans runs on JDK-10. I am learning how to migrate to modules by trial, >>> error and reading. I may have made an error, but if I have, I don't know >>> where. >>> >>> Thanks in anticipation >>> >>> Emma >>> >>> >>> >>>
Netbeans ant build script not finding Log4j2 V2.11.1 module-info.class
I cannot find a way to make this work, I hope you can help. I should be happy to be pointed to an existing answer *The Problem* I have a very simple Java application demonstrating the problem I am having with using the latest Log4j2 V2.11.1 as a module (log4j.api) and building it in Netbeans. The example compiles, builds and runs when I use the classpath, but cannot compile the module-info.java file when I use the modulepath. I have uploaded the code and Netbeans files at the following link: https://github.com/cosmiczoo/Log4j2TestCase Log4j2 V2.11.1 is a Multi-release JAR (MR-JAR). The module-info.class file is in log4j-api-2.11.1.jar under the folder META-INF/versions/9, which seems correct. The Netbeans editor can see the module log4j.api because it appears in the drop-down menu of completion suggestions and does not have wiggly red line under it. My simple test program has a module-info.java file that requires log4j.api and nothing else. This bit works as I would expect. I have located an unanswered question on StackOverflow asking a similar question https://stackoverflow.com/questions/50568139/netbeans-java-9-modules-log4j-2-11-module-not-found *To Reproduce My Test * I *Clean* the project. It completes successfully. I then use a RMB option to *Compile File* the module-info.java file. This generates an error pointing to the line *requires log4j.api* in my module-info.java. /Log4j2TestCase/src/module-info.java:7: error: module not found: log4j.api requires log4j.api; 1 error ZipFileIndex clearCache failed /Log4j2TestCase/nbproject/build-impl.xml:1131: The following error occurred while executing this line: /Log4j2TestCase/nbproject/build-impl.xml:358: Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1425) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1133) at org.netbeans.modules.java.source.ant.JavacTask.execute(JavacTask.java:120) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) and so on. Please let me know if you want more. I have tried building this program under JDK-9, JDK-10 and JDK-11. My Netbeans runs on JDK-10. I am learning how to migrate to modules by trial, error and reading. I may have made an error, but if I have, I don't know where. Thanks in anticipation Emma
Multi Release JAR files
OK
Re: Multi Release JAR files
Geertjan, After a few false starts I have uploaded the simple test case for using a MR-JAR file as a module. The Git history shows it being used on the classpath fist then modified to use the modulepath. https://github.com/cosmiczoo/Log4j2TestCase Emma On Tue, 2 Oct 2018 at 15:15, Patrik Karlström wrote: > Thanks for that clarification! > > Den mån 1 okt. 2018 kl 15:03 skrev Geertjan Wielenga > : > >> Apache NetBeans has support for reading multi-release JARs. They can >> appear on the classpath (modulepath) and the correct types are used, though >> note there is (currently) no support for creating them. >> >> Below is where the reading of multi-release JARs is implemented: >> >> >> https://github.com/apache/incubator-netbeans/blob/master/java/java.source.base/src/org/netbeans/modules/java/source/parsing/CachingFileManager.java >> >> Gj >> >> >> >> On Sun, Sep 30, 2018 at 10:44 AM Patrik Karlström >> wrote: >> >>> Yes, that's where I got it from. :) Attended Nicolai's talk at jdays >>> this week and later found the netbeans related info above that got me >>> thinking of what I just could not find in the IDE. >>> I'll poke around in my pom then, thanks. >>> >>> >>> Den sön 30 sep. 2018 kl 10:08 skrev Geertjan Wielenga >>> : >>> There's nothing in there specifically about NetBeans, but about Maven -- I don't believe there's anything special done in this area in NetBeans itself, but that the support for this feature can be used via Maven. Gj On Sun, Sep 30, 2018 at 9:56 AM Geertjan Wielenga < geertjan.wiele...@googlemail.com> wrote: > This should help: > > > https://blog.codefx.org/tools/multi-release-jars-multiple-java-versions/ > > Gj > > On Sat, Sep 29, 2018 at 6:26 PM Patrik Karlström > wrote: > >> I just found out about Multi Release JAR files and began to look >> into it on my Apache NetBeans 9 installation. >> >> At http://wiki.netbeans.org/NetBeans_9 one can read >> >> >> NetBens 9 will be released from Apache Software Foundation as new >> Apache project. NetBeans is being donated to ASG by Oracle. NetBeans 9 >> main >> theme will be to support this upcoming Java SE 9 release. >> >>- ... >>- *Multi Release JAR files to be handled properly by NB Java >>Support* >> >> Did support for Multi Release JAR files made it to ANB9 and if so, >> how and where do find it/I set it up for my projects? Or was it a goal >> for >> NetBeans itself and I should handle it manually in my poms? >> >> /Patrik >> >
Start Page Blog
Hi The start page has news and a blog. The news feed looks fine. However, my NB9 thinks the blog is at http://planetnetbeans.org/?utm_source=netbeans_campaign=welcomepage I doubt others suffer this problem. I vaguely recall I edited one of the netbeans files many years ago (NB6 I think) after I found where it was defined - took me hours to find it, and seconds to alter. Thought no more about it. It should have been a temporary fix. I thought it was. How might I fix it? Thank you Emma