Apache NetBeans

Apache NetBeans location (Ubuntu)

/usr/lib/apache-netbeans

ApacheNetBeans launch (Ubuntu)

/usr/lib/apache-netbeans/bin/netbeans &
Apache NetBeans cache

Apache NetBeans “strong” re-installation (macOS)

rm -rf /Users/franckbarbier/Library/Caches/NetBeans
rm -rf /Users/franckbarbier/Library/Application\ Support/NetBeans
open -e /Applications/NetBeans/Apache\ NetBeans\ 15.app/Contents/Resources/NetBeans/netbeans/etc/netbeans.conf
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_333.jdk/Contents/Home"
Visual Studio Code
WebStorm
GlassFish

Change to Java 8 before launching asadmin (Windows PowerShell)

echo "Java home: $env:JAVA_HOME"
$env:PATH = "C:\Program Files\Java\jdk1.8.0_291\bin;$env:PATH"
echo "PATH: $env:PATH"
cd C:\Users\franc\Documents\NetBeansProjects\glassfish-5.1.0\glassfish5\bin
Start-Process ".\asadmin.bat"

Change to Java 8 before launching asadmin (macOS)

export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_333`
cd /Users/FranckBarbier/NetBeansProjects/glassfish5/bin
./asadmin

Example (domain creation)

asadmin> create-domain --user barbier --adminport 4850 --savemasterpassword=true --savelogin=true FranckBarbier

Example (JDBC resource -JavaDB- creation)

asadmin> start-domain domain1
asadmin> list-jdbc-connection-pools
asadmin> delete-jdbc-connection-pool New_York_City_Penitentiary_database_pool
asadmin> create-jdbc-connection-pool --help
asadmin> create-jdbc-connection-pool --datasourceclassname org.apache.derby.jdbc.ClientDataSource --restype javax.sql.DataSource --driverclassname=org.apache.derby.jdbc.ClientDriver --property user=FranckBarbier:password=FranckBarbier:databasename=New_York_City_Penitentiary_database:servername=localhost:portnumber=1527 New_York_City_Penitentiary_database_pool
# Database server must run:
asadmin> ping-connection-pool New_York_City_Penitentiary_database_pool
asadmin> list-jdbc-resources
asadmin> delete-jdbc-resource jdbc/New_York_City_Penitentiary
asadmin> create-jdbc-resource --connectionpoolid New_York_City_Penitentiary_database_pool jdbc/New_York_City_Penitentiary
asadmin> stop-domain domain1

Example (persistence.xml file)

<persistence-unit name="NYCP_persistence_unit" transaction-type="JTA">
    <jta-data-source>jdbc/New_York_City_Penitentiary</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties/>
</persistence-unit>

Example (JDBC resource -Oracle- creation)

# Beforehand, put 'ojdbc8-21.7.0.0.jar'in <GlassFish installation directory>/glassfish/domains/domain1/lib/ext:
create-jdbc-connection-pool --datasourceclassname oracle.jdbc.pool.OracleDataSource --restype javax.sql.DataSource --property user=<USER>password:=<PASSWORD>:url="jdbc\\:oracle\\:thin\\:@scinfe098.univ-pau.fr\\:1521\\:etud" New_York_City_Penitentiary_database_pool
Android Studio
Android v. 4.4 API level 19 (KitKat) Image Intelx64 pour émulation
Dart