Results 1 to 20 of 43
- 09-20-2008, 05:38 PM #1
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 573
- Rep Power
- 6
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)
- 09-20-2008, 05:50 PM #2
Member
- Join Date
- Aug 2008
- Posts
- 58
- Rep Power
- 0
Is the link correct?
Every time I tried to d/l it I get a bad file.
- 09-20-2008, 06:07 PM #3
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>
- 09-20-2008, 06:10 PM #4
Here is the error message I get when I try to open your jar file.
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
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
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 06:13 PM.
- 09-20-2008, 07:11 PM #5
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 573
- Rep Power
- 6
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?
- 09-20-2008, 09:15 PM #6
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.add a Class-path: entry to your manifest file.
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
- 09-20-2008, 10:33 PM #7
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 573
- Rep Power
- 6
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
- 09-20-2008, 11:38 PM #8
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.
- 09-21-2008, 04:24 AM #9
Member
- Join Date
- Sep 2008
- Posts
- 16
- Rep Power
- 0
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.
- 09-21-2008, 04:41 PM #10
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 573
- Rep Power
- 6
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?)
- 09-21-2008, 06:36 PM #11
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:
I believe I need a mmj.dll file to execute your program on Windows.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)
- 09-21-2008, 11:10 PM #12
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 573
- Rep Power
- 6
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
- 09-21-2008, 11:52 PM #13
I get NO sounds when I run the program.
Here's the scan from your jar file: 1 class not found
Running the program uses 95% or more of my CPU!!! THIS NEEDS TO BE FIXED!!!!!#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
Here is the console when I run it:
Note the exception near the end from the missing class.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
- 09-22-2008, 12:01 AM #14
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 573
- Rep Power
- 6
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.
- 09-22-2008, 12:06 AM #15
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 573
- Rep Power
- 6
found it, the line at the midi driver close
de.humatic.mmj.MidiSystem.closeMidiSystem();
should be out of the pc code.
- 09-23-2008, 10:20 PM #16
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 573
- Rep Power
- 6
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?
- 09-23-2008, 10:24 PM #17
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.pplication goes very but very slow on pc,
why is that so?
Might be your useless loops.very but very slow
- 09-23-2008, 10:27 PM #18
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 573
- Rep Power
- 6
the loop is out changed into a wait notify clause
-xprof where is that... only have jvm on pc
- 09-23-2008, 10:29 PM #19
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 573
- Rep Power
- 6
can not email the jar so you could see to problem
can´t link to my web page for the moment
- 09-23-2008, 11:07 PM #20
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 573
- Rep Power
- 6
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!
Similar Threads
-
opening of an exe in JFrame
By smartsubroto in forum New To JavaReplies: 3Last Post: 07-16-2008, 05:01 AM -
Prblem in Prepared Statement
By haneeshrawther in forum JDBCReplies: 2Last Post: 04-25-2008, 09:49 AM -
Using Prepared Statement
By Java Tip in forum Java TipReplies: 0Last Post: 02-06-2008, 09:22 AM -
Opening a workspace twice
By javaplus in forum EclipseReplies: 0Last Post: 01-08-2008, 09:56 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks