Re: newbie : I have downloaded jfugue jar file ...now how to install
it
On Dec 18, 3:15 am, Boris <cybernau...@gmail.com> wrote:
I have downloaded jfugue.jar file from internet , now what to do ?
Clicking on it shows some error "failed to load main-class manifest
attribute " .So how to install it ?
plz help !
Boris:
From what I read on the JFugue web site, jfugue.jar is only used for
the classes you need to write your own program. The following is from
the web site:
import org.jfugue.*;
public class MyMusicApp {
public static void main(String[] args) {
Player player = new Player();
Pattern pattern = new Pattern("C D E F G A B");
player.play(pattern);
System.exit(0); // If using versions lower than Java 5.0
}
}
The import statement refers to the classes that you need from the
org.jfugue package which happens to be in the jfugue.jar file. I
assume that the Player and Pattern classes are included in that
package. If you try to compile the above code without including the
jfugue.jar file, you will get a compile-time error. So...
javac -classpath [path]\jufugue.jar MyMusicApp.java
will compile the application
java -cp [path]\jfugue.jar;. MyMusicApp
will execute the application
Of course, if you use Ant (http://ant.apache.org/), all of the above
can be automated...
Hope this helps...
Sincerely,
Mike.
---
ACGNJ Java Users Group
http://www.javasig.org/ (best viewed in Firefox and Safari)