×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    7

    [J2ME] content of .jar

    Hello and welcome = ),

    I would like to search the jar file to get a file which is called well not in the same way, but very similarly to searched phrase, for example

    phrase: "java is cool, but slightly irritating"
    and file "java slightly cool.txt"

    is there any way to do this?

    Code solutions are acceptable = D

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: [J2ME] content of .jar

    Inside your MIDlet's code?
    I don't think that's possible as getResourceAsStream requires a complete name
    http://library.forum.nokia.com/topic...va.lang.String)

    Of course, if you have the MIDlet on your PC you can see the contents easily (as the JAR file is a renamed Zip file).

    Hartti

  3. #3
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: [J2ME] content of .jar

    There is no way to get a list of files in the JAR...

    ...well, unless you put a file in the JAR, which contains a list of the other files in the JAR. You could automate this, something like:

    Code:
    "%java_home%\bin\jar" tf myapp.jar > file.lst
    "%java_home%\bin\jar" uf myapp.jar file.lst
    Or, some other way, according to your build process.

    Then, your problem is how to define "not in the same way, but very similarly to"...

    Graham.

Similar Threads

  1. [ask] j2me cannot create jar
    By acids in forum Mobile Java General
    Replies: 4
    Last Post: 2009-12-11, 06:45
  2. Making DRM content with jar and jad file
    By ilanchezhiank in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2007-08-06, 06:45
  3. i want to secure my jar file content...
    By albertjohn in forum Mobile Java General
    Replies: 2
    Last Post: 2003-11-22, 08:24
  4. How to call a sub.jar from inside a main.jar in J2ME
    By s1459193 in forum Mobile Java General
    Replies: 1
    Last Post: 2003-08-15, 13:09
  5. Missing Midlet in jar Content
    By nmostafa in forum Mobile Java General
    Replies: 1
    Last Post: 2002-06-26, 18:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×