0

我已执行以下步骤来创建创建自签名小程序

此外,当我在 html 页面上运行时,它给了我错误,我同时使用 HTML 4.1 和 HTML5

eytool -genkey -keystore mykeystore -alias myalias
Enter keystore password:  mypassword
What is your first and last name?
  [Unknown]:  
What is the name of your organizational unit?
  [Unknown]: 
What is the name of your organization?
  [Unknown]:  
What is the name of your City or Locality?
  [Unknown]: 
What is the name of your State or Province?
  [Unknown]:  
What is the two-letter country code for this unit?
  [Unknown]:  
  [no]:  yes
Enter key password for <myalias>
            (RETURN if same as keystore password):


and create mykeystore but i used jdk 1.7.0
after that i created the jar file by the following steps

C:\Users\Rahand\Desktop\draft>javac AudioRecording.java

C:\Users\Rahand\Desktop\draft>jar cvf AudioRecording.jar *.class
added manifest
adding: AudioRecording$1.class(in = 673) (out= 445)(deflated 33%)
adding: AudioRecording$2.class(in = 812) (out= 499)(deflated 38%)
adding: AudioRecording$CaptureThread.class(in = 1840) (out= 983)(deflated 46%)
adding: AudioRecording.class(in = 3227) (out= 1723)(deflated 46%)

C:\Users\Rahand\Desktop\draft>pack200 -r AudioRecording.jar


C:\Users\Rahand\Desktop\draft>jarsigner -keystore mykeystore -storepass (secretkye) -keypass (secretkye) AudioRecordin
g.jar myalias

Warning:
The signer certificate will expire within six months.

但是当我在网络上运行时,程序出现以下错误

load: class JavaSound.class” />  <param name= not found.
java.lang.ClassNotFoundException: JavaSound.class” .>  <param name=
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: JavaSound.class” .>  <param name=

如果能帮助我解决这个问题,我将不胜感激......谢谢

4

1 回答 1

0

根据您的堆栈跟踪:

 java.lang.ClassNotFoundException: JavaSound.class

JavaSound.class 的jar文件中真的存在吗?

因为当我看到 jar 编译堆栈时,它看起来像:

adding: AudioRecording$1.class(in = 673) (out= 445)(deflated 33%)
adding: AudioRecording$2.class(in = 812) (out= 499)(deflated 38%)
adding: AudioRecording$CaptureThread.class(in = 1840) (out= 983)(deflated 46%)
adding: AudioRecording.class(in = 3227) (out= 1723)(deflated 46%)

没有类作为JavaSoundint 您的编译jar文件。

你应该AudioRecording.classJavaSound.class你的param value

于 2012-07-14T18:49:13.723 回答