Bonsoir !

Voici une application des plus simplistes :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
public class Main
{
	/*
	 * Lancement de l'application.
	 */
 
	public static void main(String[] args) 
	{
        javax.swing.SwingUtilities.invokeLater(new Runnable() 
        {
            public void run() 
            {
            	try {Thread.currentThread().sleep(3000);}catch(InterruptedException e){}
            	try {Thread.currentThread().sleep(3000);}catch(InterruptedException e){}
            	try {Thread.currentThread().sleep(3000);}catch(InterruptedException e){}
            	try {Thread.currentThread().sleep(3000);}catch(InterruptedException e){}
            	try {Thread.currentThread().sleep(3000);}catch(InterruptedException e){}
            	try {Thread.currentThread().sleep(3000);}catch(InterruptedException e){}
            	try {Thread.currentThread().sleep(3000);}catch(InterruptedException e){}
            	try {Thread.currentThread().sleep(3000);}catch(InterruptedException e){}
            	try {Thread.currentThread().sleep(3000);}catch(InterruptedException e){}
            	try {Thread.currentThread().sleep(3000);}catch(InterruptedException e){}
            	try {Thread.currentThread().sleep(3000);}catch(InterruptedException e){}
            }
        });		
	}
}
Je produits l'application avec Eclipse, et j'inclues la librairie javamail.

Je m'amuse simplement à mettre 10 fois en attente le thread de l'application, et à regarder la mémoire consommée sous Windows :
. 11MO avec un JAR exécutable d'Eclipse
. 14MO-19MO avec un FatJar exécutable d'Eclipse, éventuellement passé en .exe avec exe4j

Pour peu que je colle une petite interface et quelques fonctions webmail (récupération de messages sur un serveur IMAP), je suis desuite à 25MO.

Est-ce normal, et je n'y peux rien ?
Est-ce dû à Eclipse, qui inclue toujours au projet la "JRE System Library [jre 1.6.0]" ?

Je cherche à savoir si il y a une possibilité pour diminuer la consommation mémoire, ou si il va me falloir changer de langage de programmation .

Merci pour votre aide