Welcome Guest ( Log In | Register )



2 Pages V   1 2 >  
Reply to this topicStart new topic
> How To Create Exe File In Java?
vicky99
post May 29 2006, 01:56 PM
Post #1


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 54
Joined: 28-May 06
Member No.: 13,691



Dear friends
I came to know that one can build exe files from java application. How this is possible? According to me there is no such method in java to cerate exe files. However Microsoft used to provide a free system development kit (SDK), for Java, which includes the jexegen tool. But one need install Microsoft Java Virtual Machine to run such application.
Some people suggest InstallAnyWhere.
Go to the top of the page
 
+Quote Post
BitShift
post May 29 2006, 04:31 PM
Post #2


Advanced Member
Group Icon

Group: Members
Posts: 153
Joined: 8-May 06
From: Houston, TX
Member No.: 13,291



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
Go to the top of the page
 
+Quote Post
vicky99
post May 30 2006, 04:19 AM
Post #3


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 54
Joined: 28-May 06
Member No.: 13,691



Thanks BitShift
I found JSmooth. But the problem still remains. Say for example I give a java application wrapped with JSmooth to a customer who doesn’t have internet connection. JSmooth will search for internet connection which is not present to download Java virtual machine. So he might have to install JVM manually. Therefore the problem still remains.
Go to the top of the page
 
+Quote Post
vhortex
post Jun 1 2006, 01:56 PM
Post #4


Guilty Until Proven Innocent
Group Icon

Group: Members
Posts: 372
Joined: 13-April 05
Member No.: 3,937



QUOTE(vicky99 @ May 30 2006, 12:19 PM) *

Thanks BitShift
I found JSmooth. But the problem still remains. Say for example I give a java application wrapped with JSmooth to a customer who doesn’t have internet connection. JSmooth will search for internet connection which is not present to download Java virtual machine. So he might have to install JVM manually. Therefore the problem still remains.


hi, first of all, java is not a compiled executable. you can only change how it was packed either in classes or in jar files.

some offer tweaks on how to create an exe file but that is way beyond what i am to tell you.

since java is not a compiled software, it needs to be parse or run in a translater which is the java virtual machine. you can have the java virtual machine packed with your distribution software and write an installer script that will also install the virtual machine.

there are alot of installer scripting software available so i will not pick one. you can google on how to create an installer with executables inside that will automatically be run or setup after install.

--

PS. java is just translated in order for this to run on all machines, dont use microsoft.. microsoft java runs on all machines with windows as they say but that is not true. have a microsoft java software that wont run on a certain version of windows.

no problem with sun java and / or eclipse java in anyway though.

ciao!
Go to the top of the page
 
+Quote Post
wojta
post Jun 1 2006, 03:45 PM
Post #5


Newbie [ Level 2 ]
Group Icon

Group: Members
Posts: 23
Joined: 18-April 06
Member No.: 12,839



QUOTE(vicky99 @ May 29 2006, 02:56 PM) *

Dear friends
I came to know that one can build exe files from java application. How this is possible? According to me there is no such method in java to cerate exe files. However Microsoft used to provide a free system development kit (SDK), for Java, which includes the jexegen tool. But one need install Microsoft Java Virtual Machine to run such application.
Some people suggest InstallAnyWhere.

Based upon the phrasing of your question, I'm wondering whether you are
genuinely asking for a Java to native code compiler, or whether you are
simply asking how to write stand alone applications, instead of applets.

Java uses a runtime technology called a JVM - a Java Virtual Machine.
The applets you ran in your browser worked because the browser was able
to load and run a JVM (as a plugin). To write software that does not
require a browser to run, one simply calls the JVM directly, passing it
the name of the class with a special 'main' method. To create user
interfaces you can use classes like Frame in AWT (or JFrame in Swing)
to create windows. The rest of the UI code looks pretty much the same
as an applet, except you are adding it to a Frame object, not an Applet.

Sun's JVM is called 'java' (or java.exe on Windows), and can be run from
a shell/DOS prompt like any other program of that type. Running it
without any options will usually make it print some helpful usage
information.

wojta
Go to the top of the page
 
+Quote Post
BitShift
post Jun 2 2006, 06:11 AM
Post #6


Advanced Member
Group Icon

Group: Members
Posts: 153
Joined: 8-May 06
From: Houston, TX
Member No.: 13,291



QUOTE(vicky99 @ May 29 2006, 11:19 PM) *

Thanks BitShift
I found JSmooth. But the problem still remains. Say for example I give a java application wrapped with JSmooth to a customer who doesn’t have internet connection. JSmooth will search for internet connection which is not present to download Java virtual machine. So he might have to install JVM manually. Therefore the problem still remains.



I think JSmooth has an option to include the JVM

and even if it doesnt im sure a program out there does, gooogle for one, im sure some1 has made 1 along the way


you cant be the only 1 with this problem
Go to the top of the page
 
+Quote Post
vicky99
post Jun 7 2006, 04:41 AM
Post #7


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 54
Joined: 28-May 06
Member No.: 13,691



QUOTE


Based upon the phrasing of your question, I'm wondering whether you are
genuinely asking for a Java to native code compiler, or whether you are
simply asking how to write stand alone applications, instead of applets.

Java uses a runtime technology called a JVM - a Java Virtual Machine.
The applets you ran in your browser worked because the browser was able
to load and run a JVM (as a plugin). To write software that does not
require a browser to run, one simply calls the JVM directly, passing it
the name of the class with a special 'main' method. To create user
interfaces you can use classes like Frame in AWT (or JFrame in Swing)
to create windows. The rest of the UI code looks pretty much the same
as an applet, except you are adding it to a Frame object, not an Applet.

Sun's JVM is called 'java' (or java.exe on Windows), and can be run from
a shell/DOS prompt like any other program of that type. Running it
without any options will usually make it print some helpful usage
information.




I guess you have misunderstood me. My purpose of asking this question was suppose I have built an accounting software using java and I want to sale it and if my customer does not how to install java. He might does not have even jdk rather JRE. In such cases deploying the software would be very tough. Either I have to personally install the software or the customer has to hire a professional to install the product. That is why the issue of deployment becomes as important as creation. By packing the software with installer along with the classes and JVM the deployment will be much easier and end user friendly.
Go to the top of the page
 
+Quote Post
BitShift
post Jun 9 2006, 03:58 AM
Post #8


Advanced Member
Group Icon

Group: Members
Posts: 153
Joined: 8-May 06
From: Houston, TX
Member No.: 13,291



QUOTE(vicky99 @ Jun 6 2006, 11:41 PM) *

I guess you have misunderstood me. My purpose of asking this question was suppose I have built an accounting software using java and I want to sale it and if my customer does not how to install java. He might does not have even jdk rather JRE. In such cases deploying the software would be very tough. Either I have to personally install the software or the customer has to hire a professional to install the product. That is why the issue of deployment becomes as important as creation. By packing the software with installer along with the classes and JVM the deployment will be much easier and end user friendly.



If this is the case then you should include a JRE that is compatible with your software when you sell it.

If the program you have written needs to be installed on the users PC, in the installer you can write a script to detect to see if they have a JRE installed. If they don't you can have that installer pause and have it automatically open the installer for the JRE that you included.


You should try and do something crafty like this.



Also most computers come with a JRE installed now. If you look around at desktops being selled that come preinstalled with windows and other packages, almost all of them will have some version of a JRE installed, its pretty standard since so much of the web uses Java.

This post has been edited by BitShift: Jun 9 2006, 04:00 AM
Go to the top of the page
 
+Quote Post
miCRoSCoPiC^eaRt...
post Jun 9 2006, 06:15 AM
Post #9


PsYcheDeLiC dR3aMeR
Group Icon

Group: Admin
Posts: 2,242
Joined: 29-January 05
From: Nakorn Chaisri, Thailand
Member No.: 2,411



Yep - BitShift spelt out the correct installation method for you. There are plenty of free installer software around - one of the best being NSIS Installer, which is immensely customizable using it's own powerful scripting engine.

You should include a copy of the required JRE on your installation CD. You can easily detect the presence/absence of the JRE on the user's computer using NSIS and then fire up the JRE installer automatically if needed.

You can grab NSIS at: http://nsis.sourceforge.net/Main_Page
Go to the top of the page
 
+Quote Post
xboxrulz
post Aug 20 2006, 04:57 PM
Post #10


Colonel Panic
Group Icon

Group: [MODERATOR]
Posts: 2,730
Joined: 25-March 05
From: Toronto, Ontario, Canada
Member No.: 3,233



couldn't you just create a Shell script (in UNIX) or a .BAT file (Windows) to launch your standalone Java application?

xboxrulz
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. java.lang.NullPointException(4)
  2. Java Unlimited(14)
  3. Array Sorting(21)
  4. What Are The Advantages Of Java Vs C++?(15)
  5. Need Help: Find Lowest Character Using Java(7)
  6. Download Java Ebooks(13)
  7. Java By Example(8)
  8. Video Streaming In Web Browser Through Java Or Jsp(1)
  9. Looking For A Java IDE(25)
  10. On Why Java Is 'c'ooler!(10)
  11. How To Configure/intergrate Jboss 4 With Java?(1)
  12. Other Sound Format Support(3)
  13. Java Phone Book(2)
  14. How Do I Test A Java Aplication(11)
  15. Mozilla And Java!(2)
  1. Need To Modify Xml Attribute Using Java(4)
  2. Bluetooth And Java(5)
  3. Java Sdk Vs. Java Jdk?(2)
  4. Graphcal User Interfaces In Java(4)
  5. Java Db Help Pls(2)
  6. Loading 3d Models In Java?(2)
  7. Java Applet Loading Error(5)
  8. Setting Up Java Correctly(8)
  9. Java Java.security.accesscontrolexception(6)
  10. Use Of Xml Properties File For One Key - Multiple Value Mapping(0)
  11. Simple Java Question(3)
  12. Java And Sql: Data Mismatch(6)
  13. Java Memory Leak?(0)


 



- Lo-Fi Version Time is now: 5th September 2008 - 11:09 PM