making a exeq

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karthickRAJKUMAR
    New Member
    • Sep 2007
    • 46

    making a exeq

    how to convert the java swing inito exe
    for example[code=java]
    import javax.swing.*;

    public class KmToMiles {

    public static void main(String[] args) {

    String kmStr; // String km before conversion to double.
    double km; // Number of kilometers.
    double mi; // Number of miles.


    kmStr = JOptionPane.sho wInputDialog(nu ll, "Enter kilometers.");
    km = Double.parseDou ble(kmStr);


    mi = km * 0.621; // There are 0.621 miles in a kilometer.


    JOptionPane.sho wMessageDialog( null, km + " kilometers is "
    + mi + " miles.");
    }
    }
    [/code]
    i am tested as console aplication i mean in command prompt .how can execute without touching command prompt (without writing javac filename.java and java filename)modera tors and my friends please give the full description
    Last edited by pbmods; Nov 15 '07, 02:03 AM. Reason: Added CODE tags.
  • eeriehunk
    New Member
    • Sep 2007
    • 55

    #2
    Please read this article click me
    Reply if you have questions?
    Good Day!

    Comment

    • karthickRAJKUMAR
      New Member
      • Sep 2007
      • 46

      #3
      Originally posted by eeriehunk
      Please read this article click me
      Reply if you have questions?
      Good Day!
      java -Xmx200m -cp whatever.jar -Dsome.property MyApp
      they give like that what can i do with my class

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by karthickRAJKUMA R
        how to convert the java swing inito exe
        for example

        [ code snipped ]

        i am tested as console aplication i mean in command prompt .how can execute without touching command prompt (without writing javac filename.java and java filename)modera tors and my friends please give the full description
        You don't do that in java; you should compile your source files and bundle them
        in a executable .jar file; no need to worry: you Java installer already associated
        the .jar type with the java virtual machine. All you have to do then is click on a
        .jar's icon.

        kind regards,

        Jos

        ps. next time you want to post code please put [ code ] ... [ /code ] tags around
        the code for readability reasons.

        psps. google for "jar tutorial" and you'll know everyting you ever wanted to know
        about .jar files.

        Comment

        • karthickRAJKUMAR
          New Member
          • Sep 2007
          • 46

          #5
          Originally posted by eeriehunk
          Please read this article click me
          Reply if you have questions?
          Good Day!

          please guide me to make above program into exe .please give me code in detail plese please

          Comment

          • JosAH
            Recognized Expert MVP
            • Mar 2007
            • 11453

            #6
            Originally posted by karthickRAJKUMA R
            please guide me to make above program into exe .please give me code in detail plese please
            You did read that link didn't you and you did read the forum guidelines w.r.t.
            full code spoonfeeding solutions? (See the 'Help' link near the top right corner
            of this page).

            kind regards,

            Jos

            Comment

            • eeriehunk
              New Member
              • Sep 2007
              • 55

              #7
              Originally posted by karthickRAJKUMA R
              java -Xmx200m -cp whatever.jar -Dsome.property MyApp
              they give like that what can i do with my class
              Try the 'Executable Jars' section in the same article. Its very simple.
              Good day!

              Comment

              • karthickRAJKUMAR
                New Member
                • Sep 2007
                • 46

                #8
                Originally posted by eeriehunk
                Try the 'Executable Jars' section in the same article. Its very simple.
                Good day!
                i got the error failed to load main-class manifest attribute from my path(c:/....)

                Comment

                • r035198x
                  MVP
                  • Sep 2006
                  • 13225

                  #9
                  Originally posted by karthickRAJKUMA R
                  i got the error failed to load main-class manifest attribute from my path(c:/....)
                  And what do the tutorials say is the cause of that error?

                  Comment

                  • eeriehunk
                    New Member
                    • Sep 2007
                    • 55

                    #10
                    Originally posted by karthickRAJKUMA R
                    i got the error failed to load main-class manifest attribute from my path(c:/....)
                    Ok, try reading this, it should help create a default manifest for you. click me

                    Comment

                    • karthickRAJKUMAR
                      New Member
                      • Sep 2007
                      • 46

                      #11
                      Originally posted by eeriehunk
                      Ok, try reading this, it should help create a default manifest for you. click me
                      ok thank for ur valuable suggestion

                      Comment

                      Working...