Convert .class to .exe
Results 1 to 10 of 10

Thread: Convert .class to .exe

  1. #1
    Banned
    Join Date
    Aug 2003
    Posts
    130

    Convert .class to .exe

    Anyone know of a freeware prog. that will convert class files to exe's?

  2. #2

  3. #3
    Junior Member
    Join Date
    Feb 2003
    Posts
    20
    you could use NativeJ developed by C-tech software. Im using the trial version and it only runs on win32. Theres a version that could run on *nix but i dont know where.
    \"SpeAk YouRSelF\"

  4. #4
    Banned
    Join Date
    Aug 2003
    Posts
    130
    NativeJ is a trial and wont generate the exe. Plus u have to compress the class files into a jar file which sux.

    Also i know what google does if anyone doesnt go to google before they come here that person is an idiot.

    No trials

    But thanx anyways

  5. #5

    What's this then?

    Wait.. it's possible to convert a .class into an executable exe? End users wouldn't have to run the Java command line to get something started (assuming you wanted to deliver a stand-alone, non-web based program)?

    Drop some science. Please.

  6. #6
    Senior Member
    Join Date
    Feb 2002
    Posts
    1,210
    alright.. lemme try again.. (and i didn't mean to degrade you about searching google.

    I took that first link I gave you and from within that found about that java forum.

    so I searched that >http://search.java.sun.com/search/ja...xe%22&x=13&y=8

    and found these two threads :
    http://forum.java.sun.com/thread.jsp...7&thread=70471
    http://forum.java.sun.com/thread.jsp...=1&thread=1572

    and although there were more threads to invesitgate.. in that last one,
    I found this > http://www.excelsior-usa.com/jet.html

    it'll give you a fully functional 60-days Evaluation Package .
    http://www.excelsior-usa.com/jetdleval.html


    and I would read those other threads as there are other free methods.
    for example :
    There's a free compiler (High Performance Compiler for Java) available for download from
    IBM's AlphaWorks site. The platforms support are AIX, OS/2, Windows NT/95/98. Check it out
    at http://www.alphaWorks.ibm.com/

    or this

    Just create a manifest file and add it while creating jar file

    let us consider you have compiled java code(.class file) which
    has main method in it(i,e it is the main class file where your
    execution starts)

    1. create a manifest file(or any file)

    example:c:\edit Manifest.mf
    add this line to this file
    Main-Class: Your_Main_CLASS_NAME (space required after : )

    just the above line says to JVM where to start execution
    2. create a JAR file.

    c:\jar cmfv0 Manifest.mf myjar.jar all_your_class_files

    this creates a jar file which is executable file
    double clicking this file will make it run. If you want it on
    your desktop create shortcut or directly place it

  7. #7
    Member
    Join Date
    Aug 2003
    Posts
    42
    I don't know of a method for actually changing a .class file into a .exe file, but if you don't mind some programming you can use the Java Native Interface(JNI) librarys to invoke a JVM through C, or some other language that compiles into native code.

    This site here http://www-106.ibm.com/developerwork...xe/jniexe.html will give the code which you will have to hack to suit your needs. The examples are all in C

    The site also shows some easy cheap ways to run your java program from a executable

  8. #8
    AntiOnline Senior Member souleman's Avatar
    Join Date
    Oct 2001
    Location
    Flint, MI
    Posts
    2,884
    doesn't making an exe file kind of defeat the purpose of using java in the first place?
    but if you really must....
    get EXE for Java
    http://www.hal-9000.net/pher/dani/kase/readme.htm
    \"Ignorance is bliss....
    but only for your enemy\"
    -- souleman

  9. #9
    Junior Member
    Join Date
    Feb 2003
    Posts
    20
    Originally posted here by mikem0327
    NativeJ is a trial and wont generate the exe. Plus u have to compress the class files into a jar file which sux.

    Also i know what google does if anyone doesnt go to google before they come here that person is an idiot.

    No trials

    But thanx anyways
    NativeJ is a Java EXE maker.
    The trial version of NativeJ is fully functional, except that the executables generated will display a short trial message on startup.
    \"SpeAk YouRSelF\"

  10. #10
    Ehh.. if portability is your main reason for using Java, sure, it defeats the purpose, but don't forget that some perfer the Java API and some characteristics (like automated garbage collection) over C/C++.

    Otherwise, it sounds like a boon for those using Win32 systems who'd like to distribute their software w/o having the JVM installed on all users' computers. For example, in a private network situation with limited resources..

    l00p

Posting Permissions

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