qwijibow
Aug 20 2006, 07:12 PM
| |
To Answer the origonal question: "How To convert java source code into an executable (.exe)"
The Answer is simple, Compile it ! ( just like any c/c++ source code )
i dont think SUN have a native java compiler ( javac convers the source to bytecode, to be later run by an interprever ( java ))
However, native java compilers do exist.
For Example GCJ ( part of GCC, the GNU Compiler Collection )
Nativly compiling a java application has its advanatges, for example, you dont need to have JRE installed, but you lose the abbility to "compile once, run on any operating system"
good luck.
|
Comment/Reply (w/o sign-up)
FeedBacker
Feb 26 2008, 11:37 AM
how to connect an .EXE file through java environment
How To Create Exe File In Java?
Hello friends, I want to connect an EXE file of cisco software PACKET TRACER using java program, if anyone of you have an idea then please share with me. Thanks -question by vidhu jauhri
Comment/Reply (w/o sign-up)
Habble
Mar 15 2008, 09:23 PM
The way i use is a program called JSmooth dont know the website but you can just goooogle it It takes all the class files and packages them in an exe file, and when executed searches for the JVM, so you still need to have the JVM on the users computer, but it also has an option to include the JVM ( that would be a big file ) anyways check it out, might suit your needs as long as ur programs arent too big.... note: i think there is a big in there, you might have to put all ur class files in jar files and have it read them from the jar file for it to work correctly, you might even have to set up the manifest in the jar file to make it be able to execute as a jar if you want it to execute as an exe, not sure though you should test around with it I dont even know what he means by that Lol
Comment/Reply (w/o sign-up)
iGuest-Triguna
Sep 6 2008, 07:52 AM
Try Advanced Installer
How To Create Exe File In Java?
Replying to vicky99 You can try advanced installer if you still didnt get any solution. -reply by Triguna
Comment/Reply (w/o sign-up)
(G)Damian Recodkie
Jul 25 2009, 09:26 AM
I know how to write exe files in 256 byte code but I'm not share if I trust you I will show you how to write bmp pictures in java
how to write a pictur I had a hard time I did lots of reverse engineering and hacking to figure out how to write a picture in pure computer code
All a computer understands is numbers lol
Offset Size Hex Value Value Description
42 4D "BM" Magic Number (unsigned integer 66, 77)
46 00 00 00 70 Bytes Size of the BMP file
00 00 Unused Application Specific
00 00 Unused Application Specific
36 00 00 00 54 bytes The offset where the bitmap data (pixels) can be found.
28 00 00 00 40 bytes The number of bytes in the header (from this point).
02 00 00 00 2 pixels The width of the bitmap in pixels
02 00 00 00 2 pixels The height of the bitmap in pixels
01 00 1 plane Number of colour planes being used.
18 00 24 bits The number of bits/pixel.
00 00 00 00 0 BI_RGB, No compression used
10 00 00 00 16 bytes The size of the raw BMP data (after this header)
13 0B 00 00 2,835 pixels/meter The horizontal resolution of the image
13 0B 00 00 2,835 pixels/meter The vertical resolution of the image
00 00 00 00 0 colours Number of colours in the palette
00 00 00 00 0 important colours Means all colours are important
Start of Bitmap Data
00 00 FF 0 0 255 Red, Pixel (0,1)
FF FF FF 255 255 255 White, Pixel (1,1)
00 00 0 0 Padding for 4 byte alignment (Could be a value other than zero)
FF 00 00 255 0 0 Blue, Pixel (0,0)
00 FF 00 0 255 0 Green, Pixel (1,0)
00 00 0 0 Padding for 4 byte alignment (Could be a value other than zero
If you want to know more about alignment padding
Its to do with the width of your picture
Like this 5 divided 4 = 1.25 is your padding your have .25 which is 00
Now remember this .25 is 00 .5 is 0000 .75 is 000000 and if 4 goes right dead on you don't need any padding or 0's after each line of colours
A bmp is written from the bottom up left to right
The size of the raw BMP data is the Start of Bitmap Data for each set of 2 numbers it counts as 1 bite there's 16 bytes of Bitmap Data on this picture
The offset where the bitmap data (pixels) can be found. This means how many bytes from the start of the file to where you put your bitmap data
Size of the BMP file this can be calculated by every 2 sets of numbers in the file add them together and you have the picture size in bytes
A bmp is backwards in red green blue its blue green red because its how stuff is put in a computer files are mostly read backwards on computer because first number in is the last one out
28 00 00 00 is how far it has to go to get to the Bitmap Data you even include this 28 00 00 00 string as 4 bytes all the way to the Bitmap Data witch is mostly 40 bytes
Heres a sample code 424D AE000000 0000 0000 36000000 28000000 06000000 06000000 0100 1800 00000000 78000000 130B0000 130B0000 00000000 00000000 FFFF00 FFFF00 FFFF00 FF0000 FF0000 FF0000 0000 FFFF00 FFFF00 FFFF00 FF0000 FF0000 FF0000 0000 FFFF00 FFFF00 FFFF00 FF0000 FF0000 FF0000 0000 FF0000 FF0000 FF0000 FFFF00 FFFF00 FFFF00 0000 FF0000 FF0000 FF0000 FFFF00 FFFF00 FFFF00 0000 FF0000 FF0000 FF0000 FFFF00 FFFF00 FFFF00 0000
java code
import javax.Swing.*;import java.Io.*;
Public class hex
{BufferedOutputStream bufferedOutput=null;
Public hex()
{WriteFile("424DAE000000000000003600000028000000060000000600000001001800000000007800000 0130B0000130B00000000000000000000FFFF00FFFF00FFFF00FF0000FF0000FF00000000FFFF00F FFF00FFFF00FF0000FF0000FF00000000FFFF00FFFF00FFFF00FF0000FF0000FF00000000FF0000F F0000FF0000FFFF00FFFF00FFFF000000FF0000FF0000FF0000FFFF00FFFF00FFFF000000FF0000F F0000FF0000FFFF00FFFF00FFFF000000","test.Bmp");}
Public static void main(String[]args)
{new hex();}
Public void WriteFile(String hex,String f)
{hex=hex.Replace(" ","");
Try{bufferedOutput=new BufferedOutputStream(new FileOutputStream(f));
For(int loop=0;loop<=hex.Length()-1;loop=loop+2)
{int value=Integer.ParseInt(hex.Substring(loop,loop+2),16);
BufferedOutput.Write(value);}}
Catch(FileNotFoundException e)
{e.PrintStackTrace();}
Catch(IOException ex)
{ex.PrintStackTrace();}
Finally{try{if(bufferedOutput!=null)
{bufferedOutput.Flush();bufferedOutput.Close();}}catch(IOException e)
{e.PrintStackTrace();}}
JOptionPane.ShowMessageDialog(null,"Done Writeing File");}}
-reply by Damian Recodkie
Comment/Reply (w/o sign-up)
surfermac
Sep 5 2009, 01:24 PM
You have to integrate your application with a file named javaw which allows the application to be as a free independent program rather than running from the command prompt java.exe or you can make a bat file to run the program
Comment/Reply (w/o sign-up)
(G)haris
Oct 10 2009, 07:52 AM
How to create the application run on windows?
How To Create Exe File In Java?
How can I create a set of Java class files to an installation set to make others can install and run those have no jvm? Or
Can I make the software from java class files which have the rich interfaces?
-reply by haris
Comment/Reply (w/o sign-up)
surfermac
Oct 17 2009, 11:51 AM
then try to even include the jdk kit with your package so that even the java virtual machine will be present to run
Comment/Reply (w/o sign-up)
Similar Topics
Keywords : create, exe, file, java
- Java Mouse Movement.
(2)
Java Memory Leak?
(2) I have been using the picking tool with setShapeCylinderSegment (this returns infinit results but
is capped). It works just fine for me (in terms of what it does) and it wasn't until just
recently I noticed that it has been causing my program to spike the memory. I have looked through
Google to see the problem and apparently it is caused a memory leak. I have tried to solve it by
simply setting all the variables to null after they are used but this doesn't help. Is there
something I can do to or a free software I can use to find the exact variable that is causin....
Java And Sql: Data Mismatch
(6) Alright, I'm having some really funky issue with this. I know it's a mismatch (obviously)
and I want to know if the Astahost community members can help me solve this issue. It's been
annoying me a lot of late. CODE try{ libSQL myAddNewData = new libSQL(); String
strRownum =(String.valueOf(jComboBoxLName.getSelectedItem())); if (intChoice == 1){
myAddNewData.AddNewData("INSERT INTO CUSDATA (FIRSTNAME, LASTNAME, PHONE, SIN) VALUES
('"+ strUserData +"','" + strUserData + "','" + strUserData + "&....
Simple Java Question
One Variable; Multiple Classes (5) I’m probably the only person that is able to do so much with Java3D and yet still can't
even get some of the Java basics down. Anyway is it (and if so how is it) possible to make a
variable editable and readable in multiple class files? It seems like this should be an easy
question to answer, but here is a little code to help you understand what I am talking about. CODE
public class test extends Applet{ public int Col = 0; if(Col==1){ } } class
TestB extends Behavior { if(collision == true){ Col = 0; }else{ Col = 1; } } Tha....
Use Of Xml Properties File For One Key - Multiple Value Mapping
- should I use some other Class? (0) Here is a situation I have encountered. I know I can write a custom code to get the job done, but I
was wondering if the java.util.Properties class (or something else) had this inbuilt and I was
missing it in the documentation. Situation: Need to load from a file, a set of values (mutliple
values) for an associated single key. To illustrate, here is an example: propfile.properties
CODE barA1 barA2 barB1 The fooB=barB1 is a trivial case in
implementing using the Properties class. But what about the multiple case - fooA= ? Ho....
Java Java.security.accesscontrolexception
(6) I have looked all over the web for a solution and none of them seem to work. Anyway, I am trying to
load a 3d object onto a scene with a java applet and I get the following error. CODE
java.security.AccessControlException: access denied (java.io.FilePermission object.obj read) I
think that it has to do with my java.policy permissions, but I cant find anything that will fix it.
Has anyone ever seen this error and/or know a solution to it? I am looking for a solution that will
work on other people's computers without them downloading anything extra (other then ....
Setting Up Java Correctly
(11) First thing, I know the pictures say update 3, I'll update them to 4 soon... Since there's
been alot of people saying this bot doesn't work!1!1!!elevenone1!11exclamination! I'll tell
you how to set up your Java, correctly Before I say anything, if you get this problem Exception in
thread "main" java.lang.NoClassDefFoundError: mudclient press any key to continue. . . This means
you have set up your Java incorrectly, follow the tutorial properly Also if you are not an
Administrator on your computer you can't change the Enviromental Variables. If yo....
Loading 3d Models In Java?
(2) I am currently using a 3D cad software to make models. I want to know if it and how it is possible
to load 3D models using Java. I would like to make a game in java (I know I should be using OpenGL
for this, but Java seems more secure). Now I have been looking all over the web (And Amazon books)
for how to load 3D objects. I think java has loaders that convert objects into java objects but I
can't figure how to use them. I have tried using Java 3D and a bit of JOGL but I have very
little knowledge about them other then making basic things like cubes (not models). Is ....
Java Db Help Pls
(2) Now I am a compleate newbie to java. Now just from saying that I will get posts that say "read the
basics first" ect. I know the basics but the way I learn isn't just by going over basics. What I
want to do/know is if it is possible to connect to a MySQL Database using java. Is it possible and
if so how? Tutorials and links to tutorials are welcome along with maby a list of required packages
and an example code of connecting/selecting data. This is for MySQL not SQL (I don't know if
there is a major difference in java or not). I am currently using SDK1.4.2_16. I ....
Graphcal User Interfaces In Java
How do you make them? (4) Ok, right now I am currently using eclipse, however I can change to whatever if there is something
else that would be better for this. But I have made a number of java applications, but they all
simply use the command line for doing their user input and output. However, I have been interested
in learning how to program graphical user interfaces in java, and was wondering if somebody could
point me in the right direction, with some easy to understand and follow tutorials. Also, once I
have done that, what about making a java program that can be easily executed? (I know t....
Java Sdk Vs. Java Jdk?
What is the difference? (2) Ok, so previously I had installed the java SKD on my computer (the one that comes with netbeans), as
of right now it is version 1.4.2_13 and I really didn't pay much attention to the version.
Everything seemed to work ok for what I was doing, although I wasn't using netbeans, instead I
have been using eclipse. (Since I am doing this for a class at school and that is their IDE of
choice) Anyway my programs have to compile at the command line (not just work in eclipse). I have
been able to get them to work in eclipse fine, but I am having trouble when I go to the ....
Bluetooth And Java
(5) Hey all Java programmers on Astahost, I'm wondering is it possible for Java to communicate to
another computer through a Bluetooth device? The reason I ask this is because I want to create an
instant messenger that would be using the Bluetooth "network" so that people can use their computers
to communicate from one to another without the use of the Internet. This is very useful in
situations where you want to talk to a friend nearby but does not have access to the Internet and
cannot talk to them in person. Thanks, xboxrulz....
Need To Modify Xml Attribute Using Java
(7) hi, Im new to xml parsing and dont know much about. I need to modify the attribute val of a tag in
a complex xml file im using xpath query to retrieve the node but xpath is read only and cannot
modify. Im not able to use DOM as the xml is very complex and im not able to go to the exact node....
Mozilla And Java!
Step by step help needed from seniors in programming for developing a (2) Dear senior Members, I am a 18 year old boy. Just some months ago...I thought of an idea of
developing an extension for mozilla firefox...one of the most popular web browsers out in the world.
I wont disclose the complete Idea right here but the useful ness of the idea: The extensionm I
thought about can be used to significantly reduce the bandwith for high speed connections and time
for the slow connections given that the target person does use thw web for visiting mostly news
sites, forums and check mails...so all in al a busy person sittin gon a slower connection o....
How Do I Test A Java Aplication
(11) Well..can someone introduce me?(picture introduce is well)....
Java Phone Book
A console base java phone book program (5) Hello everybody I wrote this program a few months back when I wan learning JAVA.I haven't
learned java yet though because its to vast. The program is console based. It uses the util package
of java in a great way. It keeps record in a flat file. You should create a Data file called
phone.dat in same folder where phone.java is kept. So here is the code:-(phone.java) CODE
import java .io .*; import java .util .*; import java.awt.event.*; public class phone {
public void new_record() { String id,name,city,add,number,total,list;
boolean b....
Other Sound Format Support
Sound in Java (3) I know how to play a sound file in an applet and an application. I was wondering though if anyone
knows how to make Java play other sound formats such as mp3, wma, etc.. Well especially an mp3. I
know Java already supports wav, au, and aif How do you play mp3's?....
How To Configure/intergrate Jboss 4 With Java?
(1) Can someone help me?....
On Why Java Is 'c'ooler!
additions / criticisms invited (10) im basically a C++ programmer and into Java only now..and i seem to falling in love with it. here
are my thoughts on why i think Java seems cooler /wink.gif" style="vertical-align:middle"
emoid=";)" border="0" alt="wink.gif" /> i invite people to add on to the list, im sure there are
great many things i have missed out..things im yet to be enlightened in Java! 1. no more of those
wierd pointers! this pointer thing always seemed to me something gone all wrong..something that
lacked better conception. thank god i dont have to use * and & alternatively to deal with on....
Java App To Web App
(12) I have this Java Application that is already coded which interacts with a database. Is there any
way that would be easy enough to launch this application via a local intranet? It is not in any
Applet package, but I do have the JARs. Can this be done without too much effort?....
Looking For A Java IDE
(26) Hello Java people! I'm starting to work more on java this spring (university stuff) and I think
I need a proper IDE. So far my java programming has been in little scale so editor and command line
compiling has worked just fine. So I'm looking for a good, free IDE. It does not need to have
fancy features, just what you'd expect from an IDE. My previous experience on IDEs limits
pretty much to MS Visual Studio. I've also tried out Borland's builders but I've hated
them, granted they all were quite old versions. So what IDEs you use and what y....
Video Streaming In Web Browser Through Java Or Jsp
video streaming in web browser (2) Can anyone give idea about video streaming in web browser through java or jsp I need to play video
presentation in my web browser to show all members of the company.For I want to put my video file in
web server and anyone can access that video just playing on their browser our web browser is
firefox. We don’t want to use any active X properties or any default media player in web browser
. Our Platform is linux fedora core4, web server is tomcat 5 . We read the JMF java media Framework
API, but I couldn’t understand how to use this in our server for linux. There is ....
Java By Example
(8) Java was the first programming language that I learned on my own...no teachers, no friends, just me
and the internet. One of the best aspects of Java is the heavy documentation provided by Sun and
every other Java developer out there. Here is a link to a site that lists loads of examples of Java
code. http://javaalmanac.com/egs/ ? They have examples of setting up a JDBC/ODBC connection for
database use, creating ZIP files for archival purposes, and simply showing you how to use vectors.
This site is great for learning the basics and building applications on top of i....
Download Java Ebooks
Java Books (17) Download java books from below sites http://www.gayanb.com/ The eBook links you've posted
contain a bunch of illegal eBooks. Be aware that this is in direct violation of our TOS . Links
removed. ....
Need Help: Find Lowest Character Using Java
(7) Heya guys, Been a looooong time eh, yeah well i was kinda buzy with college stuff and all those
assignments just keep pouring in. I have java this semester and i have "NO" idea how to go abt it, 1
reason being that my proff. is going real fast in the explaination part and i doubt she knows
anything in java /blink.gif' border='0' style='vertical-align:middle' alt='blink.gif' /> Newayz
, i was asked to do a small program in java , heres how it goes : I need to enter a word prefixed
by the number of letters in it, and the output should show me the smallest character ....
What Are The Advantages Of Java Vs C++?
(15) what are the advantages of c++ and what are the advantages of java? what one is more userfriendly,
and what one has more capabilities?....
Array Sorting
Does anyone hava a decent JAVA method (21) does anyone have a decent JAVA method that will sort an array from smallest-to highest?
/mellow.gif" style="vertical-align:middle" emoid=":mellow:" border="0" alt="mellow.gif" /> The one
i'm trying to write doesn't seem to work... or if you could look at mine below, and tell me
what i did wrong, that'd be nice to.(if it reallllyyyyyyyyy sucks, please dont laugh to loud
/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> ) This should
take an array and then calculate how many of a number is in it, add it to the first slots....
Java Unlimited
Java,jsp,servlet,Swing,GUI Designing (14) /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> Common guys
and let have a chat over robust java! Cheers Arunkumar.H.G....
Using system date in java... How?
(7) How do u use system date in java? I only know how in jsp. In jsp, u need to do the code below to get
the sysdate String date = DateFormat.getInstance().format(new Date()); and you will be able to
get the system date which has the format 6/6/04 7:19 AM ______________________ iv tried to do this
in java import java.util.Date;public String getSysDate() { String date = "";
String date = DateFormat.getInstance().format(new Date()); return date; }
there's an error on the variable DateFormat., it cannot resolve symbol. does ....
java.lang.NullPointException
(4) hi, all, I have a question, can anybody give an answer? Thanks in advance. Why the following code
throws NullPointerException? String v =null;
System.out.println("aaaaa"+v==null?"":Integer.toString(v.length())); while the following code not?
String v =null; System.out.println("aaaaa"+(v==null?"":Integer.toString(v.length())));....
Looking for create, exe, file, java
|
See Also,
*SIMILAR VIDEOS*
Searching Video's for create, exe, file, java
|
advertisement
|
|