Conversion of class file to exe file


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 11 of 11

Thread: Conversion of class file to exe file

  1. #1
    arunprasad ks Guest

    Conversion of class file to exe file


    hai,
    my question is how class file in java will be converted to exe file as in
    vb?

  2. #2
    kamlesh patel Guest

    Re: Conversion of class file to exe file


    "arunprasad ks" <arunprasad_ks@england.com> wrote:
    >
    >hai,
    >my question is how class file in java will be converted to exe file as in
    >vb?


    hi arun,
    1st thing.. don't compare java with vb.. it hurts...
    .class file cannot be convered to .exe file as .class files are nothing but
    bytecode files and they can be run on any operationg system implementing
    JVM (Java Virtual Machine)
    this makes java write once run anywhere.

    bye
    kamlesh patel

  3. #3
    Paul Clapham Guest

    Re: Conversion of class file to exe file

    Yes, VB can create an .EXE file, but to distribute it to another computer
    you have to send the Visual Basic support .DLL file with it -- 1.3 megabytes
    in size for VB5. When you take that into consideration, having to send a
    JRE to support a Java class file isn't quite so bad.

    kamlesh patel <kamlesh13@hotmail.com> wrote in message
    news:39c04938$1@news.devx.com...
    >
    > "arunprasad ks" <arunprasad_ks@england.com> wrote:
    > >
    > >hai,
    > >my question is how class file in java will be converted to exe file as in
    > >vb?

    >
    > hi arun,
    > 1st thing.. don't compare java with vb.. it hurts...
    > class file cannot be convered to .exe file as .class files are nothing but
    > bytecode files and they can be run on any operationg system implementing
    > JVM (Java Virtual Machine)
    > this makes java write once run anywhere.
    >
    > bye
    > kamlesh patel




  4. #4
    pete Guest

    Re: Conversion of class file to exe file


    Certain IDEs can create .EXE files. Visual Cafe 3 Professional can do this.
    The actual .EXE is small, but you need at least one 2.5 meg dll file when
    distibuting. I think that IBM's Visual Age can as well.

  5. #5
    Mark Ashworth Guest

    Re: Conversion of class file to exe file


    Good Day,

    I don't think arun is comparing Java to VB in the technical sense but rather
    that he would like to run a Java Application so that appears outside of the
    browser (like an app). It would be nice to know the steps to achieve this.

    Java is superior to VB (duh), but that was not the question.

    Regards,
    Mark Ashworth

    "Paul Clapham" <pclapham@core-mark.com> wrote:
    >Yes, VB can create an .EXE file, but to distribute it to another computer
    >you have to send the Visual Basic support .DLL file with it -- 1.3 megabytes
    >in size for VB5. When you take that into consideration, having to send

    a
    >JRE to support a Java class file isn't quite so bad.
    >
    >kamlesh patel <kamlesh13@hotmail.com> wrote in message
    >news:39c04938$1@news.devx.com...
    >>
    >> "arunprasad ks" <arunprasad_ks@england.com> wrote:
    >> >
    >> >hai,
    >> >my question is how class file in java will be converted to exe file as

    in
    >> >vb?

    >>
    >> hi arun,
    >> 1st thing.. don't compare java with vb.. it hurts...
    >> class file cannot be convered to .exe file as .class files are nothing

    but
    >> bytecode files and they can be run on any operationg system implementing
    >> JVM (Java Virtual Machine)
    >> this makes java write once run anywhere.
    >>
    >> bye
    >> kamlesh patel

    >
    >



  6. #6
    andy Guest

    Re: Conversion of class file to exe file


    Visual J++ is great for making .EXEs as well as COM DLLs in Java, but hurry
    while you can still get it!

    By the way, for those of you with cloudy heads, don't believe the "write
    once, run anywhere" hoopla crapola. It doesn't work as smoothly as they'd
    like you to believe. I think Java is an OK language, but it's not magic...
    I keep my options open and I haven't sold my soul to Sun or become an evangelist
    as some of you people have.

    And to say that it hurts to compare VB to Java... PU-LEASE. Java is just
    another programming language, so get that JVM out of your *** and DEAL WITH
    IT!


    "kamlesh patel" <kamlesh13@hotmail.com> wrote:
    >
    >"arunprasad ks" <arunprasad_ks@england.com> wrote:
    >>
    >>hai,
    >>my question is how class file in java will be converted to exe file as

    in
    >>vb?

    >
    >hi arun,
    >1st thing.. don't compare java with vb.. it hurts...
    >.class file cannot be convered to .exe file as .class files are nothing

    but
    >bytecode files and they can be run on any operationg system implementing
    >JVM (Java Virtual Machine)
    >this makes java write once run anywhere.
    >
    >bye
    >kamlesh patel



  7. #7
    Mohan Atreya Guest

    Re: Conversion of class file to exe file


    Hi:

    There are some utilities available in the market such as TowerJ (http://www.towerj.com)
    which perform a procedure called as POST-COMPILATION of the bytecode to a
    TARGET PLATFORM.

    This makes sense if you want to do your development in Java but want to DEPLOY
    only on a SPECIFIC PLATFORM (Run Anywhere means nothing in this case!). This
    case is frequently seen when you develop custom server side applications
    (i.e. not compliant with J2EE!)

    I believe TowerJ can target your Java code to many platforms such as Win32,
    Solaris, Linux, HP-UX etc.

    Hope this helps

    cheers
    Mohan Atreya

    "andy" <andy@zr1.com> wrote:
    >
    >Visual J++ is great for making .EXEs as well as COM DLLs in Java, but hurry
    >while you can still get it!
    >
    >By the way, for those of you with cloudy heads, don't believe the "write
    >once, run anywhere" hoopla crapola. It doesn't work as smoothly as they'd
    >like you to believe. I think Java is an OK language, but it's not magic...
    >I keep my options open and I haven't sold my soul to Sun or become an evangelist
    >as some of you people have.
    >
    >And to say that it hurts to compare VB to Java... PU-LEASE. Java is just
    >another programming language, so get that JVM out of your *** and DEAL WITH
    >IT!
    >
    >
    >"kamlesh patel" <kamlesh13@hotmail.com> wrote:
    >>
    >>"arunprasad ks" <arunprasad_ks@england.com> wrote:
    >>>
    >>>hai,
    >>>my question is how class file in java will be converted to exe file as

    >in
    >>>vb?

    >>
    >>hi arun,
    >>1st thing.. don't compare java with vb.. it hurts...
    >>.class file cannot be convered to .exe file as .class files are nothing

    >but
    >>bytecode files and they can be run on any operationg system implementing
    >>JVM (Java Virtual Machine)
    >>this makes java write once run anywhere.
    >>
    >>bye
    >>kamlesh patel

    >



  8. #8
    R.K.Sivakumar Guest

    Re: Conversion of class file to exe file


    "arunprasad ks" <arunprasad_ks@england.com> wrote:
    >
    >hai,
    >my question is how class file in java will be converted to exe file as in
    >vb?


    Dear Arun,
    It is not possible to convert class file to exe. To run exe
    file v should have corresponding dll file. To run the class file v should
    have jvm.




  9. #9
    John B Guest

    Re: Conversion of class file to exe file


    >Dear Arun,
    > It is not possible to convert class file to exe. To run exe
    >file v should have corresponding dll file. To run the class file v should
    >have jvm.
    >
    >
    >


    It's interesting in this day and age of technological advancement and innovation
    that anyone can take a stand that includes the word "CAN'T". (I've noticed
    you can do almost anything if you just look at it long enough)

    You CAN convert a class file to a .exe using come IDE's, as mentioned in
    a previous reply to this question, I do it often with Visual Cafe. There
    are also some other third party tools out there that will convert a class
    to an os specific binary. Try searching for Java Converters on Yahoo.

    Hope this helps.



  10. #10
    Dang Guest

    Re: Conversion of class file to exe file


    This isn't a conversion, but it provides a simple "EXE" wrapper.
    Compile it and then copy the EXE to the EXE name you want.
    For example, if your "application" is called "mycalc", copy this EXE to "mycalc.exe".
    When the user runs it, it internally generates the Java execution command
    line and launches a child process then exits.
    I've had some problems with parameter passing that I've been unable
    to track down. For the most part it works.
    Note--your user still needs the JRE or JDK and any other Java-related
    components required for your application.
    Have a nice day!
    --dang
    --- begin cut here ---
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <process.h>

    main(int argc, char** argv) {
    int li_rc ;
    int i;
    char *prog = "java";
    char *args[104];

    // put your classpath here
    args[1] = "-cp";
    args[2] = "c:/u/dangutil.jar";

    for (i = 0; i <= argc ; ++i) {
    args[3 + i] = argv[i];
    }
    li_rc = _spawnvp(_P_WAIT, prog, args);
    if (li_rc < 0) { // all's well
    printf("Failed to execute: code=%d\n", errno);
    return 1;
    }
    return 0;
    }
    --- end cut here --
    "arunprasad ks" <arunprasad_ks@england.com> wrote:
    >
    >hai,
    >my question is how class file in java will be converted to exe file as in
    >vb?



  11. #11
    John Chaves Guest

    Re: Conversion of class file to exe file


    I'm relieved to know that are still sane people in this techie world! Andy,
    I couldn't put it in any better way!
    I've been a VB programmer for years, doing Java for the last 2 and although
    I agree that Java IS a better language, after a few real world experiences
    with the 'cross-platform' crap I can safely say that Java has a loooong way
    to go.
    God, I miss Visual Studio....


    JC

    "andy" <andy@zr1.com> wrote:
    >
    >Visual J++ is great for making .EXEs as well as COM DLLs in Java, but hurry
    >while you can still get it!
    >
    >By the way, for those of you with cloudy heads, don't believe the "write
    >once, run anywhere" hoopla crapola. It doesn't work as smoothly as they'd
    >like you to believe. I think Java is an OK language, but it's not magic...
    >I keep my options open and I haven't sold my soul to Sun or become an evangelist
    >as some of you people have.
    >
    >And to say that it hurts to compare VB to Java... PU-LEASE. Java is just
    >another programming language, so get that JVM out of your *** and DEAL WITH
    >IT!
    >
    >
    >"kamlesh patel" <kamlesh13@hotmail.com> wrote:
    >>
    >>"arunprasad ks" <arunprasad_ks@england.com> wrote:
    >>>
    >>>hai,
    >>>my question is how class file in java will be converted to exe file as

    >in
    >>>vb?

    >>
    >>hi arun,
    >>1st thing.. don't compare java with vb.. it hurts...
    >>.class file cannot be convered to .exe file as .class files are nothing

    >but
    >>bytecode files and they can be run on any operationg system implementing
    >>JVM (Java Virtual Machine)
    >>this makes java write once run anywhere.
    >>
    >>bye
    >>kamlesh patel

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center