no access to a java static method from scala -


i created program java , scala mixed, faced error while trying call java static method scala.here code:

object gestionbasesscala {    def sors_tout_de_suite() {      application.launcher.append("scala : exit")   } } 

the append method of launcher class (in java):

public static void append(string text) {      if (name_of_file != null && name_of_file != "") {         bufferedwriter bufwriter = null;         filewriter filewriter = null;         try {             filewriter = new filewriter(name_of_file, true);             bufwriter = new bufferedwriter(filewriter);             // ins�rer un saut de ligne             bufwriter.newline();             bufwriter.write(text);             bufwriter.close();         } catch (ioexception ex) {               //     logger.getlogger(textfilewriter.class.getname()).log(level.severe,             // null, ex);         } {             try {                 bufwriter.close();                 filewriter.close();             } catch (ioexception ex) {                 // logger.getlogger(textfilewriter.class.getname()).log(level.severe,                 // null, ex);             }         }     }  } 

i don't see error be.

olivier

if you're using scala ide/eclipse, in-editor compiler not pick when static methods become created and/or updated.

running "clean..." on project makes error go away.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -