Re: Error while building the installers of a netbeans platform application
I've just migrated my RCP project to a Maven-based build, and fixing the installer bug was a bit more involved. To begin the migration, I constructed a maven nb platform project using the guide on https://platform.netbeans.org/tutorials/nbm-maven-quickstart.html. Note that adding child projects didn't work, I had to construct those projects by hand. The key thing is that your project will have an "-App" module whose pom has nbm-application and a plugin block like: deployment org.apache.netbeans.utilities nbm-maven-plugin 4.2-installBugfix extra autoupdate webstart-app build-installers when you do a 'mvn -Pdeployment install', it should build an installer for you, but you get the error about Java version 1.5 being to old. As described below, the problem is that there are two property files with bad properties in the ant-based build harness that need to be fixed. It turns out that the harness of ant scripts is now installed and run by the plugin, not using the harness installed with your netbeans installation, so you will have to fix the javac.{source,target}=1.5 bug in the plugin. (If you have an ant-based build system for your RCP, then fix the files in your nb installation as in the message included below). Instructions below are a hack, but they got me up and running: First: * Download nbm-maven-harness source from https://github.com/apache/netbeans-mavenutils-nbm-maven-harness/tree/nbm-maven-harness-11.0, unpack. * 'mvn install' to build the source. Edit the two project.properties files under "target" to fix the javac.* properties (use find, or see below for paths). * Edit the pom, change the version to 11.0-installBugfix. Disable the large block in the pom beginning: org.apache.maven.plugins maven-antrun-plugin ... . This will prevent the second build you are about to do from overwriting your fixes. * Run 'mvn install'. This installs a plugin with fixed harness files to your .m2 repository .m2\repository\org\apache\netbeans\utilities\nbm-maven-harness\11.0-installBugfix. Next: * Download nbm-maven-plugin source from https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin, unpack. * Go into pom, modify version to be 4.2-installBugfix, go to dependencies, change the version for nbm-maven-harness to 11.0-installBugfix. * Run 'mvn install', this installs the fixed plugin to .m2\repository\org\apache\netbeans\utilities\nbm-maven-plugin\4.2-installBugfix Finally: Go to the application pom for your Project (say MavenNBProject-app), and change the version of nbm-maven-plugin to 4.2-installBugfix. You should be able to build installers using the nbm-maven-plugin. On 8/21/2019 11:55 PM, Andreas Hauffe wrote: Hi, thanks for the hint. In my case I had to change the entries in two files: harness/nbi/stub/ext/components/products/helloworld/nbproject/project.properties harness/nbi/stub/ext/engine/nbproject/project.properties Now it is building the installers Andreas Am 21.08.19 um 17:17 schrieb William Reynolds: I ran into this a few weeks ago using Coolbeans: We have an RCP application that I was trying to create an installer for (right click the project, Package As->Installers). The build was failing with the following error: -do-compile: [mkdir] Created dir: C:\Users\wnreynolds\Desktop\Work\\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\empty [javac] Compiling 2 source files to C:\Users\wnreynolds\Desktop\Work\\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\classes [javac] error: Source option 5 is no longer supported. Use 6 or later. [javac] error: Target option 1.5 is no longer supported. Use 1.6 or later. I don't have a deep understanding of the build harness, but it looked like an empty application, helloworld, was being added to the installer, and the compile was failing it due to too low a javac.{source,target} specification. Setting javac.{source,target}=1.8 in my toplevel project.properties didn't fix the problem. Editing CoolBeans\harness\nbi\stub\ext\components\products\helloworld\nbproject\ project.properties and changing javac.source=1.8 javac.target=1.8 fixed the problem. I know folks are managing a lot of changes with the move to apache, and this is a little problem, but it should be simple to fix and will save others the couple of hours I took to track it down. Thanks for your work. FWiW, about my coolbeans: Product Version: CoolBeans IDE 2018.12 (Build coolbeans-9-on-20190221) Java: 11.0.2; OpenJDK 64-Bit Server VM 11.0.2+9 Runtime:
Re: How to generate Javadoc for a module suite ?
My answer to my own question. I think it's not optimal since it puts *all* of the platform JARs in the javadoc classpath. But it does the job. Content of an Ant target to be put in the module suite build.xml. --- Le mardi 17 septembre 2019 à 22:33:28 UTC+2, Jerome Lelasseux a écrit : Using the IDE I can generate a javadoc project by project (module by module). But how to do it on a module suite? Any help welcome. I tried adding an Ant target for this (reusing part of the PraxisLive build.xml) to do this but it does not work : I don't know how to get the -classpath parameters for the Ant javadoc command, i.e. retrieve the list of NB platform jars used by my code. I'm new to Ant and to the NB build harness...
Re: Fw: Problem in installing netbeans 11 on a computer with JDK 13
Does the netbeans installation was with the exe or the zip archive? The easy way is to specify the JDK in the netbeans.conf file located in /netbeans/etc/netbeans.conf. e.g. netbeans_jdkhome="/opt/jvm/zulu-13" El mié., 18 sept. 2019 a las 22:05, xog blog () escribió: > The netbeans 11 install program keeps complaining that it can't find JDK > 13 (both are the latest versions, downloaded and installed this morning). > To be sure, the name on the JDK executable was > "jdk-13_windows-x64_bin.exe", and it was downloaded from Oracle. > > I tried adding the JDK directory to my PATH variable from windows; I tried > running JDK from the command line with the path specified (using > --javahome). > > In all cases, the installer complains that the JDK was not found on this > computer. > > Any suggestions for troubleshooting this problem would be welcome. > > Paul >
Re: Appending data to file in a MemoryFileSystem.
But can't you construct a FileChannel from the FileOutputStream? I thought the question was how to seek on an output stream, which the example generates. On 9/19/2019 10:06 AM, Neil C Smith wrote: On Thu, 19 Sep 2019 at 17:03, William Reynolds wrote: From https://stackoverflow.com/questions/9558979/java-outputstream-skip-offset ... FileOutputStream out = new FileOutputStream(file); There is no File! ;-) Best wishes, Neil -- William Reynolds, Ph.D. Stellar Science, LLC wnreyno...@stellarscience.com www.stellarscience.com 877-763-8268 x710 (v) smime.p7s Description: S/MIME Cryptographic Signature
Re: Appending data to file in a MemoryFileSystem.
On Thu, 19 Sep 2019 at 17:03, William Reynolds wrote: > > From https://stackoverflow.com/questions/9558979/java-outputstream-skip-offset ... >FileOutputStream out = new FileOutputStream(file); There is no File! ;-) Best wishes, Neil - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Appending data to file in a MemoryFileSystem.
From https://stackoverflow.com/questions/9558979/java-outputstream-skip-offset |try{FileOutputStreamout =newFileOutputStream(file);try{FileChannelch =out.getChannel();ch.position(offset);ch.write(ByteBuffer.wrap(data));}finally{out.close();}}catch(IOExceptionex){// handle error}| On 9/19/2019 8:02 AM, Richard Linsdale wrote: Hopefully somebody can help direct me to a solution to this problem In a Netbeans plug-in which I am developing, I have created a MemoryFileSystem for storage of transient files. I now wish to add a feature to append data to an existing file (in the MemoryFileSystem), but I can't find a solution. If the file was in the OS file system, then I could use the FileUtils.toFile() method to get a and then use new FileWriter (, true) to create a writer with which I could append the data. As the file is in a MemoryFileSystem, use of FileUtils.toFile returns null, so it's not a route to follow. Use of .getOutputStream() returns a valid outputstream, but is positioned at the start of the file and will therefore overwrite the existing data. Any suggestions welcome, as I want to avoid copying the existing file content to a new file on every append request and then renaming the file (which is my probably short term fall back). In the longer-term, it would be nice to have .getOutputStream(boolean append) as a extension to the API, but that can come later. regards Richard - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists -- William Reynolds, Ph.D. Stellar Science, LLC wnreyno...@stellarscience.com www.stellarscience.com 877-763-8268 x710 (v) smime.p7s Description: S/MIME Cryptographic Signature
Re: Appending data to file in a MemoryFileSystem.
On Thu, 19 Sep 2019 at 15:04, Richard Linsdale wrote: > Any suggestions welcome, as I want to avoid copying the existing file > content to a new file on every append request and then renaming the file > (which is my probably short term fall back). The MemoryFileSystem is quite simple, and everything is backed by a byte[]. What about reading the existing contents with asBytes() and then writing that into the output stream? Not much different mind you! > In the longer-term, it would be nice to have > .getOutputStream(boolean append) as a extension to the API, > but that can come later. Does it have to be a NetBeans filesystem? I've seen some NIO2 memory file systems which have this feature (although are probably doing just the same thing under the hood). Best wishes, Neil - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: JavaFX deployment library not found in active JDK
Hi, Chris -- Thank you! I will try to follow this model as I move into Maven. -- 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
Appending data to file in a MemoryFileSystem.
Hopefully somebody can help direct me to a solution to this problem In a Netbeans plug-in which I am developing, I have created a MemoryFileSystem for storage of transient files. I now wish to add a feature to append data to an existing file (in the MemoryFileSystem), but I can't find a solution. If the file was in the OS file system, then I could use the FileUtils.toFile() method to get a and then use new FileWriter (, true) to create a writer with which I could append the data. As the file is in a MemoryFileSystem, use of FileUtils.toFile returns null, so it's not a route to follow. Use of .getOutputStream() returns a valid outputstream, but is positioned at the start of the file and will therefore overwrite the existing data. Any suggestions welcome, as I want to avoid copying the existing file content to a new file on every append request and then renaming the file (which is my probably short term fall back). In the longer-term, it would be nice to have .getOutputStream(boolean append) as a extension to the API, but that can come later. regards Richard - To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists