Results 1 to 9 of 9

Thread: .exe to .jar?

  1. #1
    trickboss is offline Member
    Join Date
    Jun 2011
    Posts
    4
    Rep Power
    0

    Default .exe to .jar?

    Hi!

    I'm pretty sure this is in the wrong directory, but then again, I'm completely new to Java.

    There are many ways to convert .jar to .exe, but for some reason I cannot find how to do it the other way around...

    What I'm trying to do is convert .swf to .jar. I already found a way to convert .swf to .exe but now I'm stuck...

    Thanks in advance!

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    What do you expect to be in the jar file and how do you want to use it?
    You can add ANY file to a jar file, .exe included. But then what?

  3. #3
    trickboss is offline Member
    Join Date
    Jun 2011
    Posts
    4
    Rep Power
    0

    Default

    Well, basically, I want the file to be a MIDlet so my phone (an HTC) can run it.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    No idea what a phone will run. Its possible, but not likely.

  5. #5
    trickboss is offline Member
    Join Date
    Jun 2011
    Posts
    4
    Rep Power
    0

    Default

    Well, there's a .jar file on my phone that it can perfectly run, so I thought I might as well try...

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    It all depends what is in the jar file. Any file can be placed in a jar file. What do you think would happen if you put a doc file or an html file in a jar file and put it on your phone?

  7. #7
    trickboss is offline Member
    Join Date
    Jun 2011
    Posts
    4
    Rep Power
    0

    Default

    The .jar file (which installs the MIDlet onto my phone when ran) contains a META-INF folder and a bunch of class files.

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    That sounds like what an executable jar file would contain. The JVM reads the manifest file in the META-INF folder and uses that info to call one of the classes.

  9. #9
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    6

    Cool

    OP, In case if you are interested, have a look : Using JAR Files: The Basics

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

Posting Permissions

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