Java
J’utilise pour ma part NetBeans comme IDE (un autre équivalent est le bien connu Eclipse, que je ne connais que très peu)
Généralités
- Developpez.com (tutoriels, outils, api,…) : http://java.developpez.com/
- Cours bien complet: http://www.siteduzero.com/tutoriel-3-10601-programmation-en-java.html
- Cours, un autre: http://prevert.upmf-grenoble.fr/Prog/
-
Ubuntu.fr: http://doc.ubuntu-fr.org/java
-
Verify the Java Version
java -version
-
Check Installed Java Versions
update-alternatives --config java
-
Set the Default Java Version
sudo update-alternatives --config java
Log
- http://imss-www.upmf-grenoble.fr/prevert/Prog/Java/CoursJava/fichierDeLogs.html
- http://cyberzoide.developpez.com/java/logging/
Librairies
Nom | Description | Documentation | Download |
---|---|---|---|
SQLite JDBC Driver | SQLite | https://bitbucket.org/xerial/sqlite-jdbc | |
MySQL Connector/J | MySQL | - Tutoriel - NetBeans tuto |
http://dev.mysql.com/downloads/connector/j/5.1.html |
Apache Commons Net | FTP, Telnet, POP3, FTP, SMTP, … | - Exemples - Exemple upload/download FTP - FTP Binary mode |
http://commons.apache.org/net/download_net.cgi |
JSch - Java Secure Channel | SSH | - Create InputStream | http://www.jcraft.com/jsch/ |
javax.comm | Ports Série (serial port) | - Tutoriel - Tuto en anglais - utile ? - Windows Installation Guide |
|
Jaudiotagger | MP3 ID3 tag (2011-?) | Autres librairies (outdated) : - mp3agic (2010-2011) - JLayer (1999-2008) - javamp3 (2004-2008) - myid3 (2007-2008) - entagged (2003-2006) - javamusictag (2003-2006) - jid3 (? - 2005) |
Maven .jar builds |
Java Excel API (jxl) | Excel | - Tutoriel A tester : http://poi.apache.org/ | |
lastfm-java | Last.fm API bindings for Java | ||
JLayer | MP3 decoder/player/converter library for Java™ platform. | ||
ini4j | Java API for handling Windows ini file format | ||
jCharts | Charts | See also: JFreeChart (a tester, plus compliqué mais plus puissant apparemment) | |
coverartarchive-api | MusicBrainz Cover Art Archive API | To use a proxy: First, make DefaultCoverArtArchiveClient(HttpClient client) public in DefaultCoverArtArchiveClient class Then: DefaultHttpClient httpclient = new DefaultHttpClient();<br>HttpHost proxy = new HttpHost("xx.xx.xx.xx", 8080);<br>httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);<br>CoverArtArchiveClient client = new DefaultCoverArtArchiveClient(httpclient); |
|
musicbrainzws2-java | Java binding for MusicBrainz XML Web Service/Version 2 | Autres librairies (to be tested) : - musicbrainz-data (Need to learn more about Spring framework and eventually Maven: forum issue) (JAR Builds) - javamusicbrainz |
|
JAVE | Java Audio Video Encoder |
Runtime exec et Threads
- http://alwin.developpez.com/tutorial/JavaThread/
- Interruptions: http://java.developpez.com/faq/java/?page=langage_threads
- Interruptions: http://thecodersbreakfast.net/index.php?post/2009/06/08/G%C3%A9rer-proprement-les-interruptions-de-threads-en-Java
- http://ydisanto.developpez.com/tutoriels/java/runtime-exec/
- From Runtime.exec() to ProcessBuilder : http://www.java-tips.org/java-se-tips/java.util/from-runtime.exec-to-processbuilder.html
- Passing a parameter to a thread: http://stackoverflow.com/questions/877096/how-can-i-pass-a-parameter-to-a-java-thread
Misc
Swing
Graphic
Description | Lien |
Reading an Image from a File, InputStream, or URL | http://www.exampledepot.com/egs/javax.imageio/BasicImageRead.html |
Saving a Generated Graphic to a PNG or JPEG File | http://www.exampledepot.com/egs/javax.imageio/Graphic2File.html |
String
Convert
Description | Lien |
---|---|
Blob to String | http://shitmores.blogspot.fr/2007/06/convert-javasqlblob-to-string.html |
Inter > String | String.valueOf(myInt); |
String > Integer | Integer.parseInt(myString); |
En vrac (pour l’instant)
- Tableaux associatifs: http://www.chicoree.fr/w/Programmation_imp%C3%A9rative/Tableaux_associatifs
- http://download.oracle.com/javase/tutorial/index.html
- Overriding .equals():
- OnExit Event: http://stackoverflow.com/questions/2467070/onexit-event-for-a-swing-application
- Collections: http://fmora.developpez.com/tutoriel/java/collections/introduction/
- Overriding equals(): http://stackoverflow.com/questions/27581/overriding-equals-and-hashcode-in-java
- Look&Feel (a tester): http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
- JavaDoc: http://www.siteduzero.com/tutoriel-3-35079-presentation-de-la-javadoc.html
- mime: http://www.rgagnon.com/javadetails/java-0487.html
- Cloner des objets: http://ydisanto.developpez.com/tutoriels/java/cloneable/
- Get User Name: http://www.rgagnon.com/javadetails/java-0048.html
- Group a List by property: http://vladzloteanu.wordpress.com/2009/05/20/java-lists-group-by-element-property-as-ruby-group_by-method/
- Random numbers: http://www.cs.geneseo.edu/~baldwin/reference/random.html
- How to split a path platform independent?: http://stackoverflow.com/questions/1099859/how-to-split-a-path-platform-independent
- Maven behind proxy:
- Maven does not use Netbean’s nor system configured proxy
- You have to modify Maven’s settings.xml configuration file as described here: http://wiki.netbeans.org/FaqMavenProxySettings
- On Windows, the file is located under C:\Program Files\NetBeans 7.0.1\java\maven\conf
Maven (A TESTER)
- http://dcabasson.developpez.com/articles/java/maven/introduction-maven2/
- http://chrisdail.com/2008/04/17/building-with-maven/
JAR Version
A étudier plus sérieusement
- http://stackoverflow.com/questions/1237084/netbeans-manifest
- http://docs.oracle.com/javase/7/docs/technotes/guides/versioning/spec/versioning2.html
- http://www.rgagnon.com/javadetails/java-0388.html
Include librairies in JAR
- Maven: in pom.xml, add the following lines in
<plugins>
(Source):
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
- Ant: in build.xml, add the following lines
(Source):
- The result will be an independent jar named finalApp.jar which includes, in this example, log4j library.
- “Main-Class” attribute should be set to what you have in Project Properties, under Run/Main Class:
- Note: “-post-jar” insures that this package build is made at the end, so expected files are present in dist folder
<target name="-post-jar">
<jar jarfile="dist/finalApp.jar">
<zipfileset src="${dist.jar}" excludes="META-INF/*" />
<zipfileset src="dist/lib/log4j-1.2.16.jar" excludes="META-INF/*" />
<manifest>
<attribute name="Main-Class" value="com.example.package.Main"/>
</manifest>
</jar>
</target>
Temp: jMusicLib
J’ai un projet en cours jMusicLib dont le nom n’est pas encore fixé et qui n’est pas encore disponible en ligne. Mais pour mon propre besoin, je commence à écrire une doc.