Hi all,
I want to know how to give an .exe file for my java prg.
pla help me.

Recommended Answers

All 8 Replies

NativeJ is a program that can make an exe for your jar files for Windows users

Thanks for your prompt reply, but can you give me some code how i go about it?
give me a small java prg for adding 2 numbers and code for developing .exe.

Thanks a lot

import java.io.*;
class add
{
	public static void main(String arg[])
	{
		float c,a,b;
		try
		{	
			DataInputStream x=new DataInputStream(System.in);
			System.out.println("Enter two numbers");
			a=Float.parseFloat(x.readLine());
			b=Float.parseFloat(x.readLine());
			c=a+b;
			System.out.println("sum="+c);
		}
		catch(Exception e)
		{
		}
	}
}
commented: Read the rules about giving code before you post such shit. +0

I didn't see the dates at all. Sorry. @sarath_p_j: The OP has long gone.

what is the easiest way to make .exe in java.
i am a beginner, PL help me with full guide

Member Avatar for coil

Next time, please make a new thread. This thread is very old.

If you are absolutely sure you want an .exe, and there are many reasons not to, try some of the links above or just searching the terms yourself.

And for reference you can't make a .exe from source code you implement in java.
Only .jar and then you can use a 3rd party program to package it in .exe.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.