Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Problem signing jar file

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, I finally got what I think is an actual certificate, had no trouble importing it into my keystore, but when I try to sign the JAR, it can't find the certificate:
$ jarsigner -keystore PromptsKeystore jar/authprompts.jar prompts
Enter Passphrase for keystore: ************************
jarsigner: certificate not found for: prompts
$ keytool -list -keystore PromptsKeystore
Enter keystore password: ************************
Keystore type: jks
Keystore provider: SUN
Your keystore contains 1 entry:
prompts, Fri Mar 14 09:12:47 CST 2003, trustedCertEntry,
Certificate fingerprint (MD5): 1E:46:E4:6C:BA:5C:27:A3:78:92:1C:B1:D9:FF:67:86
[ March 14, 2003: Message edited by: Scott Lynch ]
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i just want to read a txt file. can this be done doing the same thing?
 
Scott Lynch
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Paul McCaffery:
i just want to read a txt file. can this be done doing the same thing?


I assume you're asking if a signed applet can read a TXT file? I'm pretty sure it can, but I haven't tried it. My native library can write a file without a problem, so I imagine that you could use the java.io package to read/write as long as the jar is signed.
 
Saloon Keeper
Posts: 22122
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An applet that has been properly authorized and signed can read (or write) any type of file. But an unsigned applet can't.
Personally, I recommend that in general, you don't have applets store files on the local computer. It's much easier to keep things backed up and secured when they're server-based rather than splattered across a thousand desktops.
IF, however, your need to keep a local copy of information on a machine that will be frequently disconnected from the network, that's obviously not feasible.
It's not a bad idea when keeping files on laptops to encrypt them while you're at it. Laptops get stolen. Often without even leaving the office.
 
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic