DOC PREVIEW
GT LCC 6310 - Jar signing, debugging

This preview shows page 1-2-3-4-5-6 out of 17 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Computers as an Expressive MediumThis week’s episode:Slide 3Using Web crawling on CoursewareSlide 5Signing your jar fileSlide 7Slide 8Slide 9Viewing the jar fileDebuggingSlide 12Slide 13Debugging TipsSlide 15End of SlidesSlide 17Computers as an Computers as an Expressive MediumExpressive MediumLab 8: jar signing, debuggingLab 8: jar signing, debuggingMayhew SeaveyMayhew SeaveyThis week’s episode:This week’s episode:jar signing – Not just for pottery jar signing – Not just for pottery celebrities anymore.celebrities anymore.Debugging – Not just for Debugging – Not just for exterminators anymore.exterminators anymore.This week’s episode:This week’s episode:jar signing – Not just for pottery jar signing – Not just for pottery celebrities anymore.celebrities anymore.Debugging – Not just for Debugging – Not just for exterminators anymore.exterminators anymore.And MORE crappy puns!And MORE crappy puns!Using Web crawling on Using Web crawling on CoursewareCoursewareProcessing window extends BApplet. Processing window extends BApplet. You can view Applets on the web, You can view Applets on the web, which is why they work (usually) which is why they work (usually) seamlessly with the Courseware.seamlessly with the Courseware.HOWEVER, browsers have security HOWEVER, browsers have security problems when a Java applet tries to problems when a Java applet tries to access other files at different sites.access other files at different sites.Using Web crawling on Using Web crawling on CoursewareCoursewareFor instance, this call works both in Processing For instance, this call works both in Processing and on the Courseware (provided image1.jpg is and on the Courseware (provided image1.jpg is in your data directory):in your data directory):BImage im = loadImage(“image1.jpg”);BImage im = loadImage(“image1.jpg”);But this call works only in the Processing But this call works only in the Processing program, not online:program, not online:BImage im = BImage im = loadImage(“http://idt.gatech.edu/~mseavey/image1.jloadImage(“http://idt.gatech.edu/~mseavey/image1.jpg”);pg”);Signing your jar fileSigning your jar fileTo allow browsers to control the security of To allow browsers to control the security of your applet, you must sign it first.your applet, you must sign it first.Two steps:Two steps:Create a keystore file.Create a keystore file.Sign your jar file.Sign your jar file.Before you can do this, you must either:Before you can do this, you must either:upload your jar file to your Steel account.upload your jar file to your Steel account.For the following commands, use a shell prompt.For the following commands, use a shell prompt.install the Java SDK on your machine.install the Java SDK on your machine.get to a command line in the directory of your jar.get to a command line in the directory of your jar.Signing your jar fileSigning your jar fileCreate a keystore fileCreate a keystore file. Run the following . Run the following command:command:keytool -genkey -alias <alias> -keystore keytool -genkey -alias <alias> -keystore <location><location>The “-keystore <location>” part is The “-keystore <location>” part is optional. It allows you to specify where the optional. It allows you to specify where the .keystore file will go. If you don’t specify, it .keystore file will go. If you don’t specify, it will place it in your default system path. will place it in your default system path. This should be fine for most applications.This should be fine for most applications.Signing your jar fileSigning your jar fileAfter you run keytool, it will prompt you for After you run keytool, it will prompt you for some things:some things:keystore password: this is used when signing keystore password: this is used when signing your jars.your jars.Name, Organizational Unit, blah blah: not very Name, Organizational Unit, blah blah: not very important, just provides viewers information on important, just provides viewers information on who they’re trusting.who they’re trusting.key password: also used when signing your key password: also used when signing your jars. Not a problem to make it the same as the jars. Not a problem to make it the same as the keystore password.keystore password.Signing your jar fileSigning your jar fileSign your jar fileSign your jar file. Run the following . Run the following command:command:jarsigner <jar file> <alias> -keystore <location>jarsigner <jar file> <alias> -keystore <location><jar file> is just the file name of the jar.<jar file> is just the file name of the jar.<alias> just needs to match the alias you <alias> just needs to match the alias you used for the keystore.used for the keystore.-keystore <location> is also optional. The -keystore <location> is also optional. The default will be the same location as keytool.default will be the same location as keytool.You will be prompted for your keystore You will be prompted for your keystore password.password.Viewing the jar fileViewing the jar fileThe jar file is signed! Upload it to the The jar file is signed! Upload it to the courseware like you would normally.courseware like you would normally.When anyone loads the applet, a When anyone loads the applet, a window will come up asking if they window will come up asking if they accept the certificate. Just click accept the certificate. Just click “Yes”, and the applet will load.“Yes”, and the applet will load.DebuggingDebuggingStack Trace: The indecipherable lines Stack Trace: The indecipherable lines of red that pop up when an error of red that pop up when an error occurs.occurs.This shows what methods were running This shows what methods were running in what classes when the program in what classes when the program broke, as well as the line numbers in broke, as well as the line numbers in their java files.their java files.DebuggingDebuggingCommon errors, and what they Common errors, and what they mean:mean:ArrayOutOfBoundsExceptionArrayOutOfBoundsExceptionYou are trying to access an index in an array You are trying to access an index in an array that doesn’t have that index. For example, that doesn’t have that index. For example, thisArray[-1] or thisArray[6] in an array with thisArray[-1] or thisArray[6] in an array with length 6 (max index of 5). Check to make length 6 (max index of 5). Check to make


View Full Document

GT LCC 6310 - Jar signing, debugging

Documents in this Course
Load more
Download Jar signing, debugging
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Jar signing, debugging and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Jar signing, debugging 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?