https://wiki.archlinux.org/api.php?action=feedcontributions&user=Ant1&feedformat=atomArchWiki - User contributions [en]2024-03-29T15:26:25ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Netbeans&diff=369022Netbeans2015-04-08T15:56:46Z<p>Ant1: /* Look and feel */</p>
<hr />
<div>[[Category:Development]]<br />
[[ar:Netbeans]]<br />
[[es:Netbeans]]<br />
'''Netbeans''' is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.<br />
<br />
From [[Wikipedia:Netbeans|Wikipedia article]]:<br />
:"''The NetBeans IDE is written in Java and can run anywhere a compatible JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages.''"<br />
<br />
== Installation ==<br />
[[pacman|Install]] the {{Pkg|netbeans}} package which is available in the [[official repositories]].<br />
<br />
== Tips and tricks ==<br />
{{Note|The global netbeans.conf {{Ic|/usr/share/netbeans/etc/netbeans.conf}} will be overwritten during updates. To keep changes add them to your local netbeans.conf {{ic|~/.netbeans/<ver>/etc/netbeans.conf}} (you will need to create the etc dir and the .conf file).}}<br />
*Settings in local version of netbeans.conf override the same settings in the global copy of the file.<br />
*Command-line options override settings in either of the configuration files.<br />
=== Font antialiasing in Netbeans ===<br />
==== Netbeans Specifically ====<br />
Add {{Ic|-J-Dswing.aatext&#61;TRUE -J-Dawt.useSystemAAFontSettings&#61;on}} to the 'netbeans_default_options' line of your netbeans.conf file.<br />
<br />
==== Java Generally ====<br />
See [[Java#Better font rendering ]].<br />
<br />
=== Look and feel ===<br />
To change Netbeans look and feel, go to Tools>Options>Appearance>Look and Feel<br />
<br />
To add dark look and feels install the Dark Look And Feel Themes plugin via Tools>Plugin>Available Plugins<br />
<br />
== Integrate with tomcat ==<br />
<br />
It is possible to debug web applications running on tomcat within netbeans:<br />
<br />
First install, [[tomcat]].<br />
<br />
You will need to create a configuration and deployment folder for your user, for example in /home/USER_NAME/.tomcat7<br />
<br />
Copy /etc/tomcat7/ in /home/USER_NAME/.tomcat7/conf and check that you give read/write access to your user.<br />
# cp -r /etc/tomcat7/ /home/USER_NAME/.tomcat7/conf<br />
# chown -R USER_NAME:USER_NAME /home/USER_NAME/.tomcat7/conf<br />
<br />
Make sure to configure /home/USER_NAME/.tomcat7/conf/tomcat-users.xml with a user having tomcat admin permissions so that netbeans can deploy applications.<br />
<br />
Copy /var/lib/tomcat7/webapps in /home/USER_NAME/.tomcat7/webapps<br />
<br />
<br />
<br />
Then, in netbeans go to Tools>Servers>Add Server and select Apache Tomcat.<br />
<br />
In server location specify /usr/share/tomcat7<br />
<br />
Check "Use Private Configuration Folder (Catalina Base)" and specify /home/USER_NAME/.tomcat7<br />
<br />
Finally, set the username and password you configured in /etc/tomcat7/tomcat-users.xml<br />
<br />
== Troubleshooting ==<br />
=== OpenJDK vs Sun's JDK ===<br />
Netbeans 7.0-1 will not ALWAYS work with OpenJDK. Some reported issues are:<br />
* Starting - In some cases, netbeans will not start.<br />
* Installation - The .sh script provided by netbeans will not launch wizard (any proofs?).<br />
* JavaFX module does not work (see {{Bug|29843}}).<br />
<br />
=== Glassfish server - Can`t download Glassfish server I/O Exception ===<br />
If you are trying add new Glassfish server, you can`t download the server. Netbeans returns<br />
I/O Exception: http://java.net/download/glassgish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
<br />
Solution is:<br />
* Download GlassFish Server Open Source Edition manualy from official site, actual link is http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
* Extract from zip to any location<br />
<br />
=== Integrate Netbeans with kwallet ===<br />
<br />
Netbeans may need to store some passwords. It can do that in kwallet. See netbeans' wiki [[http://wiki.netbeans.org/FaqMasterPasswordDialog]]<br />
<br />
However, you need to install and configure {{Pkg|qtchooser}} so that netbeans find the qdbus command:<br />
<br />
<pre><br />
# pacman -S qtchooser<br />
$ ln -s /etc/xdg/qtchooser/4.conf ~/.config/qtchooser/default.conf<br />
</pre><br />
See forum discussion [[https://bbs.archlinux.org/viewtopic.php?pid=1374434#p1374434]]</div>Ant1https://wiki.archlinux.org/index.php?title=Netbeans&diff=305523Netbeans2014-03-18T19:36:12Z<p>Ant1: /* Integrate with tomcat */</p>
<hr />
<div>[[Category:Development]]<br />
[[ar:Netbeans]]<br />
[[es:Netbeans]]<br />
'''Netbeans''' is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.<br />
<br />
From [[Wikipedia:Netbeans|Wikipedia article]]:<br />
:"''The NetBeans IDE is written in Java and can run anywhere a compatible JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages.''"<br />
<br />
== Installation ==<br />
[[pacman|Install]] the {{Pkg|netbeans}} package which is available in the [[official repositories]].<br />
<br />
== Tips and tricks ==<br />
{{Note|The global netbeans.conf {{Ic|/usr/share/netbeans/etc/netbeans.conf}} will be overwritten during updates. To keep changes add them to your local netbeans.conf {{ic|~/.netbeans/<ver>/etc/netbeans.conf}} (you will need to create the etc dir and the .conf file).}}<br />
*Settings in local version of netbeans.conf override the same settings in the global copy of the file.<br />
*Command-line options override settings in either of the configuration files.<br />
=== Font antialiasing in Netbeans ===<br />
==== Netbeans Specifically ====<br />
Add {{Ic|-J-Dswing.aatext&#61;TRUE -J-Dawt.useSystemAAFontSettings&#61;on}} to the 'netbeans_default_options' line of your netbeans.conf file.<br />
<br />
==== Java Generally ====<br />
See [[Java#Better font rendering ]].<br />
<br />
=== Look and feel ===<br />
To change Netbeans look and feel, add switch {{Ic|--laf yourLookAndFeel}} to IDE command line by appending it to ‘netbeans_default_options’ section of {{Ic|/usr/share/netbeans/etc/netbeans.conf}} or editing ''.desktop'' file with which you launch Netbeans.<br />
<br />
For GTK:<br />
{{Ic|--laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}<br />
<br />
For Nimbus:<br />
{{Ic|--laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel}}<br />
<br />
== Integrate with tomcat ==<br />
<br />
It is possible to debug web applications running on tomcat within netbeans:<br />
<br />
First install, [[tomcat]].<br />
<br />
You will need to create a configuration and deployment folder for your user, for example in /home/USER_NAME/.tomcat7<br />
<br />
Copy /etc/tomcat7/ in /home/USER_NAME/.tomcat7/conf and check that you give read/write access to your user.<br />
# sudo cp -r /etc/tomcat7/ /home/USER_NAME/.tomcat7/conf<br />
# sudo chown -R USER_NAME:USER_NAME /home/USER_NAME/.tomcat7/conf<br />
<br />
Make sure to configure /home/USER_NAME/.tomcat7/conf/tomcat-users.xml with a user having tomcat admin permissions so that netbeans can deploy applications.<br />
<br />
Copy /var/lib/tomcat7/webapps in /home/USER_NAME/.tomcat7/webapps<br />
<br />
<br />
<br />
Then, in netbeans go to Tools>Servers>Add Server and select Apache Tomcat.<br />
<br />
In server location specify /usr/share/tomcat7<br />
<br />
Check "Use Private Configuration Folder (Catalina Base)" and specify /home/USER_NAME/.tomcat7<br />
<br />
Finally, set the username and password you configured in /etc/tomcat7/tomcat-users.xml<br />
<br />
== Troubleshooting ==<br />
=== OpenJDK vs Sun's JDK ===<br />
Netbeans 7.0-1 will not ALWAYS work with OpenJDK. Some reported issues are:<br />
* Starting - In some cases, netbeans will not start.<br />
* Installation - The .sh script provided by netbeans will not launch wizard (any proofs?).<br />
* JavaFX module does not work (see {{Bug|29843}}).<br />
<br />
=== Glassfish server - Can`t download Glassfish server I/O Exception ===<br />
If you are trying add new Glassfish server, you can`t download the server. Netbeans returns<br />
I/O Exception: http://java.net/download/glassgish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
<br />
Solution is:<br />
* Download GlassFish Server Open Source Edition manualy from official site, actual link is http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
* Extract from zip to any location<br />
<br />
=== Netbeans doesn't start after its first start ===<br />
If you receive a message like this when executing from terminal:<br />
{{hc|# netbeans -h|<br />
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/libsplashscreen.so: libgif.so.4: cannot open shared object file: No such file or directory<br />
}}<br />
<br />
You have two options:<br />
* You can start Netbeans using the --nosplash option:<br />
# netbeans --nosplash<br />
* Or, install the missing library ({{Pkg|libungif}}), then starting Netbeans as usual will work.<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=118930 Arch forum thread]<br />
<br />
=== Netbeans starts with a completely grey window ===<br />
{{Out of date|most likely fixed in current versions of OpenJDK}}<br />
See [[Java#Impersonate Another Window Manager]]<br />
<br />
This may not be quite 100% out of date; the problem occurred while using NetBeans 7.2, OpenJDK 7.u7_2.3.2-2, "$ java -version" reporting 1.7.0_07. The following is robbed from Awesome's wiki (although I experienced the problem using Xmonad), which fixed my all-grey window problem:<br />
<br />
<pre>$ _JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING</pre><br />
<br />
=== Integrate Netbeans with kwallet ===<br />
<br />
Netbeans may need to store some passwords. It can do that in kwallet. See netbeans' wiki [[http://wiki.netbeans.org/FaqMasterPasswordDialog]]<br />
<br />
However, you need to install and configure {{Pkg|qtchooser}} so that netbeans find the qdbus command:<br />
<br />
<pre><br />
$ pacman -S qtchooser<br />
$ ln -sf /etc/xdg/qtchooser/4.conf /etc/xdg/qtchooser/default.conf<br />
</pre><br />
See forum discussion [[https://bbs.archlinux.org/viewtopic.php?pid=1374434#p1374434]]</div>Ant1https://wiki.archlinux.org/index.php?title=Netbeans&diff=304050Netbeans2014-03-11T17:29:22Z<p>Ant1: /* Integrate with tomcat */</p>
<hr />
<div>[[Category:Development]]<br />
[[ar:Netbeans]]<br />
[[es:Netbeans]]<br />
'''Netbeans''' is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.<br />
<br />
From [[Wikipedia:Netbeans|Wikipedia article]]:<br />
:"''The NetBeans IDE is written in Java and can run anywhere a compatible JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages.''"<br />
<br />
== Installation ==<br />
[[pacman|Install]] the {{Pkg|netbeans}} package which is available in the [[official repositories]].<br />
<br />
== Tips and tricks ==<br />
{{Note|The global netbeans.conf {{Ic|/usr/share/netbeans/etc/netbeans.conf}} will be overwritten during updates. To keep changes add them to your local netbeans.conf {{ic|~/.netbeans/<ver>/etc/netbeans.conf}} (you will need to create the etc dir and the .conf file).}}<br />
*Settings in local version of netbeans.conf override the same settings in the global copy of the file.<br />
*Command-line options override settings in either of the configuration files.<br />
=== Font antialiasing in Netbeans ===<br />
==== Netbeans Specifically ====<br />
Add {{Ic|-J-Dswing.aatext&#61;TRUE -J-Dawt.useSystemAAFontSettings&#61;on}} to the 'netbeans_default_options' line of your netbeans.conf file.<br />
<br />
==== Java Generally ====<br />
See [[Java#Better font rendering ]].<br />
<br />
=== Look and feel ===<br />
To change Netbeans look and feel, add switch {{Ic|--laf yourLookAndFeel}} to IDE command line by appending it to ‘netbeans_default_options’ section of {{Ic|/usr/share/netbeans/etc/netbeans.conf}} or editing ''.desktop'' file with which you launch Netbeans.<br />
<br />
For GTK:<br />
{{Ic|--laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}<br />
<br />
For Nimbus:<br />
{{Ic|--laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel}}<br />
<br />
== Integrate with tomcat ==<br />
<br />
It is possible to debug web applications running on tomcat within netbeans:<br />
<br />
First install, [[tomcat]].<br />
<br />
You will need to create a configuration and deployment folder for your user, for example in /home/USER_NAME/.tomcat7<br />
<br />
Copy /etc/tomcat7/server.xml and /etc/tomcat7/tomcat-users.xml in /home/USER_NAME/.tomcat7/conf and check that you give read/write access to this file to your user.<br />
<br />
Make sure to configure tomcat-users.xml with a user having admin permissions so that netbeans can deploy applications.<br />
<br />
Copy /var/lib/tomcat7/webapps in /home/USER_NAME/.tomcat7/webapps<br />
<br />
<br />
<br />
Then, in netbeans go to Tools>Servers>Add Server and select Apache Tomcat.<br />
<br />
In server location specify /usr/share/tomcat7<br />
<br />
Check "Use Private Configuration Folder (Catalina Base)" and specify /home/USER_NAME/.tomcat7<br />
<br />
Finally, set the username and password you configured in /etc/tomcat7/tomcat-users.xml<br />
<br />
== Troubleshooting ==<br />
=== OpenJDK vs Sun's JDK ===<br />
Netbeans 7.0-1 will not ALWAYS work with OpenJDK. Some reported issues are:<br />
* Starting - In some cases, netbeans will not start.<br />
* Installation - The .sh script provided by netbeans will not launch wizard (any proofs?).<br />
* JavaFX module does not work (see {{Bug|29843}}).<br />
<br />
=== Glassfish server - Can`t download Glassfish server I/O Exception ===<br />
If you are trying add new Glassfish server, you can`t download the server. Netbeans returns<br />
I/O Exception: http://java.net/download/glassgish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
<br />
Solution is:<br />
* Download GlassFish Server Open Source Edition manualy from official site, actual link is http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
* Extract from zip to any location<br />
<br />
=== Netbeans doesn't start after its first start ===<br />
If you receive a message like this when executing from terminal:<br />
{{hc|# netbeans -h|<br />
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/libsplashscreen.so: libgif.so.4: cannot open shared object file: No such file or directory<br />
}}<br />
<br />
You have two options:<br />
* You can start Netbeans using the --nosplash option:<br />
# netbeans --nosplash<br />
* Or, install the missing library ({{Pkg|libungif}}), then starting Netbeans as usual will work.<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=118930 Arch forum thread]<br />
<br />
=== Netbeans starts with a completely grey window ===<br />
{{Out of date|most likely fixed in current versions of OpenJDK}}<br />
See [[Java#Impersonate Another Window Manager]]<br />
<br />
This may not be quite 100% out of date; the problem occurred while using NetBeans 7.2, OpenJDK 7.u7_2.3.2-2, "$ java -version" reporting 1.7.0_07. The following is robbed from Awesome's wiki (although I experienced the problem using Xmonad), which fixed my all-grey window problem:<br />
<br />
<pre>$ _JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING</pre><br />
<br />
=== Integrate Netbeans with kwallet ===<br />
<br />
Netbeans may need to store some passwords. It can do that in kwallet. See netbeans' wiki [[http://wiki.netbeans.org/FaqMasterPasswordDialog]]<br />
<br />
However, you need to install and configure {{Pkg|qtchooser}} so that netbeans find the qdbus command:<br />
<br />
<pre><br />
$ pacman -S qtchooser<br />
$ ln -sf /etc/xdg/qtchooser/4.conf /etc/xdg/qtchooser/default.conf<br />
</pre><br />
See forum discussion [[https://bbs.archlinux.org/viewtopic.php?pid=1374434#p1374434]]</div>Ant1https://wiki.archlinux.org/index.php?title=SQLite&diff=304048SQLite2014-03-11T17:18:58Z<p>Ant1: Fix typo</p>
<hr />
<div>[[Category:Database management systems]]<br />
<br />
From the [http://www.sqlite.org/ project home page]:<br />
: ''SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.''<br />
<br />
== Features ==<br />
<br />
From: [http://www.sqlite.org/features.html SQLite Features]<br />
* Transactions are atomic, consistent, isolated, and durable even after system crashes and power failures.<br />
* Zero-configuration - no setup or administration needed.<br />
* Implements most of SQL92. <br />
* A complete database is stored in a single cross-platform disk file.<br />
* Supports terabyte-sized databases and gigabyte-sized strings and blobs. <br />
* Small code footprint: less than 325KiB fully configured or less than 190KiB with optional features omitted.<br />
* Faster than popular client/server database engines for most common operations.<br />
* Simple, easy to use API.<br />
* Written in ANSI-C. TCL bindings included. Bindings for dozens of other languages available separately.<br />
* Well-commented source code with 100% branch test coverage.<br />
* Available as a single ANSI-C source-code file that you can easily drop into another project.<br />
* Self-contained: no external dependencies.<br />
* Cross-platform: Unix (Linux and Mac OS X), OS/2, and Windows (Win32 and WinCE) are supported out of the box. Easy to port to other systems.<br />
* Sources are in the public domain. Use for any purpose.<br />
* Comes with a standalone command-line interface (CLI) client that can be used to administer SQLite databases.<br />
<br />
== Installation ==<br />
<br />
[[pacman|Install]] {{Pkg|sqlite}} from the [[official repositories]].<br />
<br />
Related packages are:<br />
* {{Pkg|sqlite-doc}} - most of the static HTML files that comprise this website, including all of the SQL Syntax and the C/C++ interface specs and other miscellaneous documentation<br />
* {{Pkg|php-sqlite}} - sqlite3 module for PHP (don't forget to enable it in /etc/php/php.ini)<br />
* {{Pkg|gambas2-gb-db-sqlite3}} - Gambas2 Sqlite3 database access component<br />
* {{Pkg|sqliteman}} - The best developer's and/or admin's GUI tool for Sqlite3 in the world<br />
<br />
== Using sqlite3 command line shell ==<br />
<br />
The SQLite library includes a simple command-line utility named sqlite3 that allows the user to manually enter and execute SQL commands against an SQLite database.<br />
<br />
==== Create a database ====<br />
<br />
sqlite3 ''databasename''<br />
<br />
==== Create table ====<br />
<br />
sqlite> create table tblone(one varchar(10), two smallint);<br />
<br />
==== Insert data ====<br />
<br />
sqlite> insert into tblone values('helloworld',20);<br />
sqlite> insert into tblone values('archlinux', 30);<br />
<br />
==== Search database ====<br />
<br />
sqlite> select * from tblone;<br />
helloworld|20<br />
rchlinux|30<br />
<br />
See the [http://www.sqlite.org/sqlite.html sqlite docs].<br />
<br />
== Using sqlite in shell script ==<br />
<br />
See forum [https://bbs.archlinux.org/viewtopic.php?id=109802 post].<br />
<br />
== See also ==<br />
<br />
* [http://www.sqlite.org SQLite homepage]<br />
* [http://www.squidoo.com/sqlitehammer SQLite Hammer]<br />
* [http://oreilly.com/catalog/9780596521196 Using SQLite - Oreilly Book]<br />
* [http://www.amazon.com/Definitive-Guide-SQLite-Mike-Owens/dp/1590596730 SQLite - Apress Book]</div>Ant1https://wiki.archlinux.org/index.php?title=Netbeans&diff=304031Netbeans2014-03-11T15:29:57Z<p>Ant1: /* Integrate with tomcat */</p>
<hr />
<div>[[Category:Development]]<br />
[[ar:Netbeans]]<br />
[[es:Netbeans]]<br />
'''Netbeans''' is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.<br />
<br />
From [[Wikipedia:Netbeans|Wikipedia article]]:<br />
:"''The NetBeans IDE is written in Java and can run anywhere a compatible JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages.''"<br />
<br />
== Installation ==<br />
[[pacman|Install]] the {{Pkg|netbeans}} package which is available in the [[official repositories]].<br />
<br />
== Tips and tricks ==<br />
{{Note|The global netbeans.conf {{Ic|/usr/share/netbeans/etc/netbeans.conf}} will be overwritten during updates. To keep changes add them to your local netbeans.conf {{ic|~/.netbeans/<ver>/etc/netbeans.conf}} (you will need to create the etc dir and the .conf file).}}<br />
*Settings in local version of netbeans.conf override the same settings in the global copy of the file.<br />
*Command-line options override settings in either of the configuration files.<br />
=== Font antialiasing in Netbeans ===<br />
==== Netbeans Specifically ====<br />
Add {{Ic|-J-Dswing.aatext&#61;TRUE -J-Dawt.useSystemAAFontSettings&#61;on}} to the 'netbeans_default_options' line of your netbeans.conf file.<br />
<br />
==== Java Generally ====<br />
See [[Java#Better font rendering ]].<br />
<br />
=== Look and feel ===<br />
To change Netbeans look and feel, add switch {{Ic|--laf yourLookAndFeel}} to IDE command line by appending it to ‘netbeans_default_options’ section of {{Ic|/usr/share/netbeans/etc/netbeans.conf}} or editing ''.desktop'' file with which you launch Netbeans.<br />
<br />
For GTK:<br />
{{Ic|--laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}<br />
<br />
For Nimbus:<br />
{{Ic|--laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel}}<br />
<br />
== Integrate with tomcat ==<br />
<br />
It is possible to debug web applications running on tomcat within netbeans:<br />
<br />
First install, [[tomcat]] and configure /etc/tomcat7/tomcat-users.xml<br />
<br />
Then, in netbeans go to Tools>Servers>Add Server and select Apache Tomcat.<br />
<br />
In server location specify /usr/share/tomcat7<br />
<br />
You will need to create a configuration and deployment folder for your user, for example in /home/USER_NAME/.tomcat7<br />
<br />
Copy /etc/tomcat7/server.xml to /home/USER_NAME/.tomcat7/conf/server.xml<br />
<br />
Check that you have read access to this new server.xml file.<br />
<br />
Back in netbeans, check "Use Private Configuration Folder (Catalina Base)" and specify /home/USER_NAME/.tomcat7<br />
<br />
Finally, set the username and password you configured in /etc/tomcat7/tomcat-users.xml<br />
<br />
== Troubleshooting ==<br />
=== OpenJDK vs Sun's JDK ===<br />
Netbeans 7.0-1 will not ALWAYS work with OpenJDK. Some reported issues are:<br />
* Starting - In some cases, netbeans will not start.<br />
* Installation - The .sh script provided by netbeans will not launch wizard (any proofs?).<br />
* JavaFX module does not work (see {{Bug|29843}}).<br />
<br />
=== Glassfish server - Can`t download Glassfish server I/O Exception ===<br />
If you are trying add new Glassfish server, you can`t download the server. Netbeans returns<br />
I/O Exception: http://java.net/download/glassgish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
<br />
Solution is:<br />
* Download GlassFish Server Open Source Edition manualy from official site, actual link is http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
* Extract from zip to any location<br />
<br />
=== Netbeans doesn't start after its first start ===<br />
If you receive a message like this when executing from terminal:<br />
{{hc|# netbeans -h|<br />
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/libsplashscreen.so: libgif.so.4: cannot open shared object file: No such file or directory<br />
}}<br />
<br />
You have two options:<br />
* You can start Netbeans using the --nosplash option:<br />
# netbeans --nosplash<br />
* Or, install the missing library ({{Pkg|libungif}}), then starting Netbeans as usual will work.<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=118930 Arch forum thread]<br />
<br />
=== Netbeans starts with a completely grey window ===<br />
{{Out of date|most likely fixed in current versions of OpenJDK}}<br />
See [[Java#Impersonate Another Window Manager]]<br />
<br />
This may not be quite 100% out of date; the problem occurred while using NetBeans 7.2, OpenJDK 7.u7_2.3.2-2, "$ java -version" reporting 1.7.0_07. The following is robbed from Awesome's wiki (although I experienced the problem using Xmonad), which fixed my all-grey window problem:<br />
<br />
<pre>$ _JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING</pre><br />
<br />
=== Integrate Netbeans with kwallet ===<br />
<br />
Netbeans may need to store some passwords. It can do that in kwallet. See netbeans' wiki [[http://wiki.netbeans.org/FaqMasterPasswordDialog]]<br />
<br />
However, you need to install and configure {{Pkg|qtchooser}} so that netbeans find the qdbus command:<br />
<br />
<pre><br />
$ pacman -S qtchooser<br />
$ ln -sf /etc/xdg/qtchooser/4.conf /etc/xdg/qtchooser/default.conf<br />
</pre><br />
See forum discussion [[https://bbs.archlinux.org/viewtopic.php?pid=1374434#p1374434]]</div>Ant1https://wiki.archlinux.org/index.php?title=Netbeans&diff=294271Netbeans2014-01-24T19:03:35Z<p>Ant1: Re-insert inadvertently removed section.</p>
<hr />
<div>[[Category:Development]]<br />
[[ar:Netbeans]]<br />
[[es:Netbeans]]<br />
'''Netbeans''' is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.<br />
<br />
From [[Wikipedia:Netbeans|Wikipedia article]]:<br />
:"''The NetBeans IDE is written in Java and can run anywhere a compatible JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages.''"<br />
<br />
== Installation ==<br />
[[pacman|Install]] the {{Pkg|netbeans}} package which is available in the [[official repositories]].<br />
<br />
== Tips and tricks ==<br />
{{Note|The global netbeans.conf {{Ic|/usr/share/netbeans/etc/netbeans.conf}} will be overwritten during updates. To keep changes add them to your local netbeans.conf {{ic|~/.netbeans/<ver>/etc/netbeans.conf}} (you will need to create the etc dir and the .conf file).}}<br />
*Settings in local version of netbeans.conf override the same settings in the global copy of the file.<br />
*Command-line options override settings in either of the configuration files.<br />
=== Font antialiasing in Netbeans ===<br />
==== Netbeans Specifically ====<br />
Add {{Ic|-J-Dswing.aatext&#61;TRUE -J-Dawt.useSystemAAFontSettings&#61;on}} to the 'netbeans_default_options' line of your netbeans.conf file.<br />
<br />
==== Java Generally ====<br />
See [[Java#Better font rendering ]].<br />
<br />
=== Look and feel ===<br />
To change Netbeans look and feel, add switch {{Ic|--laf yourLookAndFeel}} to IDE command line by appending it to ‘netbeans_default_options’ section of {{Ic|/usr/share/netbeans/etc/netbeans.conf}} or editing ''.desktop'' file with which you launch Netbeans.<br />
<br />
For GTK:<br />
{{Ic|--laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}<br />
<br />
For Nimbus:<br />
{{Ic|--laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel}}<br />
<br />
== Integrate with tomcat ==<br />
<br />
It is possible to debug web applications running on tomcat within netbeans:<br />
<br />
First install, [[tomcat]] and configure /etc/tomcat7/tomcat-users.xml<br />
<br />
Then, in netbeans go to Tools>Servers>Add Server and select Apache Tomcat.<br />
<br />
In server location specify /usr/share/tomcat7<br />
<br />
Check "Use Private Configuration Folder (Catalina Base)" and specify an empty directory where the applications will be deployed, for example /home/USER_NAME/.tomcat7<br />
<br />
Finally, set the username and password you configured in /etc/tomcat7/tomcat-users.xml<br />
<br />
== Troubleshooting ==<br />
=== OpenJDK vs Sun's JDK ===<br />
Netbeans 7.0-1 will not ALWAYS work with OpenJDK. Some reported issues are:<br />
* Starting - In some cases, netbeans will not start.<br />
* Installation - The .sh script provided by netbeans will not launch wizard (any proofs?).<br />
* JavaFX module does not work (see {{Bug|29843}}).<br />
<br />
=== Glassfish server - Can`t download Glassfish server I/O Exception ===<br />
If you are trying add new Glassfish server, you can`t download the server. Netbeans returns<br />
I/O Exception: http://java.net/download/glassgish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
<br />
Solution is:<br />
* Download GlassFish Server Open Source Edition manualy from official site, actual link is http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
* Extract from zip to any location<br />
<br />
=== Netbeans doesn't start after its first start ===<br />
If you receive a message like this when executing from terminal:<br />
{{hc|# netbeans -h|<br />
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/libsplashscreen.so: libgif.so.4: cannot open shared object file: No such file or directory<br />
}}<br />
<br />
You have two options:<br />
* You can start Netbeans using the --nosplash option:<br />
# netbeans --nosplash<br />
* Or, install the missing library ({{Pkg|libungif}}), then starting Netbeans as usual will work.<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=118930 Arch forum thread]<br />
<br />
=== Netbeans starts with a completely grey window ===<br />
{{Out of date|most likely fixed in current versions of OpenJDK}}<br />
See [[Java#Impersonate Another Window Manager]]<br />
<br />
This may not be quite 100% out of date; the problem occurred while using NetBeans 7.2, OpenJDK 7.u7_2.3.2-2, "$ java -version" reporting 1.7.0_07. The following is robbed from Awesome's wiki (although I experienced the problem using Xmonad), which fixed my all-grey window problem:<br />
<br />
<pre>$ _JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING</pre><br />
<br />
=== Integrate Netbeans with kwallet ===<br />
<br />
Netbeans may need to store some passwords. It can do that in kwallet. See netbeans' wiki [[http://wiki.netbeans.org/FaqMasterPasswordDialog]]<br />
<br />
However, you need to install and configure {{Pkg|qtchooser}} so that netbeans find the qdbus command:<br />
<br />
<pre><br />
$ pacman -S qtchooser<br />
$ ln -sf /etc/xdg/qtchooser/4.conf /etc/xdg/qtchooser/default.conf<br />
</pre><br />
See forum discussion [[https://bbs.archlinux.org/viewtopic.php?pid=1374434#p1374434]]</div>Ant1https://wiki.archlinux.org/index.php?title=Netbeans&diff=294270Netbeans2014-01-24T19:01:03Z<p>Ant1: Integrate Netbeans with kwallet</p>
<hr />
<div>[[Category:Development]]<br />
[[ar:Netbeans]]<br />
[[es:Netbeans]]<br />
'''Netbeans''' is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.<br />
<br />
From [[Wikipedia:Netbeans|Wikipedia article]]:<br />
:"''The NetBeans IDE is written in Java and can run anywhere a compatible JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages.''"<br />
<br />
== Installation ==<br />
[[pacman|Install]] the {{Pkg|netbeans}} package which is available in the [[official repositories]].<br />
<br />
== Tips and tricks ==<br />
{{Note|The global netbeans.conf {{Ic|/usr/share/netbeans/etc/netbeans.conf}} will be overwritten during updates. To keep changes add them to your local netbeans.conf {{ic|~/.netbeans/<ver>/etc/netbeans.conf}} (you will need to create the etc dir and the .conf file).}}<br />
*Settings in local version of netbeans.conf override the same settings in the global copy of the file.<br />
*Command-line options override settings in either of the configuration files.<br />
=== Font antialiasing in Netbeans ===<br />
==== Netbeans Specifically ====<br />
Add {{Ic|-J-Dswing.aatext&#61;TRUE -J-Dawt.useSystemAAFontSettings&#61;on}} to the 'netbeans_default_options' line of your netbeans.conf file.<br />
<br />
==== Java Generally ====<br />
See [[Java#Better font rendering ]].<br />
<br />
=== Look and feel ===<br />
To change Netbeans look and feel, add switch {{Ic|--laf yourLookAndFeel}} to IDE command line by appending it to ‘netbeans_default_options’ section of {{Ic|/usr/share/netbeans/etc/netbeans.conf}} or editing ''.desktop'' file with which you launch Netbeans.<br />
<br />
For GTK:<br />
{{Ic|--laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}<br />
<br />
For Nimbus:<br />
{{Ic|--laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel}}<br />
<br />
== Integrate with tomcat ==<br />
<br />
It is possible to debug web applications running on tomcat within netbeans:<br />
<br />
First install, [[tomcat]] and configure /etc/tomcat7/tomcat-users.xml<br />
<br />
Then, in netbeans go to Tools>Servers>Add Server and select Apache Tomcat.<br />
<br />
In server location specify /usr/share/tomcat7<br />
<br />
Check "Use Private Configuration Folder (Catalina Base)" and specify an empty directory where the applications will be deployed, for example /home/USER_NAME/.tomcat7<br />
<br />
Finally, set the username and password you configured in /etc/tomcat7/tomcat-users.xml<br />
<br />
== Troubleshooting ==<br />
=== OpenJDK vs Sun's JDK ===<br />
Netbeans 7.0-1 will not ALWAYS work with OpenJDK. Some reported issues are:<br />
* Starting - In some cases, netbeans will not start.<br />
* Installation - The .sh script provided by netbeans will not launch wizard (any proofs?).<br />
* JavaFX module does not work (see {{Bug|29843}}).<br />
<br />
=== Glassfish server - Can`t download Glassfish server I/O Exception ===<br />
If you are trying add new Glassfish server, you can`t download the server. Netbeans returns<br />
I/O Exception: http://java.net/download/glassgish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
<br />
Solution is:<br />
* Download GlassFish Server Open Source Edition manualy from official site, actual link is http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
* Extract from zip to any location<br />
<br />
=== Netbeans doesn't start after its first start ===<br />
If you receive a message like this when executing from terminal:<br />
{{hc|# netbeans -h|<br />
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/libsplashscreen.so: libgif.so.4: cannot open shared object file: No such file or directory<br />
}}<br />
<br />
You have two options:<br />
* You can start Netbeans using the --nosplash option:<br />
# netbeans --nosplash<br />
* Or, install the missing library ({{Pkg|libungif}}), then starting Netbeans as usual will work.<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=118930 Arch forum thread]<br />
<br />
=== Integrate Netbeans with kwallet ===<br />
<br />
Netbeans may need to store some passwords. It can do that in kwallet. See netbeans' wiki [[http://wiki.netbeans.org/FaqMasterPasswordDialog]]<br />
<br />
However, you need to install and configure {{Pkg|qtchooser}} so that netbeans find the qdbus command:<br />
<br />
<pre><br />
$ pacman -S qtchooser<br />
$ ln -sf /etc/xdg/qtchooser/4.conf /etc/xdg/qtchooser/default.conf<br />
</pre><br />
See forum discussion [[https://bbs.archlinux.org/viewtopic.php?pid=1374434#p1374434]]</div>Ant1https://wiki.archlinux.org/index.php?title=Netbeans&diff=284113Netbeans2013-11-22T15:08:04Z<p>Ant1: </p>
<hr />
<div>[[Category:Development]]<br />
[[ar:Netbeans]]<br />
[[es:Netbeans]]<br />
'''Netbeans''' is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.<br />
<br />
From [[Wikipedia:Netbeans|Wikipedia article]]:<br />
:"''The NetBeans IDE is written in Java and can run anywhere a compatible JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages.''"<br />
<br />
== Tips and tricks ==<br />
{{Note|The global netbeans.conf {{Ic|/usr/share/netbeans/etc/netbeans.conf}} will be overwritten during updates. To keep changes add them to your local netbeans.conf {{ic|~/.netbeans/<ver>/etc/netbeans.conf}} (you will need to create the etc dir and the .conf file).}}<br />
*Settings in local version of netbeans.conf override the same settings in the global copy of the file.<br />
*Command-line options override settings in either of the configuration files.<br />
=== Font antialiasing in Netbeans ===<br />
==== Netbeans Specifically ====<br />
Add {{Ic|-J-Dswing.aatext&#61;TRUE -J-Dawt.useSystemAAFontSettings&#61;on}} to the 'netbeans_default_options' line of your netbeans.conf file.<br />
<br />
==== Java Generally ====<br />
See [[Java#Better font rendering ]].<br />
<br />
=== Look and feel ===<br />
To change Netbeans look and feel, add switch {{Ic|--laf yourLookAndFeel}} to IDE command line by appending it to ‘netbeans_default_options’ section of {{Ic|/usr/share/netbeans/etc/netbeans.conf}} or editing ''.desktop'' file with which you launch Netbeans.<br />
<br />
For GTK:<br />
{{Ic|--laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}<br />
<br />
For Nimbus:<br />
{{Ic|--laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel}}<br />
<br />
== Integrate with tomcat ==<br />
<br />
It is possible to debug web applications running on tomcat within netbeans:<br />
<br />
First install, [[tomcat]] and configure /etc/tomcat7/tomcat-users.xml<br />
<br />
Then, in netbeans go to Tools>Servers>Add Server and select Apache Tomcat.<br />
<br />
In server location specify /usr/share/tomcat7<br />
<br />
Check "Use Private Configuration Folder (Catalina Base)" and specify an empty directory where the applications will be deployed, for example /home/USER_NAME/.tomcat7<br />
<br />
Finally, set the username and password you configured in /etc/tomcat7/tomcat-users.xml<br />
<br />
== Troubleshooting ==<br />
=== OpenJDK vs Sun's JDK ===<br />
Netbeans 7.0-1 will not ALWAYS work with OpenJDK. Some reported issues are:<br />
* Starting - In some cases, netbeans will not start.<br />
* Installation - The .sh script provided by netbeans will not launch wizard (any proofs?).<br />
* JavaFX module does not work (see {{Bug|29843}}).<br />
<br />
=== Glassfish server - Can`t download Glassfish server I/O Exception ===<br />
If you are trying add new Glassfish server, you can`t download the server. Netbeans returns<br />
I/O Exception: http://java.net/download/glassgish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
<br />
Solution is:<br />
* Download GlassFish Server Open Source Edition manualy from official site, actual link is http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
* Extract from zip to any location<br />
<br />
=== Netbeans doesn't start after its first start ===<br />
If you receive a message like this when executing from terminal:<br />
{{hc|# netbeans -h|<br />
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/libsplashscreen.so: libgif.so.4: cannot open shared object file: No such file or directory<br />
}}<br />
<br />
You have two options:<br />
* You can start Netbeans using the --nosplash option:<br />
# netbeans --nosplash<br />
* Or, install the missing library ({{Pkg|libungif}}), then starting Netbeans as usual will work.<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=118930 Arch forum thread]<br />
<br />
=== Netbeans starts with a completely grey window ===<br />
{{Out of date|most likely fixed in current versions of OpenJDK}}<br />
See [[Java#Impersonate Another Window Manager]]<br />
<br />
This may not be quite 100% out of date; the problem occurred while using NetBeans 7.2, OpenJDK 7.u7_2.3.2-2, "$ java -version" reporting 1.7.0_07. The following is robbed from Awesome's wiki (although I experienced the problem using Xmonad), which fixed my all-grey window problem:<br />
<br />
<pre>$ _JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING</pre></div>Ant1https://wiki.archlinux.org/index.php?title=Netbeans&diff=279017Netbeans2013-10-18T22:38:01Z<p>Ant1: Remove obsolete part.</p>
<hr />
<div>[[Category:Development]]<br />
[[ar:Netbeans]]<br />
[[es:Netbeans]]<br />
'''Netbeans''' is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.<br />
<br />
From [[Wikipedia:Netbeans|Wikipedia article]]:<br />
:"''The NetBeans IDE is written in Java and can run anywhere a compatible JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages.''"<br />
<br />
== Tips and tricks ==<br />
{{Note|The global netbeans.conf {{Ic|/usr/share/netbeans/etc/netbeans.conf}} will be overwritten during updates. To keep changes add them to your local netbeans.conf {{ic|~/.netbeans/<ver>/etc/netbeans.conf}} (you will need to create the etc dir and the .conf file).}}<br />
*Settings in local version of netbeans.conf override the same settings in the global copy of the file.<br />
*Command-line options override settings in either of the configuration files.<br />
=== Font antialiasing in Netbeans ===<br />
==== Netbeans Specifically ====<br />
Add {{Ic|-J-Dswing.aatext&#61;TRUE -J-Dawt.useSystemAAFontSettings&#61;on}} to the 'netbeans_default_options' line of your netbeans.conf file.<br />
<br />
==== Java Generally ====<br />
See [[Java#Better font rendering ]].<br />
<br />
=== Look and feel ===<br />
To change Netbeans look and feel, add switch {{Ic|--laf yourLookAndFeel}} to IDE command line by appending it to ‘netbeans_default_options’ section of {{Ic|/usr/share/netbeans/etc/netbeans.conf}} or editing ''.desktop'' file with which you launch Netbeans.<br />
<br />
For GTK:<br />
{{Ic|--laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}<br />
<br />
For Nimbus:<br />
{{Ic|--laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel}}<br />
<br />
== Troubleshooting ==<br />
=== OpenJDK vs Sun's JDK ===<br />
Netbeans 7.0-1 will not ALWAYS work with OpenJDK. Some reported issues are:<br />
* Starting - In some cases, netbeans will not start.<br />
* Installation - The .sh script provided by netbeans will not launch wizard (any proofs?).<br />
* JavaFX module does not work (see {{Bug|29843}}).<br />
<br />
=== Glassfish server - Can`t download Glassfish server I/O Exception ===<br />
If you are trying add new Glassfish server, you can`t download the server. Netbeans returns<br />
I/O Exception: http://java.net/download/glassgish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
<br />
Solution is:<br />
* Download GlassFish Server Open Source Edition manualy from official site, actual link is http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
* Extract from zip to any location<br />
<br />
=== Netbeans doesn't start after its first start ===<br />
If you receive a message like this when executing from terminal:<br />
{{hc|# netbeans -h|<br />
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/libsplashscreen.so: libgif.so.4: cannot open shared object file: No such file or directory<br />
}}<br />
<br />
You have two options:<br />
* You can start Netbeans using the --nosplash option:<br />
# netbeans --nosplash<br />
* Or, install the missing library ({{Pkg|libungif}}), then starting Netbeans as usual will work.<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=118930 Arch forum thread]<br />
<br />
=== Netbeans starts with a completely grey window ===<br />
{{Out of date|most likely fixed in current versions of OpenJDK}}<br />
See [[Java#Impersonate Another Window Manager]]<br />
<br />
This may not be quite 100% out of date; the problem occurred while using NetBeans 7.2, OpenJDK 7.u7_2.3.2-2, "$ java -version" reporting 1.7.0_07. The following is robbed from Awesome's wiki (although I experienced the problem using Xmonad), which fixed my all-grey window problem:<br />
<br />
<pre>$ _JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING</pre></div>Ant1https://wiki.archlinux.org/index.php?title=Netbeans&diff=277970Netbeans2013-10-07T17:45:01Z<p>Ant1: /* GTK look and feel */</p>
<hr />
<div>[[Category:Development]]<br />
[[ar:Netbeans]]<br />
[[es:Netbeans]]<br />
'''Netbeans''' is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.<br />
<br />
From [[Wikipedia:Netbeans|Wikipedia article]]:<br />
:"''The NetBeans IDE is written in Java and can run anywhere a compatible JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages.''"<br />
<br />
== Tips and tricks ==<br />
{{Note|The global netbeans.conf {{Ic|/usr/share/netbeans/etc/netbeans.conf}} will be overwritten during updates. To keep changes add them to your local netbeans.conf {{ic|~/.netbeans/<ver>/etc/netbeans.conf}} (you will need to create the etc dir and the .conf file).}}<br />
*Settings in local version of netbeans.conf override the same settings in the global copy of the file.<br />
*Command-line options override settings in either of the configuration files.<br />
=== Font antialiasing in Netbeans ===<br />
==== Netbeans Specifically ====<br />
Add {{Ic|-J-Dswing.aatext&#61;TRUE -J-Dawt.useSystemAAFontSettings&#61;on}} to the 'netbeans_default_options' line of your netbeans.conf file.<br />
<br />
==== Java Generally ====<br />
See [[Java#Better font rendering ]].<br />
<br />
=== Look and feel ===<br />
To change Netbeans look and feel, add switch {{Ic|--laf yourLookAndFeel}} to IDE command line by appending it to ‘netbeans_default_options’ section of {{Ic|/usr/share/netbeans/etc/netbeans.conf}} or editing ''.desktop'' file with which you launch Netbeans.<br />
<br />
For GTK:<br />
{{Ic|--laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}<br />
<br />
For Nimbus:<br />
{{Ic|--laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel}}<br />
<br />
== Troubleshooting ==<br />
=== OpenJDK vs Sun's JDK ===<br />
Netbeans 7.0-1 will not ALWAYS work with OpenJDK. Some reported issues are:<br />
* Starting - In some cases, netbeans will not start.<br />
* Installation - The .sh script provided by netbeans will not launch wizard (any proofs?).<br />
* JavaFX module does not work (see {{Bug|29843}}).<br />
<br />
=== Glassfish server - Can`t download Glassfish server I/O Exception ===<br />
If you are trying add new Glassfish server, you can`t download the server. Netbeans returns<br />
I/O Exception: http://java.net/download/glassgish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
<br />
Solution is:<br />
* Download GlassFish Server Open Source Edition manualy from official site, actual link is http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
* Extract from zip to any location<br />
<br />
=== Netbeans doesn't start after its first start ===<br />
If you receive a message like this when executing from terminal:<br />
{{hc|# netbeans -h|<br />
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/libsplashscreen.so: libgif.so.4: cannot open shared object file: No such file or directory<br />
}}<br />
<br />
You have two options:<br />
* You can start Netbeans using the --nosplash option:<br />
# netbeans --nosplash<br />
* Or, install the missing library ({{Pkg|libungif}}), then starting Netbeans as usual will work.<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=118930 Arch forum thread]<br />
<br />
=== Netbeans starts with a completely grey window ===<br />
{{Out of date|most likely fixed in current versions of OpenJDK}}<br />
See [[Java#Impersonate Another Window Manager]]<br />
<br />
This may not be quite 100% out of date; the problem occurred while using NetBeans 7.2, OpenJDK 7.u7_2.3.2-2, "$ java -version" reporting 1.7.0_07. The following is robbed from Awesome's wiki (although I experienced the problem using Xmonad), which fixed my all-grey window problem:<br />
<br />
<pre>$ _JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING</pre><br />
<br />
=== Netbeans does not detect the connector plugin with Chromium ===<br />
Netbeans is reading inside ~/.config/chrome instead of ~/.config/chromium<br />
<br />
You can fix this by creating a symbolic link:<br />
<pre>$ cd ~/.config<br />
$ ln -s chromium chrome</pre></div>Ant1https://wiki.archlinux.org/index.php?title=Netbeans&diff=270516Netbeans2013-08-09T15:08:41Z<p>Ant1: </p>
<hr />
<div>[[Category:Development]]<br />
[[ar:Netbeans]]<br />
[[es:Netbeans]]<br />
'''Netbeans''' is an integrated development environment (IDE) for developing with Java, JavaScript, PHP, Python, Ruby, Groovy, C, C++, Scala, Clojure, and other languages.<br />
<br />
From [[Wikipedia:Netbeans|Wikipedia article]]:<br />
:"''The NetBeans IDE is written in Java and can run anywhere a compatible JVM is installed, including Windows, Mac OS, Linux, and Solaris. A JDK is required for Java development functionality, but is not required for development in other programming languages.''"<br />
<br />
== Tips and tricks ==<br />
{{Note|The global netbeans.conf {{Ic|/usr/share/netbeans/etc/netbeans.conf}} will be overwritten during updates. To keep changes add them to your local netbeans.conf {{ic|~/.netbeans/<ver>/etc/netbeans.conf}} (you will need to create the etc dir and the .conf file).}}<br />
*Settings in local version of netbeans.conf override the same settings in the global copy of the file.<br />
*Command-line options override settings in either of the configuration files.<br />
=== Font antialiasing in Netbeans ===<br />
==== Netbeans Specifically ====<br />
Add {{Ic|-J-Dswing.aatext&#61;TRUE -J-Dawt.useSystemAAFontSettings&#61;on}} to the 'netbeans_default_options' line of your netbeans.conf file.<br />
<br />
==== Java Generally ====<br />
See [[Java#Better font rendering ]].<br />
<br />
=== GTK look and feel ===<br />
To change Netbeans look and feel to GTK add switch {{Ic|--laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel}} to IDE command line by appending it to ‘netbeans_default_options’ section of {{Ic|/usr/share/netbeans/etc/netbeans.conf}} or editing ''.desktop'' file with which you launch Netbeans.<br />
<br />
== Troubleshooting ==<br />
=== OpenJDK vs Sun's JDK ===<br />
Netbeans 7.0-1 will not ALWAYS work with OpenJDK. Some reported issues are:<br />
* Starting - In some cases, netbeans will not start.<br />
* Installation - The .sh script provided by netbeans will not launch wizard (any proofs?).<br />
* JavaFX module does not work (see {{Bug|29843}}).<br />
<br />
=== Glassfish server - Can`t download Glassfish server I/O Exception ===<br />
If you are trying add new Glassfish server, you can`t download the server. Netbeans returns<br />
I/O Exception: http://java.net/download/glassgish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
<br />
Solution is:<br />
* Download GlassFish Server Open Source Edition manualy from official site, actual link is http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip<br />
* Extract from zip to any location<br />
<br />
=== Netbeans doesn't start after its first start ===<br />
If you receive a message like this when executing from terminal:<br />
{{hc|# netbeans -h|<br />
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/libsplashscreen.so: libgif.so.4: cannot open shared object file: No such file or directory<br />
}}<br />
<br />
You have two options:<br />
* You can start Netbeans using the --nosplash option:<br />
# netbeans --nosplash<br />
* Or, install the missing library ({{Pkg|libungif}}), then starting Netbeans as usual will work.<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=118930 Arch forum thread]<br />
<br />
=== Netbeans starts with a completely grey window ===<br />
{{Out of date|most likely fixed in current versions of OpenJDK}}<br />
See [[Java#Impersonate Another Window Manager]]<br />
<br />
This may not be quite 100% out of date; the problem occurred while using NetBeans 7.2, OpenJDK 7.u7_2.3.2-2, "$ java -version" reporting 1.7.0_07. The following is robbed from Awesome's wiki (although I experienced the problem using Xmonad), which fixed my all-grey window problem:<br />
<br />
<pre>$ _JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING</pre><br />
<br />
=== Netbeans does not detect the connector plugin with Chromium ===<br />
Netbeans is reading inside ~/.config/chrome instead of ~/.config/chromium<br />
<br />
You can fix this by creating a symbolic link:<br />
<pre>$ cd ~/.config<br />
$ ln -s chromium chrome</pre></div>Ant1https://wiki.archlinux.org/index.php?title=Android&diff=244604Android2013-01-20T21:53:05Z<p>Ant1: /* Setting up Development Environtment */</p>
<hr />
<div>[[Category:Development]]<br />
[[it:Android]]<br />
[[ru:Android]]<br />
[[zh-CN:Android]]<br />
== Android Development on Arch ==<br />
<br />
3 steps : Android SDK core component, Android SDK packages, development environtment<br />
<br />
=== Install Android SDK core components ===<br />
Before developing android applications, you need to install at least one Android platform. Install core SDK components from [[Arch User Repository|AUR]]:<br />
<br />
# {{AUR|android-sdk}}<br />
# {{AUR|android-sdk-platform-tools}}<br />
<br />
Typical installation location is {{Ic|/opt/android-sdk}}.<br />
<br />
<br />
{{Note|If you are running Arch64, you have to enable [[Arch64_FAQ#Multilib_Repository_-_Multilib_Project | the multilib repo]], to be able to to install the required dependencies using [[pacman]].}}<br />
<br />
=== Getting Android SDK packages ===<br />
And then install the Android SDK packages which can be done either automatically ,from [[Arch User Repository|AUR]], or manually.<br />
<br />
<br />
==== Automatic installation ====<br />
Automatic installation is done via the Android SDK and device manager, which is accessible by invoking (assuming that the {{Ic|$PATH}} [[Environment Variables|variable]] contains the path to the Android SDK {{ic|tools}} directory):<br />
android<br />
<br />
or alternatively:<br />
./<path_to_android-sdk>/tools/android<br />
<br />
If the automatic installation errors out, then you must either run the android tool with heightened privileges or set your user account as the owner of the directory. To change the owner ID for all SDK directories, run the following command as root:<br />
chown -R USER /opt/android-sdk<br />
<br />
To change the group ID instead (recommended for multiple users), first create the group, perhaps called ''android'', and add your user account to it:<br />
groupadd android<br />
gpasswd -a USER android<br />
Next, change the directory permissions:<br />
chgrp -R android /opt/android-sdk<br />
chmod -R g+w /opt/android-sdk<br />
find /opt/android-sdk -type d -exec chmod g+s {} \;<br />
The final command sets the ''setgid'' bit on all subdirectories so that any new files created within them will inherit the proper group ID.<br />
<br />
For step-by-step automatic installation, see: [http://developer.android.com/sdk/adding-components.html Installing SDK Components].<br />
<br />
==== Getting from AUR ====<br />
AUR currently contains multiple packages with Android platforms sometimes duplicating each other and/or having incorrect file permissions set. <br />
<br />
<br />
==== Manual installation ====<br />
For manual installation:<br />
# Download the platform you want to develop on. [http://qdevarena.blogspot.com/2010/05/download-android-sdk-standalone-for.html This site] provides online links to several Android SDK components.<br />
# Extract the tarball to {{ic|/<path_to_android-sdk>/platforms}}.<br />
<br />
Now, you should see the platform of your choice installed in the Installed Packages window of the Android SDK and device manager.<br />
<br />
=== Setting up Development Environment ===<br />
<br />
When using [[Eclipse]] as an IDE you need to install the ADT plugin and related packages. If you get a message about unresolvable dependencies, install [[Java]] manually and try again. Alternatively you can use [[Netbeans]] for development after installing living and usually up to date plugin according to [http://www.nbandroid.org/p/installation.html these instructions].<br />
<br />
==== Setting up Eclipse ====<br />
Most stuff required for Android development in Eclipse is already packaged in AUR:<br />
<br />
Official plugin by Google &ndash; [http://developer.android.com/sdk/eclipse-adt.html Eclipse ADT]:<br />
# {{AUR|eclipse-android}}<br />
<br />
Dependencies:<br />
# {{AUR|eclipse-emf}}<br />
# {{AUR|eclipse-gef}}<br />
# {{AUR|eclipse-wtp}}<br />
<br />
{{Note|<br />
* as an alternative, you can install the ADT via eclipse's built in "add new software" command (see instructions on ADT site).<br />
* if you are in real trouble, it is also possible to download Android SDK and use the bundled Eclipse. This usually works without problems.}}<br />
<br />
Enter the path to the Android SDK Location in<br />
<br />
Windows -> Preferences -> Android<br />
<br />
==== Setting up Netbeans ====<br />
If you prefer using Netbeans as your IDE and want to develop Android applications, download the [http://www.nbandroid.org nbandroid] by going to:<br />
<br />
Tools -> Plugins -> Settings<br />
<br />
Add the following URL: http://kenai.com/projects/nbandroid/downloads/download/updatecenter/updates.xml<br />
<br />
<br />
Then go to '''Available Plugins''' and install the '''Android''' and '''Android Test Runner''' plugins for your IDE version. Once you have installed go to:<br />
<br />
if you have problem with netbeans 7.2 "org.netbeans.modules.gsf.testrunner was needed and not found." Please remove the the '''Android''' and '''Android Test Runner''' , then change the url of nbandroid to: http://nbandroid.org/release72/updates/updates.xml , update the sources and you just need to install the '''Android''' only.<br />
<br />
Tools -> Options -> Miscellaneous -> Android<br />
<br />
and select the path where the SDK is installed. That's it, now you can create a new Android project and start developing using Netbeans.<br />
<br />
=== Connecting to a real device - Android Debug Bridge (ADB) ===<br />
To get ADB to connect to a real device or phone under Arch, you must install the [[udev]] rules to connect the device to the proper {{Ic|/dev/}} entries.<br />
<br />
==== Using existing rules ====<br />
Install the AUR package {{AUR|android-udev}} to get a common list of vendor IDs. If [[#Does It Work?|ADB recognizes your device]] (it is visible and accessible in IDE), you are done. Otherwise see instructions below.<br />
<br />
==== Figure Out Your Device Ids ====<br />
Each Android device has a USB vendor/product ID. An example for HTC Evo is:<br />
vendor id: 0bb4<br />
product id: 0c8d<br />
<br />
Plug in your device and execute:<br />
# lsusb<br />
<br />
It should come up something like this:<br />
Bus 002 Device 006: ID 0bb4:0c8d High Tech Computer Corp.<br />
<br />
==== Adding udev Rules ====<br />
Use the rules from [http://source.android.com/source/initializing.html#configuring-usb-access Android developer] or you can use the following template for your udev rules, just replace [VENDOR ID] and [PRODUCT ID] with yours. Copy these rules into {{ic|/etc/udev/rules.d/51-android.rules}}:<br />
<br />
{{hc|/etc/udev/rules.d/51-android.rules|2=<nowiki>SUBSYSTEM=="usb", ATTR{idVendor}=="[VENDOR ID]", MODE="0666"<br />
SUBSYSTEM=="usb",ATTR{idVendor}=="[VENDOR ID]",ATTR{idProduct}=="[PRODUCT ID]",SYMLINK+="android_adb"<br />
SUBSYSTEM=="usb",ATTR{idVendor}=="[VENDOR ID]",ATTR{idProduct}=="[PRODUCT ID]",SYMLINK+="android_fastboot"</nowiki>}}<br />
<br />
Then, to reload your new udev rules, execute:<br />
# udevadm control --reload-rules<br />
<br />
Note: reloading udev rules under systemd should not be required, as any rule changes should be picked up automatically.<br />
<br />
==== Does It Work? ====<br />
<br />
After you have setup the udev rules, unplug your device and replug it.<br />
<br />
After running:<br />
$ adb devices<br />
<br />
you should see something like:<br />
List of devices attached <br />
HT07VHL00676 device<br />
<br />
If you do not have the '''adb''' program (usually available in {{Ic|/opt/android-sdk/platform-tools/}}), it means you have not installed the platform tools.<br />
<br />
If you are getting an empty list (your device isn't there), it may be because you have not enabled USB debugging on your device. You can do that by going to Settings => Applications => Development and enabling USB debugging. On Android 4.2 (Jelly Bean) the Development menu is hidden; to enable it go to Settings => About phone and tap Build number 7 times.<br />
<br />
{{Tip|Make sure that your user is added to the group:<br />
# gpasswd -a ''username'' adbusers<br />
}}<br />
<br />
If there are still problems such as '''adb''' displaying "???????? no permissions" under devices, try restarting the adb server as root.<br />
# adb kill-server<br />
# adb start-server<br />
<br />
=== Tools specific to NVIDIA Tegra platform ===<br />
<br />
If you target your application at NVIDIA Tegra platform, you might also want to install tools, samples and documentation provided by NVIDIA. In [http://developer.nvidia.com/category/zone/mobile-development NVIDIA Developer Zone for Mobile] there are two packages - [http://developer.nvidia.com/tegra-resources Tegra Android Development Pack], available from AUR as {{AUR|tegra-devpack}} and [http://developer.nvidia.com/tegra-resources Tegra Toolkit], available from AUR as {{AUR|tegra-toolkit}}.<br />
<br />
The {{AUR|tegra-toolkit}} package provides tools (mostly CPU and GPU optimization related), samples and documentation, while the {{AUR|tegra-devpack}} provides tools (NVIDIA Debug Manager) related to [http://developer.android.com/sdk/eclipse-adt.html Eclipse ADT] and their documentation.<br />
<br />
=== Tethering ===<br />
See [[Android_Tethering]]<br />
<br />
== Building Android ==<br />
<br />
To build android, you need to install these packages.<br />
<br />
For 32 bits or 64 bits systems<br />
<br />
git gnupg flex bison gperf sdl wxgtk squashfs-tools curl ncurses zlib schedtool openjdk6 perl-switch zip unzip<br />
<br />
Only for 64 bits systems<br />
<br />
lib32-zlib lib32-ncurses lib32-readline gcc-libs-multilib gcc-multilib lib32-gcc-libs<br />
<br />
And you need to change the default python from version 3 to version 2<br />
<br />
# rm /usr/bin/python<br />
# ln -s /usr/bin/python2 /usr/bin/python<br />
<br />
Download the '''repo''' utility.<br />
<br />
$ mkdir ~/bin<br />
$ export PATH=~/bin:$PATH<br />
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo<br />
$ chmod a+x ~/bin/repo<br />
<br />
Create a directory to build.<br />
<br />
$ mkdir ~/android<br />
$ cd ~/android<br />
<br />
Synchronize the repositories.<br />
<br />
$ repo init -u https://android.googlesource.com/platform/manifest (checkout the master)<br />
$ repo sync<br />
<br />
Wait a lot. <br />
<br />
When finished, start building.<br />
<br />
$ source build/envsetup.sh<br />
$ lunch full-eng<br />
$ make -j4<br />
<br />
If you run '''lunch''' without arguments, it will ask what build you want to create. Use -j with a number between the number of cores and 2 * number of cores.<br />
<br />
The build takes a lot of time.<br />
<br />
When finished, run the final image.<br />
<br />
$ emulator<br />
<br />
== Tips & Tricks ==<br />
=== During Debugging "Source not found" ===<br />
Most probably the debugger wants to step into the Java code. As the source code of Android does not come with the Android SDK, this leads to an error. The best solution is to use step filters to not jump into the Java source code. Step filters are not activated by default. To activate them: <br />
Window -> Preferences -> Java -> Debug -> Step Filtering<br />
Consider to select them all. If appropriate you can add the android.* package. See the forum post for more information: http://www.eclipsezone.com/eclipse/forums/t83338.rhtml<br />
<br />
=== Linux distribution on the sdcard ===<br />
You can install Debian like in this [http://forum.xda-developers.com/showthread.php?t=631389 thread]. Excellent guide to installing Arch in chroot (in parallel with Android) can be found on [http://archlinuxarm.org/forum/viewtopic.php?f=27&t=1361&start=40 archlinuxarm.org forum].<br />
<br />
=== Android SDK on Arch 64 ===<br />
When using the Android SDK and the Eclipse plugin on a 64 bit system, and the 'emulator' always crashes with a segfault, do the following:<br />
Provide a localtime file in /usr/share/zoneinfo/localtime e.g.: <br />
# cp /usr/share/zoneinfo/Europe/Berlin /usr/share/zoneinfo/localtime<br />
<br />
=== Better MTPFS Support ===<br />
If you have an Android device that doesn't support UMS and you find mtpfs to be extremely slow you can install {{AUR|jmtpfs}} from the AUR.</div>Ant1https://wiki.archlinux.org/index.php?title=Advanced_Format&diff=240817Advanced Format2012-12-18T22:29:02Z<p>Ant1: /* Current HDD Models that Employ a 4k Sectors */</p>
<hr />
<div>[[Category:Storage]]<br />
==Introduction==<br />
The 'advanced format' feature reduces overhead by using 4 kilobyte sectors instead of the traditional 512 byte sectors. The old format gave a format efficiency of 87%. Advanced Format results in a format efficiency of 96% which increases space by up to 11%. The 4k sector is slated to become the next standard for HDDs by 2014.<br />
<br />
===More Detailed Explanation===<br />
The main idea behind using 4096-byte sectors is to increase the bit density on each track by reducing the number of gaps which hold Sync/DAM and ECC (Error Correction Code) information between data sectors. For eight 512-byte sectors, the track also holds eight sector gaps.<br />
<br />
By having one single sector of size 4096-byte (8 x 512-byte), the track holds only 1 sector gap for each data sector thus reducing an overhead for a need to support multiple Sync/DAM and ECC blocks and at the same time increasing bit density.<br />
<br />
Linux partitioning tools by default start each partition on sector 63 which leads to a bad performance in HDDs that use this 4K sector size due to misalignment to 4K sector from the beginning of the track.<br />
<br />
===External Links===<br />
*[http://www.anandtech.com/Show/Index/2888?cPage=2&all=False&sort=0&page=1 Western Digital’s Advanced Format: The 4K Sector Transition Begins]<br />
*[http://www.wdc.com/wdproducts/library/WhitePapers/ENG/2579-771430.pdf White paper entitled "Advanced Format Technology."]<br />
*Failure to align one's HDD results in poor read/write performance. See [http://www.linuxconfig.org/linux-wd-ears-advanced-format this article] for specific examples.<br />
<br />
==Current HDD Models that Employ a 4k Sectors==<br />
As of June 2011, there are a limited number of HDDs that support "Advanced Format" or 4k sectors as shown below.<br />
<br />
All drives in this list have a physical sector size of 4096 bytes, but not all drives correctly report this to the OS. The actual value reported (via new fields in the ATA-8 spec) is shown in the table as the physical reported sector size. As this is the value partitioning tools use for alignment, it is important that it should be 4096 to avoid misalignment issues.<br />
<br />
The logical sector size is the sector size used for data transfer. This value multiplied by the number of LBA sectors on the disk gives the disk capacity. Thus a disk with 4096 byte logical sectors will have a lower maximum LBA for the same capacity compared to a drive with 512 byte sectors. Drives with 512 byte logical sectors offer better compatibility with legacy operating systems (roughly those released before 2009) however drives with 4096 byte logical sectors may offer marginally better performance (e.g. more read/write requests may fit into the NCQ buffer.)<br />
<br />
{|class="wikitable"<br />
!rowspan=2| Manufacturer !!rowspan=2| Model !!rowspan=2| Capacity !!colspan=2| Reported sector size (bytes)<br />
|-<br />
! Logical !! Physical<br />
|-<br />
|colspan=5| '''3.5"'''<br />
|-<br />
| Western Digital || WD30EZRX || 3.0 TB || 512 || 4096<br />
|-<br />
| Western Digital || WD30EZRSDTL || 3.0 TB<br />
|-<br />
| Western Digital || WD25EZRSDTL || 2.5 TB<br />
|-<br />
| Samsung || HD204UI || 2.0 TB || 512 || 512<br />
|-<br />
| Seagate || ST1000DL002 || 1.0 TB || 512 || 4096<br />
|-<br />
| Seagate || ST1000DM003 || 1.0 TB || 512 || 4096<br />
|-<br />
| Seagate || ST2000DL003 || 2.0 TB || 512 || 512<br />
|-<br />
| Seagate || ST2000DM001 || 2.0 TB || 512 || 4096<br />
|-<br />
| Seagate || ST3000DM001 || 3.0 TB || 512 || 4096<br />
|-<br />
| Western Digital || WD20EARS || 2.0 TB || 512 || [http://community.wdc.com/t5/Desktop/4k-sector-drive-reporting-512-byte-sectors-to-OS-why/td-p/205060 512]<br />
|-<br />
| Western Digital || WD20EARX || 2.0 TB || 512 || 4096<br />
|-<br />
| Western Digital || WD15EARS || 1.5 TB || 512 || [http://excess.org/article/2010/11/wd-hdd-lying-about-4k-sectors/ 4096]<br />
|-<br />
| Western Digital || WD10EARS || 1.0 TB<br />
|-<br />
| Western Digital || WD10EURS || 1.0 TB<br />
|-<br />
| Western Digital || WD8000AARS || 800.0 GB<br />
|-<br />
| Western Digital || WD6400AARS || 640.0 GB<br />
|-<br />
|colspan=5| '''2.5"'''<br />
|-<br />
| Western Digital || WD10JPVT || 1.0 TB || 512 || 4096<br />
|-<br />
| Western Digital || WD10TPVT || 1.0 TB<br />
|-<br />
| Western Digital || WD7500BPVT || 750.0 GB<br />
|-<br />
| Western Digital || WD7500KPVT || 750.0 GB<br />
|-<br />
| Western Digital || WD6400BPVT || 640.0 GB<br />
|-<br />
| Western Digital || WD5000BPVT || 500.0 GB<br />
|-<br />
| Western Digital || WD3200BPVT || 320.0 GB<br />
|-<br />
| Western Digital || WD2500BPVT || 250.0 GB || 512 || 4096<br />
|-<br />
| Western Digital || WD1600BPVT || 160.0 GB<br />
|-<br />
| TOSHIBA || MQ01ABD100 || 1.0 TB || 512 || 4096<br />
|}<br />
<br />
{{Note| Readers are encouraged to add to this table.}}<br />
<br />
== How to determine if HDD employ a 4k sector ==<br />
<br />
Tools which will report the physical sector of a drive (provided the drive will report it correctly) includes<br />
* smartmontools (since 5.41 ; smartmontools -a, in information section)<br />
* hdparm (since 9.12 ; hdparm -I, in configuration section)<br />
<br />
Note that both works even for USB-attached discs (if the USB bridge supports SAT aka SCSI/ATA Translation, ANSI INCITS 431-2007).<br />
<br />
==Aligning Partitions==<br />
===Check your partitions alignment===<br />
{{Note|This only works with [[MBR]], not [[GPT]].}}<br />
# fdisk -lu /dev/sda<br />
...<br />
# Device Boot Start End Blocks Id System<br />
# /dev/sda1 2048 46876671 23437312 7 HPFS/NTFS<br />
<br />
2048 (default since fdisk 2.17.2) means that your HDD is aligned correctly.<br />
Any other value divisible by 8 is good as well.<br />
<br />
===GPT (Recommended)===<br />
When using [[GPT]] partition tables, one need only use gdisk to create partitions which are aligned by default. For an example, see [[SSD#Detailed_Usage_Example]].<br />
<br />
===MBR (Not Recommended)===<br />
One can employ fdisk to align partitions to sector 2048 which will ensure that the partitions are aligned to the 4k sector. Interestingly, in sector mode, the default starting point is not 63 or 64 but 2048 in the current version of fdisk (2.17.2) so it is automatically taking care of the 4k sector size!<br />
<br />
# fdisk -c -u /dev/sda<br />
<br />
==Special Consideration for WD Green HDDs==<br />
<br />
FYI - this section has nothing to do with Advanced Format technology, but this is an appropriate location to share it with users. The WD20EARS (and other sizes include 1.0 and 1.5 TB driver in the series) will attempt to park the read heads once every 8 seconds FOR THE LIFE OF THE HDD which is just horrible! To see if you are affected use the smartctl command (part of smartmontools). If the last column changes rapidly, this section applies to your drive. <br />
# smartctl /dev/sdb -a | grep '^193'<br />
193 Load_Cycle_Count 0x0032 001 001 000 Old_age Always - 597115<br />
<br />
=== Disable via hdparm ===<br />
Use hdparm in {{ic|/etc/systemd/system/lcc_fix.service}} to disable this 'feature' and likely add life to your hdd:<br />
<br />
{{hc|/etc/systemd/system/lcc_fix.service |<nowiki><br />
[Unit]<br />
Description=WDIDLE3<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/sbin/hdparm -J 300 --please-destroy-my-drive /dev/sdX<br />
TimeoutSec=0<br />
StandardInput=tty<br />
RemainAfterExit=yes<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
</nowiki>}}<br />
<br />
Start the service<br />
# systemctl start lcc_fix.service<br />
<br />
Enable the service to autorun at boot.<br />
# systemctl enable lcc_fix.service<br />
<br />
==== Is this safe? ====<br />
Why do we need to pass the "--please-destroy-my-drive" flag? Here is an email from hdparm author, Mark Lord:<br />
<br />
> I have a Western DIgital \"Green\" drive (wd20ears). I noticed you added a -J switch and that <br />
> it is said to adjust the idle3 timeout. What frightens me is the output you gave it:<br />
> <br />
> How safe or not is this to use?<br />
<br />
I use it on my own drives. It works for me.<br />
<br />
If you can run the WDIDLE3.EXE MS-Dos program,<br />
then use it instead -- it was written by WD,<br />
and only they know how things really work there.<br />
<br />
If you cannot use the WDIDLE3.EXE, then you<br />
could consider "hdparm -J". It works for me,<br />
but it may or may not void some kind of warranty.<br />
<br />
Cheers<br />
-- <br />
Mark Lord<br />
Real-Time Remedies Inc.<br />
mlord@pobox.com<br />
<br />
=== Disable atime ===<br />
<br />
Be sure to disable atime by adding the "noatime" or "relatime" (default since kernel 2.6.30) option to each mount in [[fstab]]. Without this flag every file access will force a write to disk waking it up.<br />
<br />
=== Disable via changing firmware value (persistent) ===<br />
<br />
{{Warning|The tool used in this process is experimental, use at your own risk!}}<br />
<br />
{{Note|This method is persistant, you only need to do this once for every drive.}}<br />
<br />
This method will use a utility called idle3ctl to alter the firmware value for the idle3 timer on WD hard drives (similar to wdidle3.exe from WD). The advantage compared to the official utility is you do not need to create a DOS bootdisk first to change the idle3 timer value. Additionally idle3ctl might also work over USB-to-S-ATA bridges (in some cases).<br />
Download [http://idle3-tools.sourceforge.net/ idle3ctl], extract and compile it.<br />
Within the folder that contains the newly compiled binary, execute<br />
<br />
$ sudo ./idle3ctl -g /dev/your_wd_hdd<br />
<br />
to get the raw idle3 timer value.<br />
You can disable the Intellipark feature completely, with:<br />
<br />
$ sudo ./idle3ctl -d /dev/your_wd_hdd<br />
<br />
or set it to a different value (''0''-''255'') with (e.g. 10 seconds):<br />
<br />
$ sudo ./idle3ctl -s 100 /dev/your_wd_hd<br />
<br />
The range ''0''-''128'' is in 0.1s and ''129-255'' in 30s. For the chages to take effect, the drive needs to go through one powercycle, meaning powering it off and on again (on internal drives, a reboot is not sufficient).<br />
<br />
If your WD hard drive is not recognized, you can use the ''--force'' option. For more options see:<br />
<br />
$ ./idle3ctl -h<br />
<br />
Also make sure to disable atime, [[#Disable_atime]].</div>Ant1