|
|
Welcome to the Java Forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
- have access to post topics
- communicate privately with other members (PM)
- not see advertisements between posts
- have the possibility to earn one of our surprises if you are an active member
- access many other special features that will be introduced later.
Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact us.
|
|

09-20-2008, 07:38 PM
|
|
Senior Member
|
|
Join Date: Dec 2007
Location: Spain
Posts: 342
|
|
|
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, 07:50 PM
|
|
Member
|
|
Join Date: Aug 2008
Posts: 52
|
|
|
Is the link correct?
Every time I tried to d/l it I get a bad file.
|
|

09-20-2008, 08:07 PM
|
 |
Senior Member
|
|
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
|
|
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, 08:10 PM
|
 |
Senior Member
|
|
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
|
|
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 08:13 PM.
|
|

09-20-2008, 09:11 PM
|
|
Senior Member
|
|
Join Date: Dec 2007
Location: Spain
Posts: 342
|
|
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, 11:15 PM
|
 |
Senior Member
|
|
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
|
|
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
|
|

09-21-2008, 01:38 AM
|
 |
Senior Member
|
|
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
|
|
|
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, 06:24 AM
|
|
Member
|
|
Join Date: Sep 2008
Posts: 16
|
|
|
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.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
|

09-21-2008, 06:41 PM
|
|
Senior Member
|
|
Join Date: Dec 2007
Location: Spain
Posts: 342
|
|
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, 08:36 PM
|
 |
Senior Member
|
|
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
|
|
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.
|
|

09-22-2008, 01:10 AM
|
|
Senior Member
|
|
Join Date: Dec 2007
Location: Spain
Posts: 342
|
|
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-22-2008, 01:52 AM
|
 |
Senior Member
|
|
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
|
|
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.
|
|

09-22-2008, 02:01 AM
|
|
Senior Member
|
|
Join Date: Dec 2007
Location: Spain
Posts: 342
|
|
|
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, 02:06 AM
|
|
Senior Member
|
|
Join Date: Dec 2007
Location: Spain
Posts: 342
|
|
|
found it, the line at the midi driver close
de.humatic.mmj.MidiSystem.closeMidiSystem();
should be out of the pc code.
|
|

09-24-2008, 12:20 AM
|
|
Senior Member
|
|
Join Date: Dec 2007
Location: Spain
Posts: 342
|
|
|
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-24-2008, 12:24 AM
|
 |
Senior Member
|
|
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,225
|
|
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.
Might be your useless loops.
|
|

09-24-2008, 12:27 AM
|
|
Senior Member
|
|
Join Date: Dec 2007
Location: Spain
Posts: 342
|
|
|
the loop is out changed into a wait notify clause
-xprof where is that... only have jvm on pc
|
|

09-24-2008, 12:29 AM
|
|
Senior Member
|
|
Join Date: Dec 2007
Location: Spain
Posts: 342
|
|
|
can not email the jar so you could see to problem
canīt link to my web page for the moment
|
|

09-24-2008, 01:07 AM
|
|
Senior Member
|
|
Join Date: Dec 2007
Location: Spain
Posts: 342
|
|
|
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!
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
| |