File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Win32 exe wrappers for .jar or .class files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Win32 exe wrappers for .jar or .class files" Watch "Win32 exe wrappers for .jar or .class files" New topic

Win32 exe wrappers for .jar or .class files

Ranch Hand

Joined: May 28, 2002
Posts: 95
i'm trying to implement a program that wraps an executable .jar file or a number of .class files, as an Win32 PE exe file. Some commercial versions of software already do this: NativeJ, exe4J, etc... I'm not tryin to COMPILE into exe's just wrap .jar's as exe's
I'm wonderin, what exactly do i need to know to accomplish this. I'm reading now about JNI, read about Win32 PE file structures and headers. The idea i came with, is to like ship a tiny exe with my application, that i kind of like 'inject' a .jar file in it, and have the tiny exe call the JVM on the enclosed jar at runtime. The 'injected' exe would then be the application.
if anyone has any ideas on how to go about doing this, please fill me in.
John Lee
Ranch Hand

Joined: Aug 05, 2001
Posts: 2545
please refer to:
java application as a service;
Installation of JDK 1.2 for Visual Cafe;
October 2002 Java News
Joel McNary

Joined: Aug 20, 2001
Posts: 1824

Would a Batch file suit your needs? It seems to me that that is all that you are requiring

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
I agree. Here's the link:
subject: Win32 exe wrappers for .jar or .class files
It's not a secret anymore!