Message d'erreur lors de la compilation?????

cs_dosh Messages postés 12 Date d'inscription jeudi 3 avril 2003 Statut Membre Dernière intervention 6 avril 2003 - 5 avril 2003 à 20:41
cs_dosh Messages postés 12 Date d'inscription jeudi 3 avril 2003 Statut Membre Dernière intervention 6 avril 2003 - 6 avril 2003 à 23:28
lorsque je compile mon fichier jé un message d'erreur Exception in thread "main" java.lang.NoClassDefFoundError:

3 réponses

cs_Duss Messages postés 890 Date d'inscription lundi 8 avril 2002 Statut Membre Dernière intervention 29 juillet 2004 11
5 avril 2003 à 22:58
salut,
et bien il ne trouve pas la definition de ta classe, pourrais tu nous montrer ton code stp
Duss
0
cs_dosh Messages postés 12 Date d'inscription jeudi 3 avril 2003 Statut Membre Dernière intervention 6 avril 2003
6 avril 2003 à 22:24
le code est le suivant:

import java.io.*;
import java.text.NumberFormat;

public class MortgageText {

public static void main(String args[]) throws IOException
{

BufferedReader keyboard =
new BufferedReader(new InputStreamReader(System.in));
double principal, rate, ratePercent;
int years;
final int paymentsPerYear = 12;
final int timesPerYearCalculated = 12;
double effectiveAnnualRate, interestRatePerPayment;
double amountPerPayment;
NumberFormat currency = NumberFormat.getCurrencyInstance();

System.out.print("Combien souhaitez-vous emprunter ? ");
principal = Double.parseDouble(keyboard.readLine());
System.out.print("Quel est le taux d'intérêt ? ");
ratePercent = Double.parseDouble(keyboard.readLine());
rate = ratePercent/100.00;
System.out.print("Combien d'années pour rembourser ? ");
years = Integer.parseInt(keyboard.readLine());
System.out.println("------------------------------");

effectiveAnnualRate =
Math.exp(timesPerYearCalculated*Math.log(1.0+(rate/timesPerYearCalculated)))-1.0;
interestRatePerPayment =
(Math.exp(Math.log(effectiveAnnualRate+1.0)/(years*paymentsPerYear))-1.0)*years*paymentsPerYear;
amountPerPayment = principal*(interestRatePerPayment/paymentsPerYear)/(1.0-Math.pow(((interestRatePerPayment/paymentsPerYear) +1.0),(-1.0*years*paymentsPerYear)));
System.out.print("Le montant mensuel à rembourser est ");
System.out.println(currency.format(amountPerPayment));
System.out.println();
}
}
0
cs_dosh Messages postés 12 Date d'inscription jeudi 3 avril 2003 Statut Membre Dernière intervention 6 avril 2003
6 avril 2003 à 23:28
ca marche Duss,
En faite le probleme était que j'avais enregistré mon fichier dans un sous repertoire de JavaPrograms
AHHHHHHHHHHH oui, suis vraiment un GROS ET GRAND debutant ......

Big thanks pour ton aide
0