Protect Jar Content

Can I use any tool or utility to make a content of a JAR file not accessible to unzip?

RAUL_MORALES wrote:
Can I use any tool or utility to make a content of a JAR file not accessible to unzip?No

Similar Messages

  • How-to protect static content

    Hi !
    I have a site with many files (pictures, XML files, etc)
    How can I protect those content from unauthorized access / sniff ?
    I was thinking in two options
    1) a filter servlet, validating sessions permissions etc
    2) a servlet to write out the files (...)
    Any other suggestion? best practice?
    Regards
    Joe

    Actually yes each server has its own realm implementation but it is all configured and handled by the server and does not affect the portability of the application.
    How to protect the static pages is dependant on how you allow access to your web application.
    If you don't have any security in the web app you then put any files that you don't want accessed in the browser in the WEB-INF folder. Images and other files that are accessible in the browser you put in folders with an index page to prevent users from seeing the directory structure.
    If your application uses server managed security you include you use this security to manage access to the files.
    If you are using application based security then you go with a filter.

  • Handle unclosed after reading jar content

    Hi
    While attempting to build a simple dynamic plugin (or 'service', as in sun terminology) framework for my app,
    I encountered a behavior which seems at least unwanted to me:
    After opening a stream using a java.net.URL to a file inside a jar file, closing it wont close the handle on the jar file.
    To make it easy, here is a simple piece of code that causes the problem:
    public static void main(String[] args) throws IOException {
              InputStream inputstream = null;
              BufferedReader bufferedreader = null;
              try {
                   // URL to a local jar file
                   // the jar and service file do exist
                   URL url = new URL("jar", "", "file:/d:/temp/jars/ri.jar!/META-INF/services/test.plugin.Plugin");
                   inputstream = url.openStream();
                   bufferedreader = new BufferedReader(new InputStreamReader(inputstream, "utf-8"));
                   // do some stuff
              } finally {
                   if (inputstream != null) {
                        inputstream.close();
                   if (bufferedreader != null) {
                        bufferedreader.close();
              // force garbage just in case
              inputstream = null;
              bufferedreader = null;
              System.gc();
              System.gc();
              // pause before exit
              // at this point, there is still a handle on the jar file from the JVM
              System.out.print("pause;");
              Scanner in = new Scanner(System.in);
              in.nextLine();
         }When reaching the 'pause' step, a handle exists on the file and makes any action on it impossible
    (replacing it with a new one for instance). To confirm this, Process Explorer detects a handle from
    the javaw process associated with this program on the jar file.
    I've experienced this using the latest of jdk 6 and also with java 5 (on win XP)
    So, is this a normal behavior ? Any idea how to avoid it ?
    As I'm looking for dynamic plugin functionnalities, I'd like to keep this jar content as it is,
    ie this file which lists implementations of the "test.plugin.Plugin" service among the classes
    which are also stored in the jar.
    Being able to release the jar file would mean I can replace it with another version on fly,
    without restarting my app, and load it again to access the updated functionnalities, then
    unload it again and so on.
    Thanks in advance for any piece of advice on this issue.

    in case anyone is interested, I seemed to have found a workaround, by disabling caching for the URL connection:
    if we replace
    inputstream = url.openStream();
    bufferedreader = new BufferedReader(new InputStreamReader(inputstream, "utf-8"));
    // do some stuffwith
    final URLConnection connection = url.openConnection();
    inputstream = connection.getInputStream();
    bufferedreader = new BufferedReader(new InputStreamReader(inputstream, "utf-8"));
    // do some stuff
    connection.setDefaultUseCaches(false);the handle on the jar file is not kept after closing stream.

  • Can I change the Jar contents trough Java code ?

    It may seems a little bit wierd, but it could solve a lot of acessibility problms....
    Can I change/set the jar contents using java code ?
    My real problem: I'm creating a EDI Client and using a XML file as configuration file. It's running well but this XML is much exposed to unauthorized users....
    Can I set a value in this XML file if it is inside a jar file ??

    you can look at class JarOutputStream . You could also use class RunTime to just create a new jar with the proper files via the normal jar command.

  • Protect ROM Content

    any way to Protect ROM Content? I know I know...just about everything is cracked. But how about adding protection to a ziped folder (or anything) on the ROM layer- that requires a serial number from a list of sequential serial numbers we issue to registrants?

    Adding a protected zip archive file would work fine. Anyone could copy the file off the DVD but only those with the password could open it.

  • How to protect table content?

    Hello
    how could I protect the content of a JTable from changing by the user? Recommended is that I could click the serperated rows. This I've just implemented by using rowlistener. But how do I protect now the table content?
    thank you

    JTable ask its model ----
    public boolean isCellEditable(int rowIndex, int columnIndex){
    return false;

  • Protect Web Content in Coldfusion

    Our website is run on CF7, Windows 2000.
    We recently discovered that a clone of our site was made by a competitor using Teleport Pro. I am looking for a method, or application that will protect our content in .cfm pages.
    The robot.txt file is ignored by bad spiders, such as Teleport Pro, so this is not an option. We have considered TagsLock Pro by AeroTags; however this seems to be an application for HTML files only (tried contacting the vendor for clarification with no response as yet).
    I would greatly appreciate any pointers for methods/applications that will protect our content. Thanks in advance.

    The copyright symbol, or lack thereof, does absolutely nothing to protect your content. It is NOT necessary (Note that the fact that it is not necessary does NOT mean that it is not a good idea). Copyright is implied from the moment of creation. This post I just created is copyright by me. Your response is copyright by you.
    Basically, if YOU did not create something, or YOU did not get explicit permission to use it from the original owner, then YOU do not have the rights to use it. The concept is trivially simple.
    That being said, the copyright symbol is is a way of letting people know that YOU acknowlege YOUR copyright to the work in question.It is akin to a "Beware of Dog" sign. The sign itself is of no real strength or importance, other than to inform OTHERS that you acknowlege your copyright. It implies that you will defend that copyright in the event that it is violated.
    So, if you find that someone has copied your work, the fact that you did not have a copyright symbol is of no consequence, and, as you can imagine, it will not stop someone with the ethical nature that would allow themselves to copy someone else's work anyway.
    The formal FILING of a copyright is the device used to establish a DATE OF ORIGIN. With this formality in place, you can demonstrate that your document was created BEFORE the other party's, when there may be no other way of proving it. Again, there is no real protection in place. The only time this would come into play is AFTER you sued someone for copyright infringement.
    Another way to establish a date of origin is to print a copy of your work, put it in an envelope and MAIL IT to yourself via registered mail. When you receive it, DO NOT OPEN IT. File it away until an argument arises. The post mark on the sealed envelope will help establish a date of origin.

  • Accessing Jar contents

    Hi everyone,
    I'm sorry to ask such a dumb question, but I'm still e newbie with Java.
    Ok here goes:
    How can I access the contents of a Jar file, for example images in a package, like:
    com.mypackage.images ----> images that I need to access.
    I used the example of images for simplicity but the contents of the jar file could be anything, like database drivers, or other classes.
    Thank you in advance.
    Chris

    It's really quite easy; if your entire application is in the same jar-file it will be just as if you weren't using jars at all. To use classes in a different jar-file, that jar-file just has to be put in the classpath-variable, and all the classes inside will be accessible.
    Not sure what you meant about the images - if you were talking about a class named images, a package or actual images to be loaded. In the latter case, there are a few differences from otside of a jar-file:
    // If your images are outside the jar:
    Image img1 = Toolkit.getDefaultToolkit().getImage("nameOfImage.png");
    // If your images are inside the jar:
    Image img2 = Toolkit.getDefaultToolkit().getImage(getClass().getResource("nameOfImage.png"));

  • Protect images / content in PDF...

    Hi,
    How can I set up securities to protect copying of images / general content of a PDF? I went through the settings in Acrobat, but could not find what the name of this feature is.
    Thanks!

    OK, when you mention password security, I am wondering at what point would the file prompt for a password? Only if trying to open in an application other than Acrobat?
    When?
    Thanks. As the other person mentioned, it's probably not worth doing this seeing as it can be cracked with a little effort.

  • ITEXT protect the content from pdf

    Hi
    All
    I run this jsp it show me a pdf, but i got a problem i can edit that pdf and change the content, Is there one way to protect it ?
    How ?
    Thanks
    <%@
    page import="java.io.*,
                    com.lowagie.text.*,
                    com.lowagie.text.pdf.*,
                  java.awt.Color,
                   java.net.MalformedURLException,
                 java.net.URL,
                    com.lowagie.text.*,
                    com.lowagie.text.pdf.*,
                    java.io.FileOutputStream,
                    com.lowagie.text.pdf.PdfWriter,
                    com.lowagie.text.rtf.RtfWriter2,
                    com.lowagie.text.pdf.codec.TiffImage,
                    com.lowagie.text.pdf.codec.GifImage,
                    com.lowagie.text.Image"
    %><%               
    %><%
              // Template JSP file for iText
              // by Tal Liron
              response.setContentType( "application/pdf" );
              // step 1: creation of a document-object
              Document document = new Document();
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            PdfWriter writer = PdfWriter.getInstance( document, buffer );
             document.open();
             //Configurar saida como array buffer
             //Configurar criptografia do conteudo em 128 bits
            PdfContentByte cb = writer.getDirectContent();
            PdfContentByte cb2 = writer.getDirectContent();
           //Tipo de Fonte
            BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA_BOLD, BaseFont.CP1252, BaseFont.NOT_EMBEDDED );
            cb.stroke();
            cb.setColorFill(Color.blue);
                cb.stroke();
                cb.beginText();
                cb.setFontAndSize(bf, 12);
                cb.setColorFill(Color.darkGray);                       
                cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 140, 591, 0);
                cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 140, 577, 0);           
                cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 240, 562, 0);           
                cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 140, 548, 0);  
                cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 140, 532, 0);
                cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 140, 517, 0);
                cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text 1", 208, 502, 0);
                cb.endText();
              document.close();
              DataOutput output = new DataOutputStream( response.getOutputStream() );
              byte[] bytes = buffer.toByteArray();
              response.setContentLength(bytes.length);
              for( int i = 0; i < bytes.length; i++ ) { output.writeByte( bytes[i] ); }
    %>Edited by: silvaneto on Jun 26, 2009 8:03 AM

    Here's the Bullet.fx file
    import java.lang.Math;
    import javafx.scene.CustomNode;
    import javafx.scene.Node;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Circle;
    public class Bullet extends CustomNode {
        def GRAVITY : Number = 0.0002;
        def WALL_HARDNESS = .90;
        public var x : Number;
        public var y : Number;
        public var radius : Number = 5;
        public var color : Color = Color.RED;
        public var velocity_x : Number;
        public var velocity_y : Number;
        var offScreen: Boolean = false;
        public function collide( invader : Invader ): Boolean {
            var dx : Number = invader.x - x;
            var dy : Number = invader.y - y;
            var distance : Number = Math.sqrt( dx * dx + dy * dy );
            var minDist : Number = invader.radius + radius;
            return ( distance < minDist )
        public function move( delta_time: Number, width : Number, height : Number ): Boolean {
            velocity_y += GRAVITY * delta_time;
            y += velocity_y * delta_time;
            x += velocity_x * delta_time;
            if( x + radius > width ) {
                offScreen = true;
            } else
            if( x - radius < 0 ) {
                offScreen = true;
            if( y + radius > height ) {
                offScreen = true;
            } else
            if( y - radius < 0 ) {
                offScreen = true;
            return offScreen;
        public override function create(): Node {
            return Circle {
                centerX: bind x,
                centerY: bind y,
                radius: bind radius
                fill: bind color
    }

  • How do you protect the content in a chm?

    Hello,
    I know some users have thought of some creative techniques for preventing content from being copied from a chm, spefically Pete Lee's JavaScript methods. However, I was wondering if anyone knew how to append a copyright statement when the content is copied over?
    For example, let's say a user copies the content from the chm. When they paste the content, it adds a copyright statement to it at the bottom. Is this possible?
    Thanks in advance.

    Hi there
    I think a while back I saw Pete Lees post a script that would handle appending a Copyright.
    Keep in mind, however, that this only takes you so far. After the paste occurs, there is nothing preventing the user from simply stripping away the added information. So if you are intent on thwarting copying of material, this may not be sufficient.
    I happened across some software the other day that I'm still in the process of evaluating. This software purports to protect CHM files. Maybe you want to investigate it as well?
    Click here to visit the site
    Hopefully this helps... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Protect jar file from unzip utility

    Hi
    I have an application in .jar file and I don't want that the client
    can extract or unzip and see the contents of my .jar file.But still the .jar file
    could run by mouse double click or java -jar command.
    Anyone can give me an idea how to do it.
    Thanks...

    If java can read it on your client's machine, the client can read it. There is no way to prevent this. Here's the general cycle:
    int protectionMode = chooseProtectionMode();
    boolean haveCustomers = true;
    while (haveCustomers)
      switch (protectionMode)
        case OBFUSCATE: 
          //You can obfuscate your code to make it (marginally) harder to
          //reverse-engineer.  If your client is really interested in your
          //code, this won't keep them from figuring out what it does.
          break;
        case ENCRYPT:
          // You can encrypt most of your class files, and build a
          // decrypting classloader, and build a framework that calls
          // the decrypting classloader to get at the rest of the jar. 
          // Of course, your client can just arrange to call your
          // classloader from their own, and write the (decrypted)
          // classfiles to disk, and then reverse engineer them.
          protectionMode = OBFUSCATE;
          break;
        case STATECHECK:
          // You can put some kind of check in your decrypting classloader
          // that calls System.exit() if it discovers it's being called in
          // such an unfriendly way.  Your client will take about 10 minutes
          // to find and remove the check.
          protectionMode = ENCRYPT;
          break;
        case REMOTE:
          // You can keep your code on your server and let the client run
          // something that talks to it.  The client will complain
          // vociferously, and refuse to use your app. 
          haveCustomers = false;
          break;
        default:
          // You can decide to stop stressing over something you can't
          // help, and write code that people will buy
      }(Sorry - in an odd mood, seen this question or one like it too often recently, not enough sleep...)

  • I lost my i pad while in my tour how to protect my content in i pad

    i lost my i pad while in my tour how to protect content in i pad

    If the iPad was running iOS 7, the thief/finder will not ever be able to use it.
    iCloud: Find My iPhone Activation Lock in iOS 7
    http://support.apple.com/kb/HT5818http://support.apple.com/kb/HT5818
    Apple (and no one else) can not assist (with serial number or iCloud) in finding a lost or stolen iPad.
    Report to police along with serial number. Change all your passwords.
    These links may be helpful.
    How to Track and Report Stolen iPad
    http://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipadhttp://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipad
    Reporting a lost or stolen Apple product
    http://support.apple.com/kb/ht2526http://support.apple.com/kb/ht2526
    What to do if your iOS device is lost or stolen
    http://support.apple.com/kb/HT5668http://support.apple.com/kb/HT5668
    iCloud: Locate your device on a map
    http://support.apple.com/kb/PH2698http://support.apple.com/kb/PH2698
    iCloud: Lost Mode - Lock and Trace
    http://support.apple.com/kb/PH2700http://support.apple.com/kb/PH2700
    iCloud: Remotely Erase your device
    http://support.apple.com/kb/PH2701http://support.apple.com/kb/PH2701
    Report Stolen iPad Tips and iPad Theft Prevention
    http://www.stolen-property.com/report-stolen-ipad.phphttp://www.stolen-property.com/report-stolen-ipad.php
    General steps to follow for a Stolen iPad
    http://stolen-ipad.com/http://stolen-ipad.com/
    How to recover a lost or stolen iPad
    http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/
    How to Find a Stolen iPad
    http://www.ehow.com/how_7586429_stolen-ipad.htmlhttp://www.ehow.com/how_7586429_stolen-ipad.html
    What NOT to do if your iPhone or iPad is lost or stolen
    http://www.tomahaiku.com/what-not-to-do-if-your-iphone-or-ipad-lost-or-stolen/http://www.tomahaiku.com/what-not-to-do-if-your-iphone-or-ipad-lost-or-stolen/
    Apple Product Lost or Stolen
    http://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-sthttp://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-st Len
    Oops! iForgot My New iPad On the Plane; Now What?
    http://online.wsj.com/article/SB10001424052702303459004577362194012634000.htmlhttp://online.wsj.com/article/SB10001424052702303459004577362194012634000.html
    If you don't know your lost/stolen iPad's serial number, use the instructions below. The S/N is also on the iPad's box.
    How to Find Your iPad Serial Number
    http://www.ipadastic.com/tutorials/how-to-find-your-ipad-serial-numberhttp://www.ipadastic.com/tutorials/how-to-find-your-ipad-serial-number
    iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number
    http://support.apple.com/kb/HT4061http://support.apple.com/kb/HT4061
     Cheers, Tom

  • How do I protect cell contents in iwork 9?

    Would like to password protect calculated cells (Numbers 9) from accidental erasure.
    Tried the translucent shap locked over the calculated cells.
    Problem with this is cell can still be tabbed into.
    Protecting a cells contents a basic necessity.
    Inability to do this is glaring oversight.
    If I can't do this it looks like renewing  Microsoft Office license for my medical office and dumping iWorks.
    This too bad as I otherwise like Numbers flexibility.
    Trent

    Hi Trent,
    In Numbers, you can not lock a range of cells within a table. However, you can move (or copy) those cells to another table and lock that table. The new table can be small (just the range of cells that you want to keep separate). You can hide that table on another Sheet if you wish.
    Menu > Table > Lock
    Make sure that the locked table has no formulas that link its values back to any other table. Formulas will still update the locked table.
    Have a look at Menu > Paste Values to paste values (not formulas) into the new table before locking it.
    The Numbers User Guide is a useful read. Download it from the Help Menu in Numbers.
    Regards,
    Ian.

  • Protected Video Content Not Showing As Protected

    So is there any reason why music videos purchased through iTMS use the icon from:
    /Applications/iTunes.app/Contents/Resources/iTunes-mpeg4.icns
    (The MPEG4 icon without the lock)
    instead of:
    /Applications/iTunes.app/Contents/Resources/iTunes-mpeg4p.icns
    (The MPEG4 icon with the lock)
    and show up in Finder as:
    "MPEG-4 Video File"
    instead of:
    "MPEG-4 Video File (Protected)" like music purchased from the store "MPEG-4 Audio File (Protected)" does?
    Finder can't tell the difference between purchased content from iTMS and anything I export to "Movie to iPod (320x240)" with QuickTime Pro...

    Actually, they are. I don't know if it only works if you play the video podcasts with the iPod Touch docked, but if I let the video podcasts run all the way to the end, automatically returning me to the Videos menu, then yeah the play count goes up and when I sync those podcasts are removed from my Unwatched Podcasts playlist. Good stuff.

Maybe you are looking for

  • TS2756 I can no longer connect via USB/service missing

    ..& my iPhone does not show up on the list anymore.  I can still use Wi-Fi, though.  I would like to be able to use the USB connection again.  Resetting the network settings doesn't help.  BTW, I'm using it with my MacBook Pro running 10.7.5 and my i

  • Backgound for the xterm question.

    I use Xterm and wanted to know how to make the background color of the xterm transparent. Is there a .config file for the xterm?  If there is how do i set the background color to transparent?

  • New and replaced functionalities in ECC 6.0

    Hi all Experts, I want to know the New functionalities and replaced functionalities compared to 4.6C to ECC 6.0 in FICO Modules. I need Quick response from your side. Points will awarded.. Regards, Soma.

  • Two separate blogs; one unattached to website

    I'd like to create a separate more professional blog that is attached to my website. Additionally, I'd like to keep my more casual family oriented blog that I can share with family and close friends. We are a one computer household. Does iWeb 08 allo

  • Transfer rule activation

    Hello All, We have changed the transfer rule in test system and are trying to activate it manually using the std ABAP program. But I get an error that 'Transfer structure not generated in source system' and 'Manually activate the transfer rule'. I se