Partage
  • Partager sur Facebook
  • Partager sur Twitter

how to load a class from a file path

    1 juin 2018 à 23:39:19

    hi, i trayed to get number of methods of a java class located in other folder , i tryed many exemples and no one of them is correct .. the same error between those exemples is ClassNotFoundExeption.. can you help me to fix that please :(

    String activeProjectName = activeProject .getName(); 
    					System.out.println(activeProjectName);
    String pp=activeProject.getFullPath().toString();
    					
    		c = Class.forName(pp);
    				
    				    System.out.println("\nMethods:");
     Method methods[] = c.getDeclaredMethods();
       for (Method meth : methods){
      System.out.println(" " + meth);
    				result.setText(meth.getName());



    • Partager sur Facebook
    • Partager sur Twitter
      2 juin 2018 à 1:32:10

      Bonjour,

      Mauvais forum

      Le sujet est déplacé dans le forum approprié : Let's talk!

      This is a french speaking community. I move your topic in the english speaking section of the forum
      • Partager sur Facebook
      • Partager sur Twitter
        2 juin 2018 à 8:32:05

        salut, je vais essayée d’extraire le nombre de méthode d'un fichier .java situer dans un autre endroit sur mon pc . quelqu'un connais comment faire cela , et s'il est possible je voudrai un exemple avec le path et la class path svp
        • Partager sur Facebook
        • Partager sur Twitter

        how to load a class from a file path

        × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
        × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
        • Editeur
        • Markdown