How to ban extracting from .jar file?

Hello
Problem of .jar file is: .class files can be extracted (with winrar ...) and decompiled. I don't want my classes to be decompiled. But I still need my jar executable of course.
Is some solution which bans extraction without any impact on executability?
Thank you very much.
Tony

Is some solution which bans extraction without any
impact on executability?Hmmmm you could not put any class files in your jar. That would eliminate the extraction problem. Probably would be detrimental to execution.
What do you think happens when your app runs? It just magically knows about your classes without extracting them?
Not so much no.
Use an obfuscator.
Or if that's not good enough use another language or just panic.

Similar Messages

  • Please help: Example how to peploy application from jar file step by step

    Please help: Example how to peploy application from jar file step by step.
    All help appreciated
    Mike

    Thanks I will try these links
    Mike
    "Slava Imeshev" <[email protected]> wrote:
    Hi Mike,
    These links could be useful:
    http://e-docs.bea.com/wls/docs61////adminguide/appman.html
    http://e-docs.bea.com/wls/docs61////quickstart/quick_start.html
    http://e-docs.bea.com/wls/docs61//////ConsoleHelp/application.html
    http://e-docs.bea.com/wls/docs61///programming/environment.html
    Regards,
    Slava Imeshev
    "Mike" <[email protected]> wrote in message
    news:3ca0e94c$[email protected]..
    Please help: Example how to peploy application from jar file step bystep.
    All help appreciated
    Mike

  • How to get resources from jar-files

    Hi
    in my app I load an image via the Toolkit.getImage() method.
    Works fine if the app and the image are in folders on disk.
    It fails to load the image, if the app (and the image) is packed in a jar file.
    How can I get the image from there?
    I try to get the image as follows:
    String s = getClass().getResource("MyApp.class").getFile();
    AppPath = s.substring(0,s.lastIndexOf("/"));
    String PathToImages = "/images";
    MyImage = (Image)Toolkit.getDefaultToolkit().getImage(AppPath+PathToImages+"/logo32.gif");The App starts and works, it just fails to load the images.
    Any solutions??
    thanx in advance
    Herby

    This is actually pretty easy. First a little background.
    A Jar file is just a Zip file, with a few constructs for Java.
    The getResource() method is used to create a mapping to data within the Jar file, but is actually not necessary after you know how the mapping works.
    Just to give you an example of getResource:
    // returned is a url to the resource you want from your Jar file.
    URL myURL = MyClass.class.getResource("images/myimgage.gif");
    // then you can use this URL to load the resource
    Image img = getImage(myURL);If you were you look at the value of myURL you would see something similar to the followiing.
    jar:http://www.mywebsite.com/mydir/myjarfile.jar!/images/myimage.gifJust to break it down for you.
    The line always starts with the word jar:
    Followed by the path to your jar file.
    A sepearator !/
    Then the file you are loading from the Jar file.
    jar:     path_to_jar_file     !/     path_to_resource_in_jar_fileSo if you'd like, you could just create a URL object, and define the path to the object using the above method rather than using getResource.
    Anyway, back to your code. What I would do is print out what you get for:AppPath+PathToImages+"/logo32.gif"I'm thinking you might be getting 2 "/" in your path because I think:AppPath = s.substring(0,s.lastIndexOf("/"));will leave the "/" at the end and the next line you add the "/" in front of the image directory name. So you my have the following for your image path.mypath//images

  • How to load class from jar file dynamically?

    After I run my Java applicatoin, I need configuring the classpath of jvm to load some classess inside a jar file into the same jvm.How can I achive that?
    I mean, when I run my Java application, I don't know where the jar file is, what the jar file name is. All depends on the user to tell the jvm the details through some UI. I've tried to write: System.setProperty("java.class.path", "c:\myClass.jar");Class.forName("MyClass"); but failed.
    Can you tell my why and how?
    Thx

    After I run my Java applicatoin, I need configuring
    the classpath of jvm to load some classess inside a
    jar file into the same jvm.How can I achive that?
    I mean, when I run my Java application, I don't know
    where the jar file is, what the jar file name is. All
    depends on the user to tell the jvm the details
    through some UI. I've tried to write:
    System.setProperty("java.class.path",
    "c:\myClass.jar");Class.forName("MyClass"); but
    failed.That won't work. By the time it gets to your code it already has a copy of the original. You can't change it (short of modifying the JVM.)
    Can you tell my why and how?The usual way is to use a custom classloader.
    You can start by looking at java.net.URLClassLoader.

  • How to extract html file and folder from jar file

    Hi all ,
    I should to submit my project tomorrow . plz help me .
    In my project jar file I have html page that should run when I use the program, I can't extract it . Also it have folder that contain some files that My program should use it . I dont know how to use it from jar file or how to extract it . plz help me.
    If you could I need java could for that.
    Thanks alot.

    Hi all ,
    I should to submit my project tomorrow . plz help me .
    In my project jar file I have html page that should run when I use the program, I can't extract it . Also it have folder that contain some files that My program should use it . I dont know how to use it from jar file or how to extract it . plz help me.
    If you could I need java could for that.
    Thanks alot.

  • How to extract ZIP/JAR files?

    Hello,
    How can I extract zip/jar files ?
    Eric

    If you are talking java, you can use the java.util.zip classes.
    ZipFile, ZipEntry, ZipInputStream, ZipOutputStream
    You can find lots of examples through google:
    http://www.google.com/search?hl=en&q=java+zip+code+example&meta=Cheers,
    evnafets

  • Applet : How to use Images in Jar file

    I want to put all images into a jar file to improve speed of loading.
    But how to invoke images from Jar file?
    Thanks.

    @Op. It's very important for a developer to know how to find information, and that skill usually comes with experience. Google is one of the best ways to find information and solutions to the most common problems.
    Kaj

  • How do I extract an audio file from a PDF in Pro? (Mac)

    How do I extract an audio file from a PDF in Pro? (Mac) . Properties say it's a .m4a file.
    Thanks

    Hi Tim,
    That isn't a supported feature. If the PDF is unsecured and you have the legal rights to extract the audio, it would be possible to locate and decompress the raw file data from the PDF file using third-party tools to read the low-level file structure (a hex editor or Cos editor) - but Acrobat can't help you.
    Regards,
    Rave

  • How do I display Canvas Graphic image (Not Iconic button) from jar file

    Hi all,
    I am currently using Forms 10g.
    I have gone through the tutorials on how to add Button Icons into Jar files for web enables forms .....so far so good
    This however does not explain what I actually want to do... since "graphic images are by nature embeded in the for rather than referenced ......so here goes ..
    I have a forms 10g application where all the individual form modules/canvases display a big banner (covering top 20% of the screen). This was done by importing the image straight unto the content canvases. As you know this now becomes a "graphic Image" now embeded(& not referenced by file name) on the canvas. Also bear in mind that this is actually different from an "Image Item" which is a block object.
    I dont know if this is possible, but what steps do i follow to make the image part of a jar file as opposed to my current situation. Please let me know if possible or not so I stop waisting development time looking for answers :)
    Another question is how do i make this jar file a library object so that we can vary the image as we wish
    NB: one other trick which i can think of is to create a giant push button across the screen to display the image and then stick it in a jar file !
    Cheers
    css_jay99

    I don't know about embedded images imported in from the builder, but there is a way to use READ_IMAGE_FILE into a BLOCK.IMAGE_ITEM where the images are all in a jar file stored on the OAS.
    Metalink Note:137397.1 explains it in details.
    Tony

  • How do I extract my music files from a evternal hard drive and put them on my itunes?

    how do I extract my music files from a evternal hard drive and put them on my itunes?

    If you used the Finder to move the files, iMovie will have lost track of them. iMovie holds the locations of the Event files, and Project files contain references to those locations. If you move the files, iMovie has no way of knowing where they are.
    If you can, first move all the files back to their original locations. Plug in the external drive. Open iMovie and move the files in iMovie's interface (help explains how, but basically, just drag and drop in the event pane).
    Then you can connect the drive to the new computer, and iMovie will see them.

  • Easy way to extract a jar file?

    I'm looking for an easy way to extract a jar file from with in a java program. I would also like to specify what directory it goes into. I can't seem to find anything on this.

    >
    ...I can't seem to find anything on this.>Where were you looking, under the bed and in the closet? Try [search: extract jar Java|http://lmgtfy.com/?q=extract+jar+Java].
    As to specifying a directory, offer the end user a JFileChooser set to browse directories only.

  • How can i run a jar file as EXE on mouse click..

    *{color:#0000ff}how can i run a jar file as EXE on mouse click..is it possible in any way?????????{color}*

    amrit_j2ee wrote:
    *{color:#0000ff}how can i run a jar file as EXE on mouse click..is it possible in any way?????????{color}*Do you mean converting it from a jar file to an EXE file or do you mean that you would like to run the application by just double clicking it?
    If it's the latter then you need to make the jar file including a manifest.
    The manifest can be just a txt file with its content to be something like this:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.1
    Created-By: Somebody
    Main-Class: NameOfTheMainClass
    Class-Path:
    X-COMMENT: Main-Class will be added automatically by buildTo make the jar file including the manifest, use something like this in your command prompt (of course you must have compiled your java file(s) first):
    jar cfm test.jar MANIFEST.txt NameOfTheMainClass.classAfter that you'd be able to run your application just by double clicking it.
    If you're a NetBeans user, you can build your standalone application by right-clicking your project and then going to properties => run => and choosing a Main class. After that right click on that project and "Clean and Build", locate the jar file in the "dist" folder and double click it =]
    Hope it helps,
    LD

  • How do i extract Delimited falt file-Sender File adapter FCC Parameters

    Hello,
    I'm trying to extract data from a flat file. The file is built as tab delimited. I cant find the option of tab delimited in the XI Sender File adapter FCC Parameters. How do i extract tab delimited file?
    Please Advice,
    Rajesh

    HI,
    You can use Fieldseperator as '0X09'...
    Look at this blog...........you can solve this problem...
    NAB the TAB (File Adapter)                              
    Thanks,
    Madhu
    Edited by: Madhu sudhan Reddy on Jul 28, 2008 9:02 AM

  • How do you convert a jar file into a java file,  ?

    how do you convert a jar file into a java file ?
    I am new to Java ,but have a little experience in C++ and Visual Basic.
    I want to edit and maybe create my own mobile games that are written or converted into jar files.
    At the moment I am using Java NetBeans , and Easy Java( the java pad).
    However the only solution I tried was to open the JAR file in winrar and see that its made up of png picture files,
    midi music files and class files. Unfortunately when I uncompressed the JAR file , there was NO java file to be seen and the JAVA editors Do not show the class file like a Java file. So why is there no extension Java file in the mobile JAR game ?

    801283 wrote:
    how do you convert a jar file into a java file ?You generally don't. There exist decompilers, but if you're meant to have the source, you should either have it because you are the author, or you should be able to get it from the author.
    I am new to Java ,but have a little experience in C++ and Visual Basic.Does that experience include turning .exe files into C++ code? Because that's the equivalent of what you're asking
    I want to edit and maybe create my own mobile games that are written or converted into jar files.Eh?
    Are you saying you want to take existing games and modify them? If the creators allow you to modify their source, then they'll provide you with that source (the .java files). If you're allowed to add things but not modify, you don't need .java files. Just documentation, which, again, the creators should be providing.
    Or are you saying you want to create your own games and distribute them in jar files? If so, there's no need to turn jars into .java.
    However the only solution I tried was to open the JAR file in winrar and see that its made up of png picture files,
    midi music files and class files. Unfortunately when I uncompressed the JAR file , there was NO java file to be seen and the JAVA editors Do not show the class file like a Java file. So why is there no extension Java file in the mobile JAR game ?Why would you expect there to be one?

  • Extract nested Jar File

    Okay, I've been looking all day for solutions to this problem and nothing I've found pinpointed the solution, so if anyone would rather point me to another site, that's great.
    I have a .jar installer ( installer.jar ) that contains the installer code and a nested jar file ( program.jar ).
    In my experience, plain text files work great in the "getInputStream() -> FileWriter.write()" method, but my way of handling images requires javax.imageio.ImageIO, and i'm hoping something similar exists for jars.
    ALL+* i want to do is extract that jar file into the current directory, but the ZipEntry.getInputStream() method didn't work, and JarInputStream just confuses me.
    If anyone has links to other topics or source code to point to how a jarfile can be extracted.

    Thanks for the help.
    After looking around and finally noticing the Pack200 package, I have the answer!
    JarFile jf = new JarFile( "outside.jar" );
    JarOutputStream jos = new JarOutputStream( new FileOutputStream( new File( "inside.jar" ) ) );
    Pack200.newUnpacker().unpack( jar.getInputStream( jar.getEntry( "inside.jar" ) ), jos );
    jos.close();This creates a JarOutputStream that will write to the FileOutputStream forever until closed.
    The Pack200 Unpacker takes the inputstream and outputs it to the JarOutputStream.
    When the unpack method returns, the jar file is ready. Close the jar output stream and you have a workable jar!

Maybe you are looking for

  • Need to restore but do not have a restore point or recovery partition.

    Hi guys. I have an HP Notebook 2000-365DX with Windows 7 Home Premium.   Its so cluttered and I need to restore back to original settings.  I had installed Ubuntu (partitioned)  a while back and was very stupid because I deleted my HP Tools recovery

  • Audit Vault Download

    Hi experts, I'm interesting in Oracle Audit Vault and going to prepare a test environment. I have an Oracle 10.2.0.3 Database running on HP Itanium platform and want to be install a Audit Vault server on Windows. However, I got problem of implement A

  • Error while creating carrier ticket

    Error comes while creating ticket for Sale of product to a third-party shipper at the origin location Plant and storage location for movement destination missing

  • Real Player on Safari and Firefox

    Hello all, I couldn't use Safari or Firefox to listen on Amazon website, Real Player audio samples. On Safari, the webpage goes to an empty page. Firefox, tells me that there are a missing file. I'm using Real Player 10.1.0 Universal Binary. Does any

  • Using Forms that don't set the content type charset

    The Servlet API 2.3 has a new method, request.setCharacterEncoding(), to           deal with the fact that almost no browsers set the content type. When I call           this method passing "Shift_JIS" using weblogic 6.1, it works fine when the