Page 1 of 3 123 LastLast
Results 1 to 20 of 43
  1. #1
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default opening jar files on pc prepared by mac

    This jar file works perfect on mac (takes a little while to open)
    WILLEM DRAGSTRA WEB SITE
    Why it won´t work on pc (java should be platform independent)

  2. #2
    playwin2 is offline Member
    Join Date
    Aug 2008
    Posts
    58
    Rep Power
    0

    Default

    Is the link correct?
    Every time I tried to d/l it I get a bad file.

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,900
    Rep Power
    25

    Default

    Your link seems to point to this HTML page vs a jar file.
    <html>
    <head>
    <title>WILLEM DRAGSTRA WEB SITE</title>
    <meta name="title" content="WILLEM DRAGSTRA WEB SITE">
    <META NAME="description" CONTENT="www.willemdragstra.com">
    <meta name="DC.Title" content="WILLEM DRAGSTRA WEB SITE">
    <meta http-equiv="Content-Type" content="text/html; ISO-8859-1">
    <META NAME="DC.Language" SCHEME="RFC1766" CONTENT="Spanish">
    <meta name="distribution" content="global">
    <meta name="resource-type" content="document">
    <meta name="Revisit" content="15 days">
    <meta name="robots" content="all">
    </head>
    <frameset rows="100%,*" border="0" frameborder="0" framespacing="0" framecolor="#000000">
    <frame src="http://personales.ya.com/wdragstra/citessun1.jar">
    <frame src="">
    </frameset>
    <NOFRAMES>
    <b>dominio</b><hr>
    This site requires a browser with frame capabilities.
    </NOFRAMES>
    </html>

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,900
    Rep Power
    25

    Default

    Here is the error message I get when I try to open your jar file.


    C:\Temp>D:\Java\jre1.6.0_02\bin\java.exe -jar "C:\Temp\citessun1.jar"
    Exception in thread "main" java.lang.NoClassDefFoundError: de/humatic/mmj/MidiLi
    stener
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknow n Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at cites.fmEdit.<init>(fmEdit.java:112)
    at cites.fboController.<init>(fboController.java:77)
    at cites.Main.<init>(Main.java:53)
    at cites.Main.main(Main.java:1793)

    C:\Temp>MORE
    Here's a scan of the jar file looking for referenced classes. My program found 5 referenced classes that were not found in the jar file. You must have another jar file with those classes
    Also you might want to add a Class-path: entry to your manifest file.

    #Searching C:\Temp\citessun1.jar for cites/Main
    cites/Main
    cites/fboController
    cites/fboController$EventHandler
    cites/fboController
    cites/fboController$PedaltestThread
    cites/fboController
    cites/fmEdit
    cites/fmEdit$ScheduleRunner
    cites/fmEdit
    cites/midiforFbo1
    cites/midiforFbo1$1
    cites/midiforFbo1
    cites/midiforFbo1$MidiIn
    cites/midiforFbo1
    cites/midiforFbo1$1
    cites/midiforFbo1$MidiInputListener
    cites/midiforFbo1
    cites/midiforFbo1$1
    de/humatic/mmj/MidiInput >>>> class NOT found! <<<<
    de/humatic/mmj/MidiListener >>>> class NOT found! <<<<
    de/humatic/mmj/MidiInput
    de/humatic/mmj/MidiListener
    de/humatic/mmj/MidiOutput >>>> class NOT found! <<<<
    de/humatic/mmj/MidiSystem >>>> class NOT found! <<<<
    de/humatic/mmj/MidiSystemListener >>>> class NOT found! <<<<
    cites/midiforFbo1
    cites/fmEdit
    cites/midiforFbo1
    cites/fboController$PedaltestThread
    cites/fmEdit
    cites/midiforFbo1
    cites/fmEdit
    cites/Main$1
    cites/Main
    cites/Main$appLoop
    cites/Main
    cites/Main$playSoundblock
    cites/fboController
    cites/fmEdit
    cites/Main

    # Found 18 classes. 5 NOT found.

    Last edited by Norm; 09-20-2008 at 07:13 PM.

  5. #5
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    thanks norm, that is very helpful
    The class that set the midi drivers has the following import
    import de.humatic.mmj.*;
    there probably lays the problem!
    you have to include the following
    mmj - Mac OS X universal binary java Midi subsystem
    How should I do the things?

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,900
    Rep Power
    25

    Default

    add a Class-path: entry to your manifest file.
    If the missing classes are in another jar file, you need to have both of them available to execute the program. By adding the above entry to the jar file and having the jar files in the same folder, the java program should find the missing classes.

    If forgot to post all the results of the jar file scan. My program thinks that the following classes are NOT used.
    # Following entries not referenced:

    >> cites/fboController$1.class
    >> cites/Main$Waitloop.class
    >> cites/miditest.class
    >> cites/miditest$1.class
    >> cites/miditest$2.class
    >> cites/miditest$3.class
    >> cites/miditest$4.class
    >> cites/miditest$5.class
    >> cites/miditest$6.class
    >> cites/miditest$7.class
    >> cites/miditest$Key.class
    >> cites/miditest$MidiIn.class
    >> cites/miditest$MidiInputListener.class
    >> cites/miditest$Piano.class

    # 14 unreferenced files found in C:\Temp\Midi\citessun1.jar

  7. #7
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    there was indeed an other jar missing
    WILLEM DRAGSTRA WEB SITE

    How to make one jar of two?
    the first jar is
    WILLEM DRAGSTRA WEB SITE

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,900
    Rep Power
    25

    Default

    To merge the contents of two jars, you need to have all the class files extracted from the jar files and then execute the jar command to include all those files in the new jar file.

  9. #9
    jason wang is offline Member
    Join Date
    Sep 2008
    Posts
    16
    Rep Power
    0

    Default

    I think you don't have a lib in your pc. Maybe it is because that you have this lib install in your mac computer, but you don't have it in your pc computer.

  10. #10
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    Jason wang you are right.
    The lib is called libmmj.jnilib and there is also a jar called
    mmj.jar
    You can find both as a download at mmj - Mac OS X universal binary java Midi subsystem
    The instruction says that you should put both files at

    To make mmj available to all Java applications simply drop both mmj.jar and libmmj.jnilib into /Library/Java/Extensions.

    Which I did on my MAC.

    But what should I do on a PC (where I put that stuff) or are these fills mend only for PC?

    See also de.humatic.mmj.*; (probably the mmj component is for MAC only?)

  11. #11
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,900
    Rep Power
    25

    Default

    I downloaded the .zip file and extracted the .jar file and the libmmj.jnilib and tried to execute your code. I get an error saying it can NOT find mmj(.dll). If you remember, I mentioned that to you and Nick very early on in this project and got no answer regarding where that file was located. As far as I know, windows does not recognize or use .jnilib files.

    Here's the stack trace from my execution attempt:
    C:\Temp\Midi>java -cp citessun1.jar;mmj.jar cites.Main
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no mmj in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at de.humatic.mmj.MidiSystem.loadLibrary(MidiSystem.j ava:77)
    at de.humatic.mmj.MidiSystem.getDevices(MidiSystem.ja va:276)
    at de.humatic.mmj.spi.CoreMidiProvider.getDeviceInfo( CoreMidiProvider.java:37)
    at javax.sound.midi.MidiSystem.getMidiDeviceInfo(Unkn own Source)
    at cites.midiforFbo1.<init>(midiforFbo1.java:46)
    at cites.fmEdit.<init>(fmEdit.java:112)
    at cites.fboController.<init>(fboController.java:77)
    at cites.Main.<init>(Main.java:53)
    at cites.Main.main(Main.java:1793)
    I believe I need a mmj.dll file to execute your program on Windows.

  12. #12
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    sorry, norm
    I spoke to the creator of the midi driver
    mmj is only for mac
    so I took all mac stuff out of the driver class
    and stayed with the sun stuff
    here is the new link with jar
    this might work on pc, let me know
    WILLEM DRAGSTRA WEB SITE

  13. #13
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,900
    Rep Power
    25

    Default

    I get NO sounds when I run the program.

    Here's the scan from your jar file: 1 class not found
    #Searching C:\Temp\cites.jar for cites/Main
    cites/Main
    cites/fboController
    cites/fboController$EventHandler
    cites/fboController
    cites/fboController$PedaltestThread
    cites/fboController
    cites/fmEdit
    cites/fmEdit$ScheduleRunner
    cites/fmEdit
    cites/pcMidi
    cites/pcMidi$1
    cites/pcMidi
    cites/pcMidi$MidiIn
    cites/pcMidi
    cites/pcMidi$1
    de/humatic/mmj/MidiSystem >>>> class NOT found! <<<<
    cites/pcMidi
    cites/fmEdit
    cites/pcMidi
    cites/fboController$PedaltestThread
    cites/fmEdit
    cites/pcMidi
    cites/fmEdit
    cites/Main$1
    cites/Main
    cites/Main$appLoop
    cites/Main
    cites/Main$playSoundblock
    cites/fboController
    cites/fmEdit
    cites/Main

    # Found 13 classes. 1 NOT found.

    # Following entries not referenced:

    >> cites/fboController$1.class
    >> cites/Main$Waitloop.class
    >> cites/midiforFbo1.class
    >> cites/midiforFbo1$1.class
    >> cites/midiforFbo1$MidiIn.class
    >> cites/midiforFbo1$MidiInputListener.class
    >> cites/miditest.class
    >> cites/miditest$1.class
    >> cites/miditest$2.class
    >> cites/miditest$3.class
    >> cites/miditest$4.class
    >> cites/miditest$5.class
    >> cites/miditest$6.class
    >> cites/miditest$7.class
    >> cites/miditest$Key.class
    >> cites/miditest$MidiIn.class
    >> cites/miditest$MidiInputListener.class
    >> cites/miditest$Piano.class

    # 18 unreferenced files found in C:\Temp\cites.jar
    Running the program uses 95% or more of my CPU!!! THIS NEEDS TO BE FIXED!!!!!

    Here is the console when I run it:
    C:\Temp>java -jar cites.jar
    recievers numb 0 name Real Time Sequencer
    transmiters numb 0 name Microsoft MIDI Mapper
    transmiters numb 1 name Microsoft GS Wavetable SW Synth
    transmiters numb 2 name Real Time Sequencer
    transmiters numb 3 name Java Sound Synthesizer
    midiforFbo1 constructor loaded
    fmEdit loaded
    fboController constructor loaded
    constructor main loaded
    entering in wait thread
    entering in play thread 1
    opening in Real Time Sequencer index 0
    opening out Java Sound Synthesizer index 3
    start sequence
    stop sequence
    start sequence
    MIDI RESET OF FBO1
    stop sequence
    opening out Microsoft GS Wavetable SW Synth index 1
    start sequence
    stop sequence
    enter in pedal thread
    start sequence
    stop sequence
    DATADUMP 1 DONE
    start sequence
    stop sequence
    start sequence
    calling from hook
    DATADUMP 2 DONE
    Exception in thread "Thread-6" java.lang.NoClassDefFoundError: de/humatic/mmj/MidiSystem
    at cites.pcMidi.closeMidi(pcMidi.java:316)
    at cites.fmEdit.closeFbo1(fmEdit.java:192)
    at cites.Main.cleanUp(Main.java:67)
    at cites.Main.access$000(Main.java:20)
    at cites.Main$1.run(Main.java:57)

    C:\Temp>MORE
    Note the exception near the end from the missing class.

  14. #14
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    The GUI framework is fixed,
    that runs on several threads (waiting notifying).
    But as soon as you start the sound tracks (you need a fbo-1 synthesizer module connect with a midi interface to hear sounds) the old pascal component kicks in which has still many loops that cause your CPU to cook up.
    Eventually I might fix that as well.
    why there is still this de/humatic/mmj/MidiSystem component
    I do not know for the moment.

  15. #15
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    found it, the line at the midi driver close
    de.humatic.mmj.MidiSystem.closeMidiSystem();
    should be out of the pc code.

  16. #16
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    I application can be opened on a PC and the midi problem of no sound coming out is solved.
    But trying it out I notice the application goes very but very slow on pc,
    why is that so?
    Unfortunately my web server is down, is there a way to att. the new jar here?

  17. #17
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,900
    Rep Power
    25

    Default

    pplication goes very but very slow on pc,
    why is that so?
    Try using the -Xprof option with the java command. It will generate statistics showing where the code is spending its time when executing. Post the results here so we all can see.
    very but very slow
    Might be your useless loops.

  18. #18
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    the loop is out changed into a wait notify clause
    -xprof where is that... only have jvm on pc

  19. #19
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    can not email the jar so you could see to problem
    can´t link to my web page for the moment

  20. #20
    willemjav is offline Senior Member
    Join Date
    Dec 2007
    Location
    Spain
    Posts
    1,075
    Rep Power
    9

    Default

    I noticed that the wait/notify clause which waits for each pedal trigger, shows little cpu activity on mac. But after hitting the pedal and going into a new sound track augments the cpu rate dramatically.
    I decided not to fix the soundblocks.... one should except that an oldtimer from the 60th consumes a lot more gasoline!

Page 1 of 3 123 LastLast

Similar Threads

  1. opening of an exe in JFrame
    By smartsubroto in forum New To Java
    Replies: 3
    Last Post: 07-16-2008, 06:01 AM
  2. Prblem in Prepared Statement
    By haneeshrawther in forum JDBC
    Replies: 2
    Last Post: 04-25-2008, 10:49 AM
  3. Using Prepared Statement
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-06-2008, 10:22 AM
  4. Opening a workspace twice
    By javaplus in forum Eclipse
    Replies: 0
    Last Post: 01-08-2008, 10:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •