Javafx 8 NetBeans titlebar icon with native packaging - netbeans

I need some help with NetBeans and a JavaFX project
When I try to install an icon in the title bar of a Windows 7
Desktop application it will not show up
Here are the steps I have used to create and EXE file
Main Class adds the icon with this line of code that works in Eclipse
pStage.getIcons().add(new Image(“file:src/Photos/C.ico”));
Inno Setup 5.0 installed and in Path
the icon is 32 by 32 and 32 bit depth it was created with GreenFish Icon maker
the icon is under Source Package in a folder named Photos
right click project select Properties select Deployment
check Enable Native Packaging
set the path to the icon for Native Package Icons
src/Photos/C.ico
Run Clean and Build
Run Package As EXE
The only other concern I have is this output message
No base JDK Package will use system JRE
I see this as a separate issue so as a bonus question
can I ask for help with how to include the JDK or JRE
so this application is independent of what JRE if any
is installed on the end user machine.
A side note during development if I use C.bmp
in place of the ico file the title bar will display
the bmp. The bmp file will not work at build time.

#James_Duh I have no idea why this works and I doubt you find this FIX anywhere else as I searched the net for why you need to use a bmp and ico file
Here is what I did with NetBeans 8.0.? and JDK1.8.0_51 on Windows 7
in the Main.class I used this line of code
Image ico = new Image("Photos/C.bmp"); NetBeans
Image ico = new Image("file:Photos/C.bmp"); Eclipse
Then in the Photos folder I placed an icon named C.ico 32 by 32
this icon is used to populate the installer EXE file
which when you run the EXE file the icon will be displayed
in the Start Menu
I also checked Desktop Icon and Start Menu shortcut under
Deployment in NetBeans Deployment screen
The Native Package deployment process in Eclipse is a real real PAIN
In the future I will make the switch to NetBeans IDE for this reason alone

Related

Netbeans doesn't see newly installed fonts [duplicate]

I am trying to add new fonts to my Netbeans editor by downloading them and double-clicking the .ttf files and pressing 'Install' on the upper left corner. I am able to install the fonts with no issues. However, when I reload Netbeans and go to select the new font, it does not appear on the list of available fonts. Restarting Windows doesn't help. Has anyone had this issue before? And if so, we you able to fix it and how?
Thanks in advance.
EDIT: I am using Netbeans 10.
EDIT2: I am trying to install Roboto Mono and Inconsolata, here are the links to the downloads:
https://fonts.google.com/specimen/Inconsolata
https://fonts.google.com/specimen/Roboto+Mono
Get back to me if you have any luck, thank you.
Initially I had the same problem as you. After installing the new fonts and rebooting, those new fonts were not available in NetBeans 10.0, even though they were available in other applications such as Firefox and Notepad.
In my case, installing the *.ttf files resulted in them being installed in a user specific folder: C:\Users\johndoe\AppData\Local\Microsoft\Windows\Fonts.
However, after I copied (only) the *.ttf files for Inconsolata from that folder to C:\Windows\Fonts and rebooted again, the Inconsolata font was visible in NetBeans 10.0. Here is a screen shot showing the use of Inconsolata font:
Notes:
I don't know why this action was necessary. I'm pretty sure I have installed other fonts for NetBeans in the past that didn't require manually copying them to C:\Windows\Fonts.
This issue isn't specific to NetBeans 10.0 for those particular fonts; it also exists in NetBeans 8.2.
Don't use Windows File Explorer for copying the fonts since it treats C:\Windows\Fonts in a special way. Instead, copy the *.ttf files to C:\Windows\Fonts using copy from the command line:
I'm not sure whether this is a NetBeans issue or a Windows 10 issue, but since other software picked up the new fonts from the user directory perhaps this is a NetBeans bug?
As mentioned in previous answers, NetBeans only shows up fonts that are installed globally (for all users).
If you just use „install“ from the context menu in Explorer or from the font preview window, the font is installed on a per-user basis and is not installed globally.
You don’t have to move the font files manually. There's a clean way to do this: Use Explorer to navigate to the folder where your TTF files are stored. Then right click on a ttf file and choose "Install for all users".
Run command cd "c:\Windows\Fonts"
Force delete all fira fonts del f/ firacode-regular.ttf
(in my case, I had this font installed before, which is the one I want to use, so I will have to remove it to continue with the explanation)
Copy .ttf font file copy "c:\users\mrconejO07\desktop\firacode-regular.ttf" "c:\windows\fonts"
(in my case these are the paths where my file is and where it must be copied)
In theory it should work in the NetBeans IDE, enter to verify that the font should already appear in the options menu and if you see strange symbols when selecting the font you should ...
Open the .ttf file of the font you want to install and install it, now if it should work correctly.
enter image description here

Newly installed fonts do not appear in Netbeans

I am trying to add new fonts to my Netbeans editor by downloading them and double-clicking the .ttf files and pressing 'Install' on the upper left corner. I am able to install the fonts with no issues. However, when I reload Netbeans and go to select the new font, it does not appear on the list of available fonts. Restarting Windows doesn't help. Has anyone had this issue before? And if so, we you able to fix it and how?
Thanks in advance.
EDIT: I am using Netbeans 10.
EDIT2: I am trying to install Roboto Mono and Inconsolata, here are the links to the downloads:
https://fonts.google.com/specimen/Inconsolata
https://fonts.google.com/specimen/Roboto+Mono
Get back to me if you have any luck, thank you.
Initially I had the same problem as you. After installing the new fonts and rebooting, those new fonts were not available in NetBeans 10.0, even though they were available in other applications such as Firefox and Notepad.
In my case, installing the *.ttf files resulted in them being installed in a user specific folder: C:\Users\johndoe\AppData\Local\Microsoft\Windows\Fonts.
However, after I copied (only) the *.ttf files for Inconsolata from that folder to C:\Windows\Fonts and rebooted again, the Inconsolata font was visible in NetBeans 10.0. Here is a screen shot showing the use of Inconsolata font:
Notes:
I don't know why this action was necessary. I'm pretty sure I have installed other fonts for NetBeans in the past that didn't require manually copying them to C:\Windows\Fonts.
This issue isn't specific to NetBeans 10.0 for those particular fonts; it also exists in NetBeans 8.2.
Don't use Windows File Explorer for copying the fonts since it treats C:\Windows\Fonts in a special way. Instead, copy the *.ttf files to C:\Windows\Fonts using copy from the command line:
I'm not sure whether this is a NetBeans issue or a Windows 10 issue, but since other software picked up the new fonts from the user directory perhaps this is a NetBeans bug?
As mentioned in previous answers, NetBeans only shows up fonts that are installed globally (for all users).
If you just use „install“ from the context menu in Explorer or from the font preview window, the font is installed on a per-user basis and is not installed globally.
You don’t have to move the font files manually. There's a clean way to do this: Use Explorer to navigate to the folder where your TTF files are stored. Then right click on a ttf file and choose "Install for all users".
Run command cd "c:\Windows\Fonts"
Force delete all fira fonts del f/ firacode-regular.ttf
(in my case, I had this font installed before, which is the one I want to use, so I will have to remove it to continue with the explanation)
Copy .ttf font file copy "c:\users\mrconejO07\desktop\firacode-regular.ttf" "c:\windows\fonts"
(in my case these are the paths where my file is and where it must be copied)
In theory it should work in the NetBeans IDE, enter to verify that the font should already appear in the options menu and if you see strange symbols when selecting the font you should ...
Open the .ttf file of the font you want to install and install it, now if it should work correctly.
enter image description here

How to create an applet for cinnamon Linux Mint 17.1 downloaded applications

Some applications like PostMan, SpringToolSuite etc. which has to be downloaded in tar.gz, .zip files from official websites would give a hard time in setting up applets for quick access on the Linux Mint panel.
So after cracking my head for 3 to 4 hours. I was able to create applet for faster access using this method.
I have found this problem for most of the applications that I downloaded from tar.gz and zip file Linux Mint doesn't automatically create an applet that can be used for quick access.
But on the contrary, deb files that are executable on double-click can automatically create applet for quick access as it compiles with help of package installer.
So the solution that I followed is:
Extract the compressed package which generates a folder.
Right click and choose the option Create a new launcher here...
Select the name and select the main executable provided in the
generated folder.
This would create a rocket icon launcher(as of Linux Mint 17.1)
Right Click that icon and open in text-editor add this line
Icon=/icon-location..
Click on Menu type the rocket icon launcher Name that you given in
step 3
Right click on the result that has rocket icon launcher, add to
panel
That's it!!

how to make sure that exported Eclipse RCP application works in MAC.

1) created simple hello world eclipse app.
2) product configuration created.
3)In overview tab of product Configuration clicked on "Eclipse Product Export Wizard"
4)Destination chosen as Archive file and stored in local system.
5)extracted the zip folder and if i click on icon it is successfully showing the exported result.
6)But if I copy the zip folder in mac and if i extract and try to click on the .exe it is not showing the proper result instead it was showing Archive window.
I would like to know what steps should follow so that exported Eclipse RCP application(which built on windows) works in mac.
quicker response would help me to fix my issue.thanks in advance.
RCP builds are specific to a single operating system (Mac, Linux, Windows), GUI system (Cocoa, GTK, Windows) and architecture (64 bit, 32 bit). You will have to build separate Mac and Windows builds.
To build for multiple platforms you have to set up a target platform which includes the Mac specific code (and any other platforms you want). Using a target platform based on one of the Eclipse software sites will give you this.
Once you have done this the Export wizard will let you export for multiple platforms and lets you choose which platforms to export for.
I have done below steps to solve this issue
1)window+preference+TargetPlatform+select running platform +click on Edit.
2)then popup will open + click on add +click on istallation/software site+provide delta pack path.
3)so that when ever we trying to export RCP product from "Export product configuration" in product file we can observer the multiple platforms oprion in that dialog box.

How can I set an icon to the window of a JavaFX application?

I made a JavaFX application on Netbeans and I put this code for setting the icon to the window
primaryStage.getIcons().add(new Image("file:sicadcam.png"));
and when I run the project from Netbeans, it works ok: the icon appears on the top left corner of the window and in the taskbar. The image is in the root directory of the project.
When I clean and build the project, it generates two installers: one exe and one msi; and when I install the application and open it, the window doesn't have the icon sicadcam.png, it has the default java logo icon.
How or where can I set the path of the image so that when I install the application the icon appears.
This is only a partial answer to the question as I have been unable to generate a self-contained package which shows the icon for the installed application in the Windows taskbar. I may have missed a step, have an environmental issue or the icon configuration for self-contained applications may be slightly buggy and may be fixed in later releases. Testing was on: jdk7u21, NetBeans 7.3, Win7, InnoSetup.
Get the icon image from a resource rather than a file.
For example, if you place the image in the source directory of your application class:
new Image(MyApplication.class.getResource("sicadcam.png").toExternalForm());
For an installed application, this will only set the icon displayed in the top left corner of the screen. To set the icon for the taskbar, desktop etc, following the instructions in the Self-Contained Packaging section of the JavaFX Deployment Guide is supposed to get you there.
For example to get an icon for the installer on my Windows 7 for my self-contained application, I needed to place the icon in a <netbeansprojectdir>/package/windows/<myappname>.ico (needs to be a .ico for the installer packager to pick it up) file AND ensure my ant path was configured correctly as detailed in How to change JavaFx native Bundle exe icon (hopefully that manual ant configuration won't be required in later NetBeans/JavaFX releases).
Download the Ensemble sample application from Oracle and see how the package directory is laid out there for platform specific icons. Unfortunately when I tried building Ensemble from the command line, I was also unable to get Windows 7 to use the Ensemble icon in the taskbar when Ensemble was installed and executed as a self-contained application.
Ensure your build system copies your icon into the jar file containing your application. To check this, change into the app directory of your installed application and run jar tvf <yourappjar>.jar => it should show the location of the icon resource file in the jar.
you can it by using getClass().getResourceAsStream("path.png")
the getResourceAsStream("path") is return an input stram for path of any file you are need it for example for icon
win.getIcons().add(new Image(getClass().getResourceAsStream("path.png")));
and if you are makking an jar file is run with out Exception