日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

WARNING: Could not open/create prefs root no

系統 1956 0

以下是我的程序(取自headfirst Java):

?

      
         1
      
      
        import
      
       javax.sound.midi.*
      
        ;


      
      
         2
      
      
         3
      
      
        public
      
      
        class
      
      
         MiniMiniMusicApp {


      
      
         4
      
      
        public
      
      
        static
      
      
        void
      
      
         main(String[] args) {


      
      
         5
      
               MiniMiniMusicApp mini = 
      
        new
      
      
         MiniMiniMusicApp();


      
      
         6
      
      
                mini.play();


      
      
         7
      
      
            }


      
      
         8
      
      
        public
      
      
        void
      
      
         play() {


      
      
         9
      
      
        try
      
      
         {


      
      
        10
      
                   Sequencer player =
      
         MidiSystem.getSequencer();


      
      
        11
      
      
                    player.open();


      
      
        12
      
      
        13
      
                   Sequence seq = 
      
        new
      
       Sequence(Sequence.PPQ, 4
      
        );


      
      
        14
      
      
        15
      
                   Track track =
      
         seq.createTrack();


      
      
        16
      
      
        17
      
                   ShortMessage a = 
      
        new
      
      
         ShortMessage();


      
      
        18
      
                   a.setMessage(144, 1, 44, 100
      
        );


      
      
        19
      
                   MidiEvent noteOn = 
      
        new
      
       MidiEvent(a, 1
      
        );


      
      
        20
      
      
                    track.add(noteOn);


      
      
        21
      
      
        22
      
                   ShortMessage b = 
      
        new
      
      
         ShortMessage();


      
      
        23
      
                   b.setMessage(128, 1, 44, 100
      
        );


      
      
        24
      
                   MidiEvent noteOff = 
      
        new
      
       MidiEvent(b, 16
      
        );


      
      
        25
      
      
                    track.add(noteOff);


      
      
        26
      
      
        27
      
      
                    player.setSequence(seq);


      
      
        28
      
      
        29
      
      
                    player.start();


      
      
        30
      
               } 
      
        catch
      
      
         (Exception ex) {


      
      
        31
      
      
                    ex.printStackTrace();


      
      
        32
      
      
                }


      
      
        33
      
      
        34
      
      
            }


      
      
        35
      
       }
    

?

在win8.1出現的錯誤信息如下:

WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0?
x80000002. Windows RegCreateKeyEx(...) returned error code 5.
?

解決方法如下:

Step1:搜索并運行regedit.exe

Step2: 進入HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft,右擊JavaSoft目錄,選擇新建->項(key),命名為Prefs

Step3: 重新編譯即可。

WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 富蕴县| 上杭县| 泽库县| 米林县| 芷江| 平昌县| 连州市| 江口县| 和平区| 晋城| 融水| 灵寿县| 兴文县| 永川市| 沅江市| 临泉县| 武乡县| 聊城市| 秦皇岛市| 浮山县| 龙江县| 临夏市| 南昌市| 双流县| 大兴区| 全南县| 庄浪县| 布拖县| 鸡泽县| 南汇区| 开远市| 客服| 颍上县| 黑河市| 凤阳县| 湟中县| 万山特区| 永州市| 宣城市| 金湖县| 荔波县|