BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup

Join the forum, it's quick and easy

BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup
BullyWiiHacks
Would you like to react to this message? Create an account in a few clicks or log in to continue.
BullyWiiHacks

Gaming, Modding & Programming

Important reminders:

- Click *HERE* for advanced forum search or check out the text field below on the front page for Google before posting
- NO support via private message (use the forum)
- Write meaningful topic titles
Site Translation
Latest topics
» Dropped Out of College to Pursue Web Dev and Life Pursuits in General
Converting Jar Files To Windows Executables Empty4/7/2024, 2:34 pm by SnB@BWH

» Bully Made It Into a BIG Video 400K Views
Converting Jar Files To Windows Executables Empty4/7/2024, 6:58 am by Bully@WiiPlaza

» Wii Play Tanks
Converting Jar Files To Windows Executables Empty3/24/2024, 2:46 pm by helpmeout

» [Bypass Paywalls] (Global) @magnolia1234 - GitLab
Converting Jar Files To Windows Executables Empty3/18/2024, 3:55 am by Seth@WiiPlaza

» [Download] Mary Shelley's Frankenhole
Converting Jar Files To Windows Executables Empty3/16/2024, 8:29 am by Seth@WiiPlaza

» Completely Custom Modded Controllers (Undetectable)
Converting Jar Files To Windows Executables Empty3/5/2024, 1:55 pm by Shadow@BWH

» (Zombies) Drink perks code?
Converting Jar Files To Windows Executables Empty3/5/2024, 1:24 pm by Shadow@BWH

» Die Rückkehr zu STEAM und WARFACE
Converting Jar Files To Windows Executables Empty3/2/2024, 3:54 am by Seth@WiiPlaza

» First person hand model change?
Converting Jar Files To Windows Executables Empty2/28/2024, 4:53 am by Ad3lamac611

» {RELEASE} Field Raider Firefox v1.72 by Seth@WiiPlaza
Converting Jar Files To Windows Executables Empty2/21/2024, 8:52 am by naxil

Search
 
 

Display results as :
 


Rechercher Advanced Search

April 2024
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
2930     

Calendar Calendar

Country Statistics
Free counters!

You are not connected. Please login or register

Converting Jar Files To Windows Executables

Go down  Message [Page 1 of 1]

Bully@WiiPlaza

Bully@WiiPlaza
 
 

In this tutorial I'll explain how to wrap Java .jar files into .exe files using Launch4j. This allows us to specify a .manifest file which will request administrator privileges for our application to do things like writing to the programs folder and such.

First we need a .jar file program.

Converting Jar Files To Windows Executables Jar_fi10

Next we create a new file with the extension .manifest whose name is identical to the program's name. Right-click the .manifest and open it using an editor like Notepad++. Paste the following code into it:

Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="highestAvailable"   uiAccess="False" />
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

The importance here is the 6th line where it requests the highest level of rights for the application.

Converting Jar Files To Windows Executables Manife10

Save the file and close the editor. Your directory should now look like this:

Converting Jar Files To Windows Executables Jar_an10

All preparations have been completed so we can launch Launch4j.

On the basic tab we select the .jar file by clicking on the browse (folder button). For the output file we copy and paste the file path to the jar file but change the .jar extension to .exe instead. Then we also choose our created .manifest file as Wrapper Manifest.

Before we can build the program we have to specify the minimum JRE version. Switch to the JRE tab and type 1.0.0 into the "Min JRE version" field. All the other options are optional.

Tip:
An icon image can be converted to .ico using this site.

Now you can click on the gear in the menu bar to bring up a save dialog for the configuration file. Save it in the same directory as your program. If you wish to edit your options later, the .xml file can be loaded again in Launch4j.

Once you confirmed to save the configuration file, the .exe file gets created in the same directory.

The following texts should appear in the Log field:

Code:
Compiling resources
Linking
Wrapping
Successfully created ...\My program.exe

In our project folder there are now 4 files including the .exe which will always run as administrator. You can tell by the little shield in the bottom right corner.

Converting Jar Files To Windows Executables Execut10

The remaining 3 files are no longer needed and can be deleted. The .exe is a fully standalone program which does the same as the .jar but with full rights.

Enjoy Smile


_________________
Converting Jar Files To Windows Executables YBjg74I

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum