Jump to content

disable java.exe in System 32 folder?

- - - - -

  • Please log in to reply
8 replies to this topic

#1
zeroradius

zeroradius

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,406 posts
I don't know if this is the appropriate section or if i should put it under software so sorry if its wrong.

I am trying to get a list of instruments from the java sound library. I wrote the code and it did not return anything so i started searching the web to try to fix my code. I found a forum with someone having the same problem (personA). I attempted to run code that worked for someone who was trying to help personA (personB) and i got the same results as PersonA which was the same thing as my original code. PersonA fixed his problem by disabling java.exe in his system 32 folder (leaving it enabled in his program files) and it worked. I tried searching for "How to disable an exe" and it gave me a bunch of useless results. So my question is how can i disable java.exe but only in the system 32 folder?

heres the link to PersonA's problem: Java Sound - accessing list of supported instruments
Posted Image

#2
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
Looks like he just removed it, or rename it so you got a backup, and then ran the java updater which noticed missing files and gives you a clean "install"

#3
zeroradius

zeroradius

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,406 posts
Thanks Oxano (wont let me rep you?)

I renamed it to JavaRenamed and ran the update and neither my code or the code that is confirmed to work are returning any results. I know the instruments are there because i used them on my simple midi maker. Can anyone think of another reason it is not returning the list?

Edit: updater put java.exe back into my sys32. I tried renaming without the updater and i also tried renaming the one in program files instead. neither worked
Posted Image

#4
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
What if you rename it, don't update and run the code?
(After taking a closer look at the sun forum post, i noticed he says there are 2 java.exe files. And he must use the one in the program files/java/jdkxxx/bin folder for it to find the sounds. If the java.exe is available in the win32 folder, it may use that and not be able to find the sounds)

Edit: can you also make sure you have a folder
program files/java/jdk1.x.y.z/jre/lib/audio (containing soundbank.gm)

#5
zeroradius

zeroradius

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,406 posts
right which is why i renamed the java.exe inside the system32 file (thats what that guy did to try and make it use the one in program files)

I have tried to rename and run without update and got the same result. I also tried renaming the one in the program files instead.

Thanks for the help, i have to turn off my computer we have a bad storm just came in and i don't want to rune my computer.
Posted Image

#6
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
This guy(InformIT: Making Waves with Java—An Adventure in Midi > Making Waves with Java—An Adventure in Midi) had the same and solved it by adding
Soundbank bank = synth.getDefaultSoundbank();

synth.loadAllInstruments(bank);
After the open. Like so:


    Synthesizer synth = MidiSystem.getSynthesizer();


    synth.open();

    Soundbank bank = synth.getDefaultSoundbank();

    synth.loadAllInstruments(bank);

    Instrument[] orchestra = synth.getLoadedInstruments();


    for (int i=0; i<orchestra.length; i++) {

      System.out.println(orchestra[i]);

    }

This also works with me. I'm not sure if it's bad for performance or not because you have them all loaded, and the "normal" way hasn't loaded them yet.. i think. (or maybe it loads by default)

Now, if i change the folder name of
C:\Program Files\Java\jdk1.6.0_21\jre\lib\audio
into audio2
It doesn't work with me anymore (pretty normal as that folder contains the soundbank)

Now, if it still doesn't work with you. I suggest you try the following where you manually point the synthesizer to the soundbank on your computer.


    Synthesizer synth = MidiSystem.getSynthesizer();

    synth.open();

    Soundbank bank = MidiSystem.getSoundbank(new File("C:\\Program Files\\Java\\jdk1.6.0_21\\jre\\lib\\audio2\\soundbank.gm"));

    synth.loadAllInstruments(bank);


    Instrument[] orchestra = synth.getLoadedInstruments();


    for (int i=0; i<orchestra.length; i++) {

      System.out.println(orchestra[i]);

    }



#7
zeroradius

zeroradius

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,406 posts
that was one short storm it hit, bent trees so that the tops touched the ground and was gone within 10 min. (^_^)

I just saw your edit sorry. I have the folder but it is empty.

Edit: Downloading the delux version of the file now. will update wether it works or not.

Edit2: It worked! 188 instruments wowzers! Thanks so much! It still wont let me rep you. I tried randomly reping lor to "spread rep around" and it still won't do it. sorry.
Posted Image

#8
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
No problem ;)

#9
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
Your warm fuzzy thanks is all that is needed.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users