Never in the field of human conflict was so much owed by so many to so few. - Winston Churchill
Wednesday, August 20, 2008
Navigation
Donate
Has this website helped you?
px
If so, please donate a little to help out with hosting costs.
Members Online
Total Online: 42
Web Spiders: 6
Guests Online: 24
Members Online: 18

Registered Members: 34366
Newest Member: boyxunghe
Most Users online: 523
Latest Articles

JAVA .exe files


advertisement



website security Too long have .jar been the way for java programmers. Now, a true .exe file for us. And here\'s how.

For those of us who learned JAVA in schools or on our own, there's always been the

major problem of: the .class file.

The nice folks at Sun gave us the .jar, but still, it requires the JRE and JVM (Java Runtime

Engine and Java Virtual Machine) on the computer where this .jar file will be run.

The solution to this is third party programs. Programs like: EXE4J and JEXECreator.

These are what is called a JIT(Just in time) compilers.

This tutorial will be fore JEXECreator since that is the one I have, tho I have heard the

EXE4J works just fine.

So...go off and download JEXECreator, its got a free demo that needs a serial...;)

Install, open...and lets go:
First, you need to start yourself a new project, name it whatever you desire.

Make sure that under the active project pulldown menu, that is the project.

okay, so select the "Output" tab. And fill in the 3 pieces of info this needs. The most

important is the GUI/Console radio button. For those of you wondering which, if your code

works like nmap or JTR and is only black and white "Command Prompt" style text, pick

console...otherwise, GUI is for you.

Now, "Java Settings." The "main class" should be just as it sounds...the class with your

"main method"...
public static void main(String args[])
... in it. JVM arguments asks for anything that is passed in via the console to the args[]. If

you have nothing there, set eliminate to true. Minimal Version asks for what JRE you

want. The current version out is 1.5. Some of us still use the old 1.4. What does this

change? Well, pretty much thats in the code you write. Newer versions have extra

features (more libraries, its somewhat dumbed down, no offense). The reason for this

implementation into your .exe is so that if the JRE is not on the computer, it will know

which version to go find.

Alright, now "classpath." This is where you put the code into the program. If you've got

yourself a nice little .jar file, add JAR into EXE, otherwise add the classpath and direct

that to the folder with your .class files. Only have the ones that pertain to this program in

that folder.

Don't bother with "Search Settings."

"Custom Resources" is where you add the fluff to this .exe. Title, Icon. The download URL

is for those people who don't have JRE. Unless your running your own version of JAVA

don't change the first URL. The second can be redirected to your site for help, service, or

FAQS.

The "Message Bundles" are for handling error and other messages. Don't really mess with

this unless you have reason. They are fine the way they are.

Now, click build. Then run. Check your output location. And ...your done.
Now this builds you a .exe file, which is nice, it still need to be packed with the .class

files tho. It will run on most computers, I think they need the same amount of java

installed as your inet needs. If you find differently pm me and I'll make an edit. I've found

that it works on on any computer.



Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 


By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2007- 2008. Since 3rd December 2004.