{"id":47,"date":"2014-05-11T10:14:05","date_gmt":"2014-05-11T10:14:05","guid":{"rendered":"http:\/\/vkrastev1blog.com\/?p=47"},"modified":"2014-05-12T02:37:00","modified_gmt":"2014-05-12T02:37:00","slug":"how-to-sign-jars-signing-jars-for-use-in-applets","status":"publish","type":"post","link":"https:\/\/vkrastev1blog.com\/2014\/05\/11\/how-to-sign-jars-signing-jars-for-use-in-applets\/","title":{"rendered":"Como assinar potes. Assinatura de Jars para utiliza\u00e7\u00e3o em Applets."},"content":{"rendered":"<p>Como os navegadores agora querem que os Jars sejam assinados, acontece muitas vezes que o pr\u00f3prio homem tem de assinar um Jar.<\/p>\n<p>Aqui est\u00e1 um manual sobre como assinar um Jar.<\/p>\n<p>Primeiro precisa de instalar o Java SDK.<\/p>\n<p><a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html?ssSourceSiteId=otnjp\" rel=\"nofollow\">http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html?ssSourceSiteId=otnjp<\/a><\/p>\n<p>Instale o JDK a partir da lista do ambiente que utiliza.<\/p>\n<p>Este manual foi feito para utilizadores do Windows. Defina a vari\u00e1vel JAVA_HOME e coloque a pasta JAVA\/bin no caminho para utilizar os comandos Java.<\/p>\n<p>Agora pode criar o seu keystore e o seu par de chaves. Navegue at\u00e9 \u00e0 sua pasta pessoal como C:\\Users\\username e execute o seguinte comando na consola.<\/p>\n<ul>\n<li><strong>Gere um keystore Java e um par de chaves<\/strong>\n<pre>keytool -genkey -alias mydomain -keyalg RSA -keystore .keystore<\/pre>\n<p>Deve responder a algumas quest\u00f5es e no final ter\u00e1 um keystore gerado chamado . keystore e o par de chaves. Deve anotar a password do keystore, pois \u00e9 importante e ser\u00e1 utilizada depois disso.<\/p>\n<p>Agora navegue at\u00e9 \u00e0 pasta com os seus Jars e execute os seguintes comandos na consola:<\/p>\n<pre>jarsigner -sigfile SIG -signedjar SignedApp.jar jar-to-sign.jar alias\r\njarsigner -verify SignedApp.jar<\/pre>\n<p>Assim como no lugar do alias coloque o alias que inseriu por Gera\u00e7\u00e3o do keystore. Jar-to-sign \u00e9 o nome do jar que precisa de assinar.<br \/>\nA verifica\u00e7\u00e3o \u00e9 feita para verificar se o jar foi realmente assinado com sucesso.<\/p>\n<p>\u00c9 isso.<\/p>\n<p>Feliz assinatura.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Como os navegadores agora querem que os Jars sejam assinados, acontece muitas vezes que o pr\u00f3prio homem tem de assinar um Jar. Aqui est\u00e1 um manual sobre como assinar um Jar. Primeiro precisa de instalar o Java SDK. <a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html?ssSourceSiteId=otnjp\" rel=\"nofollow\">http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html?ssSourceSiteId=otnjp<\/a> Instale o JDK a partir da lista do ambiente que utiliza. Este manual foi feito para [&hellip;]<\/p>\n","protected":false},"author":65283547,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"How to sign Jars. Signing Jars.","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1017],"tags":[232319076,232319074,2829783,232319073,232319071],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-java","tag-how-to-sign-jar","tag-java-sign-jar","tag-keystore","tag-sign-jar","tag-signing-jars"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4CoHV-L","jetpack-related-posts":[{"id":208,"url":"https:\/\/vkrastev1blog.com\/2022\/04\/03\/maven-excluding-jars-from-war-file\/","url_meta":{"origin":47,"position":0},"title":"Maven excluindo Jars do ficheiro WAR","author":"vkrastev2014","date":"03.04.2022","format":false,"excerpt":"I have had a problem to exclude some Jars from War File with maven. You can do it using maven-war-plugin <project> ... <build> <plugins> <plugin> <artifactId>maven-war-plugin<\/artifactId> <version>3.3.2<\/version> <configuration> <packagingExcludes>WEB-INF\/lib\/xxxx*.jar<\/packagingExcludes> <\/configuration> <\/plugin> <\/plugins> <\/build> ... <\/project>","rel":"","context":"In &quot;Java&quot;","block_context":{"text":"Java","link":"https:\/\/vkrastev1blog.com\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":83,"url":"https:\/\/vkrastev1blog.com\/2014\/05\/16\/how-to-set-up-the-classpath-in-jar-manifest\/","url_meta":{"origin":47,"position":1},"title":"Como configurar o classpath no jar manifest","author":"vkrastev2014","date":"16.05.2014","format":false,"excerpt":"You must break after exactly 70 characters. Otherwise the next line is not going to be treated as a continuation from the previous. There should be a leading space in all the wrapped lines, with a leading space for every line different from that with \"Class-path:\". And don't forget a\u2026","rel":"","context":"In &quot;Java&quot;","block_context":{"text":"Java","link":"https:\/\/vkrastev1blog.com\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":247,"url":"https:\/\/vkrastev1blog.com\/2024\/04\/11\/how-to-create-pdf-from-html-or-image-using-java-pdfbox-framework\/","url_meta":{"origin":47,"position":2},"title":"Como criar PDF a partir de HTML ou imagem utilizando a framework java pdfbox","author":"vkrastev2014","date":"11.04.2024","format":false,"excerpt":"Following example code here: In pom.xml insert or get the jar files and add them to the java project if you don't use maven <repositories> <repository> <id>jitpack.io<\/id> <url>https:\/\/jitpack.io<\/url> <\/repository> <\/repositories> <!-- https:\/\/mvnrepository.com\/artifact\/org.apache.pdfbox\/pdfbox --> <dependency> <groupId>org.apache.pdfbox<\/groupId> <artifactId>pdfbox<\/artifactId> <version>3.0.2<\/version> <\/dependency> <!-- https:\/\/mvnrepository.com\/artifact\/com.github.hkirk\/java-html2image --> <dependency> <groupId>com.github.hkirk<\/groupId> <artifactId>java-html2image<\/artifactId> <version>0.9<\/version> <\/dependency> and Java code here\u2026","rel":"","context":"In &quot;Java&quot;","block_context":{"text":"Java","link":"https:\/\/vkrastev1blog.com\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":217,"url":"https:\/\/vkrastev1blog.com\/2022\/05\/20\/eclipse-how-to-use-the-jpa-static-metamodel-classes-while-writing-criteria-queries-in-hibernate\/","url_meta":{"origin":47,"position":3},"title":"Eclipse como utilizar as classes de metamodelo est\u00e1tico JPA ao escrever consultas de crit\u00e9rios no Hibernate","author":"vkrastev2014","date":"20.05.2022","format":false,"excerpt":"When you use Maven you have to add in your POM following dependency: <dependency> <groupId>org.hibernate<\/groupId> <artifactId>hibernate-jpamodelgen<\/artifactId> <version>5.3.7.Final<\/version> <\/dependency> Now you have to add folder target\\generated-sources\\annotations to your classpath as by default, the classes will be generated in this folder only. You go in Project Build Path -> Configure Build Path\u2026","rel":"","context":"In &quot;Java&quot;","block_context":{"text":"Java","link":"https:\/\/vkrastev1blog.com\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":129,"url":"https:\/\/vkrastev1blog.com\/2014\/05\/26\/new-gpu-bitcoin-miner-is-there-named-diamantminer-how-to-install-on-windows\/","url_meta":{"origin":47,"position":4},"title":"O novo GPU Bitcoin Miner chama-se DiamantMiner. Como instalar no Windows","author":"vkrastev2014","date":"26.05.2014","format":false,"excerpt":"New GPU Bitcoin Miner is there named DiamantMiner. How to install on Windows I have tried the new bitcoin miner and I find it very good. What you should do to install it on Windows is described here. How to build and install DiamantMiner requires the SDK for Java Version\u2026","rel":"","context":"In &quot;Outros&quot;","block_context":{"text":"Outros","link":"https:\/\/vkrastev1blog.com\/category\/others\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":80,"url":"https:\/\/vkrastev1blog.com\/2014\/05\/13\/eclipse-java-code-complition-not-working\/","url_meta":{"origin":47,"position":5},"title":"A conclus\u00e3o do c\u00f3digo Eclipse\/Java n\u00e3o funciona","author":"vkrastev2014","date":"13.05.2014","format":false,"excerpt":"Try restoring the default options in 'Windows > Preferences > Java > Editor > Content Assist > Advanced' An example of the kind of data you see in this preference screen, however not necessarily what you currently have. That was the only way that worked for me. I restored my\u2026","rel":"","context":"In &quot;Java&quot;","block_context":{"text":"Java","link":"https:\/\/vkrastev1blog.com\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/users\/65283547"}],"replies":[{"embeddable":true,"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":3,"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":63,"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/posts\/47\/revisions\/63"}],"wp:attachment":[{"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}