Signing jar and appending to the original manifest

I create my jars with a manifest file with some entries
like Specifiaction and implementation versions
however when I sign them the manifest is replaced and I lose my manifest entries
Am I doing something wrong is that what is supposed to happen?
If that is normal what do I do to keep my original manifest entries
Thanks

I could not reproduce with jdk 1.5.0_04, did not use a package though.
here is the java class:
import java.applet.*;
public class test extends Applet {
     public void start() {
          System.out.println("this is start");
     public void init(){
          System.out.println("this is init");
}The manifest:
Manifest-Version: 1.0
Created-By: 1.5.0_04 (Sun Microsystems Inc.)
Specification-Title: The title
Specification-Version: 1.2
Specification-Vendor: the vendor
Implementation-Title: java.util
Implementation-Version: build57
Implementation-Vendor: the vendor
The batchfiile creating the signed jar:
del *.cer
del *.com
del *.jar
del *.class
javac test.java
keytool -genkey -keystore harm.com -keyalg rsa -dname "CN=Harm Meijer, OU=Technology, O=org, L=Amsterdam, ST=, C=NL" -alias harm -validity 3600 -keypass password -storepass password
rem keytool -export -alias harm -file exportPublicKey.cer -keystore harm.com -storepass password
rem jar cfm0 test.jar manifest.txt test.class
jar cfm0 test.jar manifest.txt test.class
jarsigner -keystore harm.com -storepass password -keypass password -signedjar sTest.jar test.jar harm
del *.class
pause
Both test.jar and sTest.jar contain the information from manifest.txt.

Similar Messages

  • So on my MacBook Pro, a friend tried signing into the guest account. It's been stuck on the loading screen for 3 days and hasn't let me cancel the request and login to the original account. What can I do?

    So on my MacBook Pro, a friend tried signing into the guest account. It's been stuck on the loading screen for 3 days and hasn't let me cancel the request and login to the original account. What can I do?

    Hold the power button down for 10 seconds.  It will power down your Mac.  You can then start it up again and see if you can log in normally.

  • Signed jars and HTTPS

    I'm running a web application from jetty, which involves an applet on the client-side, JSPs/servlets on the server.
    The applet jars needs to be signed during our build proces (by my company's keystore based on our purchased cert) but the customer will need to provider their own cert to run the https pages.
    Is there a way to do this? Right now, I"m getting the "signer information does not match signer information of other classes in the same package" when I try to run it in HTTPS. This could be due to my jetty HTTPS settings not being quite ready (pointing at a keystore which is incorrect) - but I want to make sure that I can at least do what I need to do? If so, any suggestions/advice/tips would be most welcome!
    thanks

    I'm trying to use the KeyStore that the applets were signed with on my local build as the KeyStore I'm pointing to when starting up Jetty. This still leads to the 'signer information does not match signer information of other classes in the same package' error when trying to accept one of my signed jars for use. I exported a cert from the keystore used in the build and imported that into my browser as well.
    I also tried using a keystore with a self signed certificate for running Jetty and had the same problem.
    When not running in HTTPS, I can use all the signed jars and everything works fine. Is the conflict between the signature on the jars and the one jetty's using for SSL? Why didnt using the same keysotreAnd if so, why doesn't accepting all the jars and certs help out? I may need to do something programatically in the code for this, I guess - tho I'm not sure where to start out.
    If anyone's had a similar problem, I'd appreciate hearing how you'd worked it out.
    thanks,
    tOm

  • I can't get my music to play in my itunes. It comes with a exclamation mark next to the song numbers and says that the original songs can't be played cause cant find the file. How do I get the songs back? (I found the files)

    I can't get my music to play in my itunes. It comes with a exclamation mark next to the song numbers and says that the original songs can't be played cause cant find the file. How do I get the songs back? (I found the files

    You get exclamation marks or dead tracks because  iTunes can’t find the file. This can happen for a number of reasons:
    The song file or a folder in its path was renamed
    The song file or the folder it is in has been moved
    The song file has been deleted
    The device containing the song files e.g. external drive is not accessible or the drive letter has changed.
    If you use an external drive, a change in drive letter is a common cause and you need to change it back.
    AS a way of working out what has happened, right click on a track and select the summary tab (you will have to go past an error message). The summary tab will tell you where iTunes thinks the track is located. How does that compare with where the track actually is?
    The xml library file is not used by iTunes, it is created to allow other programs to access the library. You can recreate the iTl file from the xml file, but there is no point if the location of the files is wrong.
    There is a simple way of getting you music back in iTunes, but it loses all playlists counts and rating. To do this drag iTunes library.itl and iTunes Library.xml to your desktop. Then open iTunes and an empty library is created. Add you iTunes Media folder to it.
    If you can't work out what went wrong and how to fix it, you may have to do this.

  • I signed up for a free trial.  I want to convert a Word document to a PDF document.  I've signed in and been through the process a dozen times.  It doesn't work.

    I signed up for a free trial.  I want to convert a Word document to a PDF document.  I've signed in and been through the process a dozen times.  It doesn't work.

    Hi kemtnilion,
    What did you get a trial of? Adobe doesn't offer free trials of the Acrobat.com online services; did you get a free trial of Acrobat, perhaps? If so, you can save a PDF directly to Word from Acrobat, by choosing File > Save as Other > Microsoft Word > Word Document.
    Please let us know if you have additional questions.
    Best,
    Sara

  • HT5252 I tried to change my metadata date and got this   Aperture was not able to adjust the date and time of the original file "01769_p_h13ajyrm4bm0944.jpg" because it is locked or you do not have permission to modify it.

    I tried to change the metadata date.  It changed the date on my photo, but when I checked the box that said "also change my original file", it gave me this error message.
    Unable to change original file.  Aperture was not able to adjust the date and time of the original file “01769_p_h13ajyrm4bm0944.jpg” because it is locked or you do not have permission to modify it.
    Wassup?

    What is your Aperture version? The older versions of Aperture 3 had a problem to apply Metadata changes to the original file.
    If you are using the current version Aperture 3.4.5, try to repair the permissions on your Aperture library, if you have not already done so:
    Launch Aperture with the key combination ⌥⌘ held down and select "Repair Permissions" from the First Aid PAnel, that will appear.
    If that does not help, post back with more information on your original files - are the referenced or managed? Where is your Aperture library located? Since when do you have this problem? And what did you do directly before noticed the problem for the first time?
    Regards
    Léonie

  • Archive files are in XML format and not in the original format

    Hi all,
    I am using a receiver file adapter with archiving option. When I look at the archive files they are in the XML converted format and not in the original flat file format received. We would like to store these files for audit purpose and it doesnt make sense to store XML files. We are in SP04. Does a note need to be applied or any other extra configurations need to be done which I might have missed? Please advise.
    -Teresa

    Hi,
    >>>Wow, the note says its fixed in SP10
    but only the split is fixed not the XML messages in the archive I think (from the note)
    >>>Is there any alternative quick fix and I hate manual work
    create 2 new folders - connect one of them with the file adapter and the second one remains for archives
    in you normal destination folder for your files add a simple program that will check if there are any files and copy them to those two folders - this could be the fastes but obviously not the best solution I guess
    Regards,
    michal

  • How can i format an iphone with an differant apple id ?... the phone is locked and it needs the original apple id to activate it which i dont have

    how can i format an iphone with an differant apple id ?... the phone is locked and it needs the original apple id to activate it which i dont have .... help me

    Moh'd . Hassan wrote:
    how can i format an iphone with an differant apple id ?... the phone is locked and it needs the original apple id to activate it which i dont have .... help me
    Then get the previous owner to remove it: Find My iPhone Activation Lock: Removing a device from a previous owner’s account - Apple Support

  • Edit JPG in Preview and i loose the original ?

    Hi i am very muddled up with, is it called Auto Save ?
    I Crop a photo in Preview, there isnt a Save As.... just a Save, so i Save it and it Overwrites the original !!.
    Why cant i have a Save As.... it would be far Safer and and Easier for me, an Old Un to understand.
    So i do have to remember to Save a Copy BEFORE i do anything at all.    gggrrrrrr

    The original picture is still there. Open the modified version. Move the mouse curson to the right of the picture's name in the title bar. You'll see a little triangle. Click it and choose Browse all version.
    Sorry for the pictures that has Italian menu. I hope you get the idea

  • A .txt in jar,and dont kown the jar's absolute path,how to read it

    I have help.txt and HelpReader class in a jar,and dont kown the jar's absolute path,how to let
    HelpReader class can find help.txt and read it??
    thanks

    Make sure the jar is in your program's classpath. Then use something likeInputStream help = this.getClass().getResourceAsStream("/help.txt");to read the file. Exactly what you would use depends on where in the jar file the help.txt file is located.

  • I have a macbook pro and some of the original widgets have been removed by mistake and I can't find them torestore them. I wanted the original one back on the dashboard but I have't been able to do that. HELP !!! Thanks...

    I have a macbook pro and some of the original widgets have been removed from the dashboard dock by mistake. I can't seen to find them to restore tham. HELP!!!

    Widgets are located in the folder, users/"user name"/library/widgets/
    Whilst holding down the option key in finder, and selecting the library under the "go" menu, you can access your library within Lion.
    If you have a working Time Machine backup, you can restore those missing files back to the widgets folder. If you don't, and your widgets folder is empty, then they are indeed gone (unless they are still in the trash). You would then have to re-download them from where they came.
    If everything is there, then just click the "+" symbol at the lower left corner of the dashboard screen to add them back to the window.

  • I bought a used iPad 2 and now it is unusable because it keeps prompting me to sign in to iCloud with the original owners ID and I can not locate him, what can I do?

    I bought a used iPad 2 and it has started prompting me to sign into iCloud, however, I do not have the original owners password. How can I reset it

    You can't. You may have purchased a stolen iPad. Where did you buy it? If on eBay, you can get a refund.
     Cheers, Tom

  • Peculiar issue with signed .jars and Linux (Debian unstable, 2.4.20-custom)

    BACKGROUND:
    I am a developer working on a Java3D application, which is to be deliverable over
    the Web. Delivery as an applet seemed a natural choice, and so I spent a considerable amount of effort learning (I won't say "mastering") the process of
    creating a self-signed .jar containing java3d-<some_version>.exe. I have in fact
    successfully created a fully-fuctional from-scratch JPI/Java3D/myapp install. By
    this I mean that Windows machine with only stock IE installed could hit my URL,
    get the proper JPI installed, followed by the Java3D runtime I'd chosen, as well
    as a third-party DXF loader, and finally (after much clicking of 'Yes', 'Accept',
    'OK', etc.) see my app in a browser window.
    That was on my old, slow, Windows2000 workstation. Now I have a shiny, new
    workstation upon which my employer has graciously allowed me to run Linux. Sadly,
    the re-creation of the self-signed .jar files under a new JDK has not gone smoothly.
    PROBLEM DESCRIPTION:
    When a user attempts to download the self-signed .jar containing the auto-install
    executable for the Java3D runtime, the normal security warning prompts are displayed (one for granting to install the extension, one to accept the "suspect" certificate from me alone). The plugin happily downloads the .jar file, and then
    a NullPointerException is thrown, with a
    stack trace like:
    NPE!
    at java.util.zip.ZipFile.getInputStream (unknown source)
    at java.util.jar.JarFile.getInputStream (unknown source)
    <something>doPrivileged<something>
    etc.
    I apologize for the lack of a full stack trace; I would essentially have to type it in by hand after printing it out on the remote test box; I hope that I've caught the important details above.
    After this, the pure-java signed .jar is downloaded and installed, and then the applet "loads" with the predictable ClassNotFoundException for javax.media.j3d.SceneGroup.
    Downloading and installing the J3D runtime by hand and then re-visiting the URL results in a fully-functional applet.
    I've tried Blackdown Linux JDKs 1.4 and 1.3.1, as well as Sun's JDKs 1.3.1_07 and 1.3.1_05 for the compiling, jar'ing, and jarsigner'ing of these files, all with the same result. At each new JDK, I re-did the HTML conversion so that he appropriate
    JPI version was required on the client. I did complete uninstallations of all client JPI instances (including Web Start for 1.4.1_x, as well as cleaning the registry on the client).
    When this strategy worked, it was on Sun JDK 1.3.1_05 for Windows runnning on Windows2000, unknown service pack.
    DESIRED BEHAVIOR:
    I would like my clients to be able to go from stock Windows2K/IE (this being an intranet without any other options) to some JPI version running the J3D extension, with only the need to click 'OK', 'Accept', 'Grant This Session', etc. a bunch of times on the part of the user. I want this to happen without my having to resurrect my decrepit old Compaq Deskpro just to play the role of "build host" for my
    Java3D and loader .jar files, if at all possible.
    FILES:
    Here's what gets merged into the "main" applet's mainfest at creation time:
    Manifest-Version: 1.0
    Extension-List: java3d DxfLoader
    java3d-Extension-Name: javax.media.j3d
    java3d-Implementation-Vendor-Id: com.sun
    java3d-Implementation-Version: 1.3
    java3d-Specification-Title: Java 3D API Specification
    java3d-Specification-Version: 1.3
    java3d-Specification-Vendor: Sun Microsystems, Inc
    java3d-Implementation-URL: http://10.1.1.1/heartcad/lib/java3d.jar
    DxfLoader-Extension-Name: eupla.dxfloader
    DxfLoader-Implementation-Title: Eupla DXFLoader
    DXFLoader-Implementation-URL: http://10.1.1.1/heartcad/lib/DxfLoader.jar
    And into the manifest for the J3D .jar:
    Manifest-Version: 1.0
    Implementation-Version: 1.3
    Specification-Version: 1.3
    Extension-Installation: "java3d-1_3-windows-i586-directx-rt.exe"
    Extension-Name: javax.media.j3d
    Implementation-Vendor-Id: com.sun
    Implementation-Vendor: Sun Microsystems, Inc
    Specification-Vendor: Sun Microsystems, Inc

    I have seen that bug, and the problem I'm having seems to be different than it. The extension installer is in the first extension .jar my applet asks for, and it
    never works automatically, regardless of how many times the applet is loaded.
    The second .jar, which doesn't have to run any installer, always works fine, but the first one will never work (a manual install of the Java3D runtime is required). This seems to not be the behavior described in the bug.
    I will continue to search for an answer to this problem, and of course if I should find anything I'll post it here.

  • How to load the original manifest file

    Hi I wrote an application. Is lanunched by webstart.
    In the original jar file is set an property like a Program-version:1.5
    after launching the application I can fread resources from "/resources/images/myimage", but I Cant read the from the manifest file.
    just 2 properties: Manifest version and oanother one.
    What can I do?

    You have right! That is one of the advantanges of saying a lot
    of things - I am regularly wrong, but the number
    of times I am right, outnumbers them!
    ( Also, when I am wrong, I get to find out..
    in public! ;)
    Image url =
    jar:http://www.theWebServer.com/file/path/myApplicatio
    n.jar!/resources/images/logo.png
    Manifest url =
    jar:file:/C:/Program%20Files/Java/jre1.6.0/lib/javaws.
    jar!/META-INF/MANIFEST.MF
    Is not the same! :-))
    It is true: The first time when I want to read the
    manifest file. And I never imagene before: I read my
    application image, and I cant read the same manifest
    :-))Good. It is not good that they are 'not the same',
    but that you are beginning to understand some
    of the traps and pitfalls, and ways to find out what
    is going wrong. That is progress.
    But if in my main static method if I call:
    Thread.currentThread().getContextClassLoader().getReso
    urce("/resources/images/logo.png")
    this URL is null !!
    Why?
    I know I should learn something about classloaders,
    but when is changed the jnlp loader to a "normal"
    classloader. when I launch only the .jar file I have
    no problems, but I need webstart! :-)I am surprised it worked from within main(),
    in a jar file - it usually would not work for loose
    classes off the local file system (but that is a
    whole other story, to do with classloaders).
    In any case, I think Caffeine0001 recently posted
    some source that should help out, here. Check out
    the source example he(/she) posted in this thread..
    http://forum.java.sun.com/thread.jspa?messageID=4510193
    It shows a way to find the actual file-system location
    of a resource (your image, in this case), from which we
    might construct an URL directly to the MANIFEST.MF
    that you actually need.
    Have a look/play with that source, and see if you
    can include it into your code, so that we can see
    where the image is being cached to.

  • Export QuickTime file with new audio and maintain the file size and quality as the original.

    I shot some footage for a client yesterday and ran into an issue. To make a long story short I have QuickTime mov files shot with my Panasonic GH4 that have a buzzing sound in the audio track. I have clean audio from a recorder that can be sync'd. Is there a way for me to do this for the client and deliver them as the same QuickTime file but with the clean audio and keep the file size close to the original and not have quality loss in the image?
    If so I will probably put all of the spanned clips together from each interview and sync the audio before delivery. I am just not sure which codec will give the client the same quality footage compared to the originals and not have a massive difference in the overall file size. They did request that they be Quicktime MOV files though so that is a must.
    I don't see this as an option in the codecs in the export settings in PP, but is there a way to export as ProRes or another MAC native codec that will save them from having to convert it on their end? I am on a PC with Adobe CS5.5 so I am not too familiar with MACs, but from what I understand they would need to convert the files if I sent them straight out of the camera.
    I found some related search results for this but they pertained to "Best quality" for export. I am not sure how the varying options work but I don't want to create files that are considerably larger, just not less quality.
    If anyone has experience with this it would be greatly appreciated.
    Thanks,
    Cole

    Here's the workflow: I imported the video footage into iMovie '08 and did my edits. Then I exported it (share) to my desktop with compression set @ 740 X 480. Then I used QuickTime Pro to fix the audio track. The file plays perfectly with both audio tracks working. It's a QuickTime file (.mov).
    I hope this jars any replies as to why the file when uploaded to my iWeb gallery drops the second audio track.
    Hmm,
    Jack

Maybe you are looking for

  • Help needed for importing the DC's from NWDI track very urgent

    Hi all, I am importing a DC from NWDI tracks. I imported DC from NWDI with out any problem but i am unable to create a project it shows an error while i am creating the project for DC in inactive DC's. error message is : Failed to sync DC "**.##/lpt/

  • ATV and TC part 2

    Ok, here is my hopeful setup. I am really looking for someone who has attempted this setup and can confirm or deny that this works. I currently have a TC 1TB and an Apple TV. I would like to store all of my movies on the TC and stream directly from t

  • Sapscript: Output is continuous or contains too many pages (more than 3)

    Hi, I have developed Sapscript form for printing out material documents. When users try to print out document with 68 positions, they receive error in MB90 - " Output is continuous or contains too many pages (>3)". Message no. TD405 If they try to pr

  • Outlook clients get prompt for credentials

    I have get the following strange problem that when the Exchange server restart and get back on-line my outlook clients all get prompt to enter their credentials. If they open and close Outlook it works until there is a lost in communication between O

  • Fonts behave different in Photoshop in comparison with Illustrator

    I have a problem: it seems that some fonts behave different in Photoshop CS than in Illustrator CS on my Windows XP. Where Illustrator opens a vector (Ill) EPS file correct Photoshop shows me wrong characters sometimes: for example: an é becomes a wr