Follow us on Twitter!
Hacking isn't just Computers & Exploits. It's a Philosophy. - Mr_Cheese
Wednesday, April 23, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 28
Guests Online: 22
Members Online: 6

Registered Members: 82885
Newest Member: ConiBE
Latest Articles

JAVA .exe files

Arrow Image 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.

Comments

kingofstrings411on November 07 2006 - 18:57:02
thank you!!!! ive been wondering how to do this....
only_samuraion November 07 2006 - 20:20:31
heh, no problem. another upside of this is that it takes its speed up to like c++ because it doesnt have to be interpreted. so it makes java much more useful than it already was.
T-Metal-Risenon November 07 2006 - 21:29:01
much less useless* , jk.. relax, wanted to see how you'd react Pfft, but a nifty little article.
only_samuraion November 07 2006 - 21:59:29
haha....thanks mate. my grammer blows a big one. lol. thanks for the comment tho. enjoy the article
h4xguyon November 07 2006 - 22:41:52
I dun get it.....
only_samuraion November 07 2006 - 23:58:07
you "dun" get what? pm me if you want more explination
ynori7on November 02 2007 - 21:15:37
I know i'm reading this like a yar late, but it was a very helpful article. although since i used a free version of JEXECreator it pops up an annoying little alert box before running the program. Any idea how to kill that without buying the program?
Macaon January 20 2008 - 00:46:48
Defeats the purpose of Java
only_samuraion February 27 2008 - 18:35:19
Yes, it does remove the portability of JAVA and removes the JVM (which does a nice job of coddling java code), but in the case that you want your app to be run-able on a box with no JRE, like a school box you cant install it on, this is useful
Post Comment

Sorry.

You must have completed the challenge Basic 1 and have 100 points or more, to be able to post.