Salut,
voilà j'ai un problème pour exécuter un programme java a partir d'une console ms-dos.
Je pensais que c'était du a mon appli, j'ai donc crée une appli tres tres simple avec juste un main et un system.out... mais j'ai tjrs le problème.
Donc voici mon fichier java :
je l'ai compilé depuis ma console ms-dos en faisant :
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
28
29
30
31 /* * Main.java * * Created on 3 novembre 2005, 11:07 * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */ package javaapplication11; /** * * @author vab */ public class Main { /** Creates a new instance of Main */ public Main() { } /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here System.out.println("ENFIN"); } }
et maintenant j'essai de l'exécuté en faisant :javac Main.java
mais la j'obtiens l'erreur suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part java L:\Fichiers_JAVA\ejb_tests\JavaApplication11\src\javaapplication11\Main
ET je ne comprends pas pourquoi :Exception in thread "main" java.lang.NoClassDefFoundError: L:\Fichiers_JAVA\ejb_tests\JavaApplication11\src\javaapplication11\Main
voila ce que me renvoie ma variable CLASSPATH :
je suppose que je fais mal quelque chose mais je ne sais pas quoi...C:\Documents and Settings\vab>echo %CLASSPATH%
L:\java\plateformes\j2sdk1.4.2_04\bin;L:\java\plateformes\j2eesdk1.4_2005Q1-windows\bin;L:\java\plateformes\apache-ant-1.6.3\bin;L:\java\plateformes\jboss-4\bin
;L:\install\Jndi;L:\Fichiers_JAVA\ejb_tests\JavaApplication11\src\javaapplication11\![]()
Partager