How can I run my Nice program?

  • Matthew Richmond

    Could you please help me :  I have downloaded Nice, and have written a very small hello world package - (one class with println inside main method) and have been able to compile this using nicec.

    How do I run it?

    I have tried compiling to a jar using the -a option. When i tried to run this, Java complains about it not having a main method.
    When I looked inside the main_class specified in MANIFEST.MF there was a main method that took as parameters a Test (my class) object and a String array. But no Java recognisable main method.

    Could you please tell me what I may be doing wrong?

    Many thanks,


    • Arjan Boeijink

      Arjan Boeijink - 2003-02-07

      In Nice the main method has to be outside a class.
      A working hello world example:

      package test;

      public void main(String[] args){
          println("Hello world.");

      In Nice it's possible to have funtions outside classes therefore Nice has no static keyword.
      And Nice allows multiple classes in a single file so the filename doesn't have to be the same as the class name.

      If you have more questions or find other holes in the documentation, please report to the forum or the mailinglist.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks