where is the NetBeans config file (netbeans.conf) located? - java

my NetBeans has ugly fonts in interface. I'm going to make antialiasing for it. In internet I saw that there is should be
-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=on
in netbeans_default_options. This file should be located in /etc/netbeans.conf. But there isn't this file. I have NetBeans 6.8. Help, please.
UPD:
[ockonal#wincode ~]$ cd ~/.netbeans/6.8/
[ockonal#wincode 6.8]$ ls
ant build.properties docs lib modules sources
update_tracking bin config
jsstubs lock native update var
UPD2
With utilite find I did:
find / -name 'netbeans.conf'
This gave me:
/usr/share/netbeans/etc/netbeans.conf

In my NetBeans 6.7, this file is located at
{netbeans-installation-dir}/etc/netbeans.conf
I guess if you are using Windows, and the default folders, you should be able to find somewhere here:
C:\Program Files\NetBeans 6.8\etc\netbeans.conf
On a linux box, you should be able to find the file somewhere here
On Linux the installer lets the user choose where you want to install NetBeans. You may find it under /home/yourname/netbeans/etc/netbeans.conf or /opt/netbeans/etc/netbeans.conf. [ from http://wiki.netbeans.org/FaqNetbeansConf ]

On an ubuntu platform you can use the following command
locate netbeans.conf
to find where the netbeans files are located. It's the best way that provides with a precise location of your netbeans.conf file.
Hope this will help someone in need.

On Mac OS X:
/Applications/NetBeans/NetBeans XXX.app/Contents/Resources/NetBeans/etc/netbeans.conf
(Where XXX is The installed version of NetBeans)
Example for NetBeans 8.0:
/Applications/NetBeans/NetBeans 8.0.app/Contents/Resources/NetBeans/etc/netbeans.conf

Current as of this date for Windows, go to %APPDATA%\NetBeans, then the version (I have 8.2 and dev). In there you'll find a config folder with tons of stuff under it. I came to this Q&A looking for info on fonts and colors. That info is now found under config\Editors. Some base info for your themes are in there under FontsColors. Styling and color details are under folder text, and then in subfolders similar to the above.
As an example, I went to tools>options>Fonts&Colors. I duplicated the Darcula profile into (my initials) TGDark to make changes. Then to Syntax, HTML, and "Javascript Embedded in HTML", I set the background color to #3F2B2B. Now, in the file system I found this setting under:
C:\Users\tony\AppData\Roaming\NetBeans\dev\config\Editors\text\html\FontsColors\TGDark\org-netbeans-modules-editor-settings-CustomFontsColors-tokenColorings.xml
And in that file, note the bgcolor:
<fontcolor bgColor="ff3f2b2b" default="default" name="javascript-embedded"/>
What an adventure...

In Arch/Manjaro it's in /usr/etc/netbeans.conf (locate netbeans.conf is our friend)

in linux:
usr/local/netbeans.{version}/etc/netbeans.conf

In macOS for the latest release Apache NetBeans 14 it's located here:
"/Applications/NetBeans/Apache NetBeans 14.app/Contents/Resources/NetBeans/netbeans/etc/netbeans.conf"

Related

Font used in Jaspersoft isn't available in JVM

I'm getting an net.sf.jasperreports.engine.util.JRFontNotFoundException. I've already added the font in Jaspersoft Studio like how it was described here: When export a report to PDF change the font .
I've also exported the font extension and placed the jar where my classpath can see it like how it was described here: How can I display "$£Ω€απ⅔" in Jasperserver PDF using iReport? .
I'm still getting the error. Does anybody know any other solution that might help? Thanks in advance.
I ran into similar problem. The cause of my problem was that the font I was trying to use was installed on my computer (Windows) but was not installed on our deployment environment (Linux). So the problem occurred on Linux. So we needed simply to install required font on that system. (The problem occurred for PDF files only). So, check if you actually have the font in question on your system (try to find it in editor (such as MS Word - for windows). If you don't have the phont, install it. Google "How to add tryetype font on [your system name: Windows, Linux or whatever you are using]"
I solved this problem by exporting it as .zip instead of .jar, extracting the contents of the .zip and placing them under classpath.
More details on this in this blog (Solution 3): http://poor-developer.blogspot.com/2017/02/jasper-reports-using-unavailable-fonts.html

Jasper report not picking up fonts when running on linux [duplicate]

I'm trying to generate report with DynamicJasper, but I'm getting the following error:
net.sf.jasperreports.engine.util.JRFontNotFoundException:
Font 'Arial' is not available to the JVM.
msttcorefonts is installed, but I guess the JVM is not using any fonts from it.
I'm using Ubuntu 10.04.
How can I fix this?
I tried installing mscorefonts, but the package was installed and up-to-date.
sudo apt-get update
sudo apt-get install ttf-mscorefonts-installer
I tried searching for the font in the filesystem, with:
ls /usr/share/fonts/truetype/msttcorefonts/
This folder just had the README, with the correct instructions on how to install.
cat /usr/share/fonts/truetype/msttcorefonts/README
You need an internet connection for this:
sudo apt-get install --reinstall ttf-mscorefonts-installer
I re-installed ttf-mscorefonts-installer (as shown above, making sure to accept the EULA!) and the problem was solved.
JasperReports raises a JRFontNotFoundException in the case where the font used inside a report template is not available to the JVM as either as a system font or a font coming from a JR font extension. This ensure that all problems caused by font metrics mismatches are avoided and we have an early warning about the inconsistency.
Jasper reports is trying to help you in your report development, stating that it can not export your report correctly since it can not find the font defined in TextField or StaticText
<font fontName="Arial"/>
Yes you can disable this by setting net.sf.jasperreports.awt.ignore.missing.font to true but you will have export inconsistencies.
Yes you can install the font as JVM system font (but you need to do it on every PC used that may generate report and you can still have encoding problems).
The correct way!
Use Font Extensions!, if you like to create your own (see link below), jasper reports also distributes a default font-extension jar (jasperreports-fonts-x.x.x.jar), that supports fontName DejaVu Sans, DejaVu Serif and DejaVu Sans Mono
<font fontName="DejaVu Sans"/>
From the JasperReport Ultimate Guide:
We strongly encourage people to use only fonts derived from font
extensions, because this is the only way to make sure that the fonts
will be available to the application when the reports are executed at
runtime. Using system fonts always brings the risk for the reports not
to work properly when deployed on a new machine that might not have
those fonts installed
Links on StackOverflow on how to render fonts correctly in pdf
Checklist on how to render font correctly in pdf
Generate font-extensions with JasperSoft Studio
Generate font-extensions with iReport
I use IReport to install font:
tools -> options -> fonts -> click install font
Then select the font and click
-> export as extension and type name myfont.jar
add this jar and also spring.jar* to your build path.
*copy spring.jar from Jaspersoft\iReport-3.7.0\ireport\modules\ext
sudo apt-get install msttcorefonts works (on our Ubuntu development environment), but is not a very good solution.
Instead, we bundled the fonts with our application based on this tip. Their JAR file bundles the following fonts,
Arial
Times New Roman
Courier New
Comic Sans MS
Georgia
Verdana
Monospaced
Direct Link to download jar:
Maven ver 1.0. DynamicFonts
There are three method to avoid such a problem.
Method 1 : by setting ignore missing font property.
JRProperties.setProperty("net.sf.jasperreports.awt.ignore.missing.font", "true");
or you can set this property by entering following line into .jrxml file.
<property name="net.sf.jasperreports.awt.ignore.missing.font" value="true"/>
Method 2 : by setting default font property.
JRProperties.setProperty("net.sf.jasperreports.default.font.name", "Sans Serif");
or you can set this property by entering following line into .jrxml file.
<property name="net.sf.jasperreports.default.font.name" value="Sans Serif"/>
Method 3 : by adding missing font property.
Firstly install missing fonts in IReport by selecting " Tools >> Options >> Fonts >> Install Font " then select the all font and Export this By clicking on "Export as Extension" with .jar Extension.
You can use this jar for Jasperreports-font.X.X.X.jar which will be present in your project library or classpath.
For CentOS:
wget msttcorefonts
Then:
tar -zxvf msttcorefonts.tar.gz
cp msttcorefonts/*.ttf /usr/share/fonts/TTF/
fc-cache -fv
After all, restart JVM.
I solved this by choosing 'SansSerif' or 'Serif' only and not 'Arial' or 'Times New Roman'.
If you are using maven in your project, you can just add the jasper-fonts dependency to pom.xml:
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-fonts</artifactId>
<version>6.8.1</version>
</dependency>
Installing the missing font on the system may be a working solution but not for me, I didn't want to have to install the missing fonts after each deployment in a new server, instead I opted for embedding the font with the application.
Regards.
Try adding the line
net.sf.jasperreports.awt.ignore.missing.font=true
to your jasperreports.properties file.
Jasper stops finding one font
For Debian
add
non-free contrib
to deb and deb-src in /etc/apt/sources.list ie:
deb http://ftp.debian.org/debian/ squeeze main non-free contrib
deb-src http://ftp.debian.org/debian/ squeeze main non-free contrib
Then
apt-get update
apt-get install msttcorefonts
Of course you'll need to restart jasperserver. ie:
/opt/jasperreports-server-cp-4.5.0/ctlscript.sh restart
Change for your version / path.
I faced the issue with my web application based on Spring 3 and deployed on Weblogic 10.3 on Oracle Linux 6. The solution mentioned at the link did not work for me.
I had to take the following steps -
1. Copy the Arial*.ttf font files to JROCKIT_JAVA_HOME/jre/lib/fonts directory
2. Make entries of the fonts in fontconfig.properties.src
3. Restart the cluster from Weblogic console
filename.Arial=Arial.ttf
filename.Arial_Bold=Arial_Bold.ttf
filename.Arial_Italic=Arial_Italic.ttf
filename.Arial_Bold_Italic=Arial_Bold_Italic.ttf
You can do it by installing fonts, that means everywhere you want to run that particular application. Simplest way is just add this bl line to your jrxml file:
<property name="net.sf.jasperreports.awt.ignore.missing.font" value="true"/>
can make your custom fonts via iReport and converting like jars files
Create jasper report in multiple languages(Unicode)
1)Install font in ireport desginer
2)create extension of font(we will use it in applications classpath)
3)install font on os(optional)
4)paste all .ttf of font in jre->lib->fonts directory (otherwise web application will throw error font is not available to JVM)
You can use this library which packages the Liberation-fonts as JasperReport font extension, and registers them as Arial, Times New Roman and Courier:
https://mvnrepository.com/artifact/com.mpobjects.jasperreports.font/jasperreports-fonts-liberation
Actually I fixed this issue in a very simple way
go to your home path, like /root
create a folder named .fonts
copy your all your font files to .fonts, you can copy the font from C:\windows\fonts if you use windows.
sudo apt-get install fontconfig
fc-cache –fv to rebuid fonts caches.
Solution in 2 steps (if you are using centOS)
Download the Microsoft core fonts rpm package.
[root#WEBSVR~/]# wget http://www.itzgeek.com/msttcore-fonts-2.0-3.noarch.rpm
Install rpm package.
[root#WEBSVR~/]# rpm -Uvh msttcore-fonts-2.0-3.noarch.rpm
Add the below in your .jrxml file:
<property name="net.sf.jasperreports.awt.ignore.missing.font" value="true"/>
Copy your Fonts on the following directory
JDK_HOME\jre\lib\fonts
Hey Having trouble viewing documents produced on Windows?
You can try a fine solution easy:
yum install curl cabextract xorg-x11-font-utils fontconfig
rpm -i
https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm
After this I need reboot my system CentOS6.
Source: http://mscorefonts2.sourceforge.net/

Gdal for windows 7(x32)

How do I connect to the gdal eclipse. I tried all the ways it does not work.
How do I connect to the gdal eclipse. I tried all the ways it does not work.
All the time issue
java.lang.UnsatisfiedLinkError: D: \ Document \ JAVA \ Gdal \ gdalLibrary \ gdaljni.dll: Can't find dependent libraries
I also have this problem and just found a solution. I am working with WIN8, and downloaded release-1600-gdal-1-8-0-mapserver-5-6-6.zip. As in the readme txt, I run the SDKShell.bat to set the environment. Then I include the jar and the four jni dlls in the java folder into my testing java project. There was always error like gdaljni.dll: Can't find dependent libraries. Then I figured out the settings in the bat may not been successfully done. I opened up the bat with an editor and found all the necessary enviroment settings and did it one by one. Then the java project worked with no problem. The settings needed are as follows:
SET PATH=%CD%\bin;%CD%\bin\proj\apps;%CD%\bin\gdal\apps;%CD%\bin\ms\apps;%PATH%
SET GDAL_DATA=%CD%\bin\gdal-data
SET GDAL_DRIVER_PATH=%CD%\bin\gdal\plugins
SET PROJ_LIB=%CD%\bin\proj\SHARE
For the PATH you can just in explorer right click on computer-properties-advanced system settings-Change enviroment variables. Add the absolute paths(%CD% means the current folder of the bat file, in my case is C:\GDAL, so path "%CD%\bin" should be changed into "C:\GDAL\bin") of "SET PATH line" to your PATH. For the other three lines of settings, just add three system variable for each and aslo change the path containing %CD% into abousolute paths. Then, everything should be ok. Note I omitted some paths in the bat file which I do not need for my java bindings. You can also add them to PATH if you want to do use gdal with other languages. I guess the most common mistake is forgetting to add the GDAL_DRIVER_PATH and PROJ_LIB.Hope it may be helpful for the others who have such issue.
If UnsatisfiedLinkError: gdaljni.dll: Can't find dependent libraries occurs...
Check the path of GDAL libraries, data and plugins (they must be in the installation path of your application)
Missing VC++2010 runtime (if GDAL is compiled using VC++2010): download the Microsoft Visual C++ 2010 Redistributable Package:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84
You may need to set following in the Windows system environment variables:
GDAL_DATA=<path to gdal-data folder>
GDAL_DRIVER=<path to your gdal\plugins folder>
This might help you:
1) set path as said above
2) Put the *jni.dll files in the 'The path where you installed gdal'\gdallib\bin\gdal\java\ directories into the jre\bin directories that you are using. (This saved me!)
Hope it will be helpful:)

how to add blackberry library into blackberry-eclipse-plugin project?

when i try to include blackberry library into project i see that happen nothing happen and error like pic
where i try this:-
preverify it by
preverify.exe -classpath [JDE_PATH]\lib\net_rim_api.jar myjarfile.jar
and try this
preverify.exe -classpath [JDE_PATH]\lib\net_rim_api.jar; myjarfile.jar
myjarfile.jar in bin folder
after that i but it into my project in lib source folder as pic and check order and export checkbox true
- i have ksoap2-j2me-core-prev-2.1.2.jar already preverify but the only difference that "myjarfile" is blackberry library and the "ksoap" is j2me
please help
any new answers???
Kindly change the compiler compliance level to 1.4 in project properties ( in java compiler ).
If you can get the source for this library, you can follow the details I have in another answer:
BlackBerry - use own JAR file in own project
You might find something useful on that page.
I'm sorry I haven't included any real answer in this post, because I don't know exactly what you want, and the details on that other link are very long.

How to change the default project directory (folder) in Netbeans 6.9?

How to change the default project directory in Netbeans 6.9 for Java SE\ME\EE?
I don't think you can make it module-specific but you can set it as follows:
Close NetBeans
Find the projectui.properties file. For me (Windows) it was under C:\Documents and Settings\Catchwa\.netbeans\6.9\config\Preferences\org\netbeans\modules\projectui.properties
The projectsFolder=C:\\NetBeansProjects variable is I think what you want to change.
I found mine in a slightly different location (Windows 7 64-bit using Netbeans 7.2):
C:\Users\UserName\AppData\Roaming\NetBeans\7.2\config\Preferences\org\netbeans\modules\projectui.properties
Slightly different way of doing it for NetBeans 7.3 latest release (at least for Windows 7, 64-bit). Search your system for netbeans.conf (from explorer window) or go to its default install location:
C:\Program Files\NetBeans 7.3\etc\netbeans.conf
Look for netbeans.conf on Mac OS X:
find / -name "netbeans.conf" -print &
Look for netbeans.conf in Linux:
sudo find / -name "netbeans.conf" 2> /dev/null
Then edit the netbeans.conf file to replace the userdir line:
netbeans_default_userdir="${DEFAULT_USERDIR_ROOT}/7.3"
With your new projects directory/folder path:
netbeans_default_userdir="C:/APPS/netbeans/"
-OR-
netbeans_default_userdir="\Applicatons\netbeans\"
(NOTE: if you have trouble in Windows in a network managed security environment, you'll need admin access to make this change. Open the file using your editor's ".exe" directly by right-clicking the launcher file and clicking "Run as Administrator", I had to do this for Notepad++ because it said "Another application is using the file", but in fact it was just locked to non-admin users).
This changes the default userdir which stores user-specific IDE settings, but not the default project folder/directory. Next, you need to open NetBeans IDE with the new IDE settings and start to create a new Java project (then cancel after second screen in project creation wizard). It will now create a new projectui.properties file in the userdir you set; this is the file that wasn't found before this workaround that you need to edit as per the other suggestions. Mine was located here after these changes:
C:\APPS\netbeans\config\Preferences\org\netbeans\modules
Finally, you've reached the finish line and can change the projectsFolder property value to the path you want, if you don't see a line for projectsFolder then simply type or paste one in at the bottom of the file to point to your path where you want NetBeans to store projects by default, such as:
projectsFolder=C:/APPS/projects/
-OR-
projectsFolder=\Applicatons\projects\
Wow, that's alot of settings changes but it finally works for me the way I wanted it to, being able to switch my IDE back and forth between a local workspace and a network workspace using my username space on the corporate LAN just by changing projectsFolder property value in the projectui.properties folder.
NOTE:
On Linux or Mac you might not need the first step of modifying netbeans.conf as the projectui.properties should be as follows (may vary by OS version):
$HOME/.netbeans/7.3/config/Preferences/org/netbeans/modules/projectui.properties
Under Windows 7, logged in under AD, the projectui.properties file's directory was under the parent folder listed in the USERPROFILE environment variable (type set in a command prompt window):
C:\Users\my_login_name\\.netbeans\7.0\config\Preferences\org\netbeans\modules\projectui.properties
It was not in the directories pointed at by the HOME or APPDATA variables.
Changed projectsFolder value to new location, restarted NetBeans and default folder for new projects was in the new location. It worked!
In linux/Ubuntu
View hidden files in home directory (press ctrl+H on /home folder).
.netbeans\7.3\config\Preferences\org\netbeans\modules\projectui.properties
Update the following content in projectui.properties file
projectsFolder=/home/folder/NB
In newer versions, right-click on the project you want to move in the 'Projects' tab, and then click 'Move'. This will allow you to move the project to a new directory.
In windows 7 64 bit properties file can be found under c:\Users\user\AppData\Roaming\NetBeans\7.2.1\config\Preferences\org\netbeans\modules\ folder

Categories