Java School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a Java Expert!

Join 300,322 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 2,007 people online right now. Registration is fast and FREE... Join Now!




Create EXE from java class

 

Create EXE from java class, development of java code to .exe

bellobichi2

8 Jan, 2009 - 04:55 AM
Post #1

New D.I.C Head
*

Joined: 30 Dec, 2008
Posts: 5


My Contributions
I am using JCreator as my java IDE, please how cant develop my java code to .exe
Tell me tha IDE that will do this work to me.
example of code
CODE

/**
* @(#)label.java
*
* label application
*
* @author
* @version 1.00 2008/12/30
*/


     /**
* @(#)label.java
*
* label application
*
* @author
* @version 1.00 2008/12/30
*/

import java.awt.*;
  import java.awt.event.*;
  import javax.swing.*;
public class label {
    
    public static void main(String[] args) {
        
   JFrame frame = new mainframe();
         frame.show();
    
    }
}
     class mainframe extends JFrame{
         mainframe(){
             setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             setTitle("LABEL");
             setLocation(25,25);
             setSize(400,500);
             setBackground(Color.green);
             getContentPane().add(new tempPanel());
               
        
         
             
         }
     }
     class tempPanel extends JPanel implements ActionListener {
         JLabel d;
         JLabel c;
         JTextField f;
         JButton boton;

        JLabel l1;
         tempPanel(){
        
             d = new JLabel("enter farentheiht tempurature");
             f = new JTextField(5);
             c = new JLabel();
             
        l1 = new JLabel("               ");

        boton = new JButton("boot");
        setLayout(new BorderLayout());

        add(d,BorderLayout.WEST);
    add(f,BorderLayout.EAST);
         addİ;
    add(l1);
        
         add(boton,BorderLayout.SOUTH);
        
        boton.addActionListener(this);
         }
            public void actionPerformed(ActionEvent event ){
             double fn = Double.parseDouble(f.getText());
             double cn = (5*(fn - 32))/9;
             f.setText("");
             c.setText("the tic" + cn);
         
         }
        
                    
         
          
         
     }


User is offlineProfile CardPM
+Quote Post


ayman_mastermind

RE: Create EXE From Java Class

8 Jan, 2009 - 05:10 AM
Post #2

human.setType("geek");
Group Icon

Joined: 12 Dec, 2008
Posts: 1,807



Thanked: 92 times
Dream Kudos: 525
My Contributions
If you want to make an .exe out of your java program then you should use a class to exe or jar to exe program.JCreator does not create .exe files, you can create jar files. After having your java class(or jar file) compiled and ready download a jar to exe converter for example http://www.ej-technologies.com/products/exe4j/overview.html which is a very good one by the way, and then you can convert your class file or your generated jar file to a .exe file easily smile.gif , hope this helps , good luck wink2.gif
User is offlineProfile CardPM
+Quote Post

Jayman

RE: Create EXE From Java Class

8 Jan, 2009 - 08:40 AM
Post #3

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 8,543



Thanked: 226 times
Dream Kudos: 500
Expert In: Everything

My Contributions
Renamed title to be more descriptive of the problem.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 02:39PM

Live Java Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month