I´m working with remote a lab that need to connect through internet to an Arduino board and IP cammera. I tried the applet and everything went fine, but when I tried to put it to work with the EJS pluggin within Moodle I received an error. I found that the error arise just because I haven't signed my applet, but I don't know how to do that in EJS.
Now, you are ready to go and type some lines by Naviagting to Start, Run
type in cmd and press enter in the keyboard
cmd
this will bring up a C:\WINDOWS\system32\cmd.exe console
in order to save yourself some heavy typing, use the windows explorer to navigate to the folder where you saved all your jar files that you want signed. For example copy F:\Dropbox\Public\lookangEJSworkspace\export
go to C:\WINDOWS\system32\cmd.exe console and do a right click and paste after you type cd F:\Dropbox\Public\lookangEJSworkspace\export
to get cd F:\Dropbox\Public\lookangEJSworkspace\export and you need to type f: if you are using a different drive like me
cd F:\Dropbox\Public\lookangEJSworkspace\export f:
type keytool -genkey -keystore myKeystore -alias myAlias -validity 1800 , for my example my Alias is lookang, i recommend to keep myKeystore as it is and adding -validity 1800 for a 1800 days of certification instead of the default 6 months. i used keytool -genkey -keystore myKeystore -alias lookang -validity 1800
enter your own password, don't tell anyone this password and follow the instruction the best you see fit
notice that a new file called myKeystore is generated in the folder F:\Dropbox\Public\lookangEJSworkspace\export
u are now ready to sign all jar applets using that just created myKeystore. type or copy this jarsigner -keystore myKeystore myJar.jar myAlias but for my case i will type jarsigner -keystore myKeystore ejs_model_RocketTemplatewee.jar lookang . you need to replace myJar.jar with the name of the own *.jar files and the myAlias also need to replace to the myAlias you used, for my case lookang. When ask for the Passphrase, just key in your password you used in step 9.
I know this is an old thread but I have just found it.
Since you are uploading the EJS application to Moodle, I guess you are using the EJSApp plugin. This plugin has an option (since versión 1.7) to automatically sign every applet you upload to Moodle using the EJSApp activity.
Of course, you would need the sign certificate to be in your Moodle server. But trust me, this saves A LOT of time.