469,352 Members | 2,140 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

java executable format without jvm

karthickRAJKUMAR
i had created the java application in swing and convert into class file and into jar finally i use the third party tool to convert inte exe,the problem was i cant able to run the exe in another system because it does n't have jre .my question was whether we able to run the program without jre

for exmple when we download the software from net and install into our system without know which language that the software was developed,how it possible why i cant?thank u
Nov 1 '07 #1
11 7306
r035198x
13,262 8TB
i had created the java application in swing and convert into class file and into jar finally i use the third party tool to convert inte exe,the problem was i cant able to run the exe in another system because it does n't have jre .my question was whether we able to run the program without jre

for exmple when we download the software from net and install into our system without know which language that the software was developed,how it possible why i cant?thank u
What third party tool did you use?
All I know is that you need to have the JRE installed for you to run jar files. Most Java programmers never need to make .exes. I don't know what your .jar to .exe convertor was doing so I can't say the .exe is not running.
Nov 1 '07 #2
What third party tool did you use?
All I know is that you need to have the JRE installed for you to run jar files. Most Java programmers never need to make .exes. I don't know what your .jar to .exe convertor was doing so I can't say the .exe is not running.
Expand|Select|Wrap|Line Numbers
  1. //Author: Syed M Hussain
  2. //Date: 07/02/06
  3. //Description: Load multiple JLabel using a loop. 
  4. //www.java.codeyourself.com
  5. //www.codeyourself.com
  6.  
  7. import javax.swing.*;
  8. import java.awt.*;
  9.  
  10. public class MultipleJLabels 
  11.  
  12. {
  13.     public static void main(String args[])
  14.     {
  15.     MultipleJLabels newMultipleJLabels = new MultipleJLabels();
  16.     newMultipleJLabels.Display();
  17.     }
  18.  
  19.     public void Display()
  20.     {
  21.     int top=0;
  22.  
  23.     JFrame frame = new JFrame("Multiple JLabels");
  24.     JPanel pane = new JPanel();
  25.     frame.getContentPane().add(pane);
  26.  
  27.     JLabel[] label = new JLabel[5];
  28.  
  29.         for (int i=0; i <=4;i++)
  30.         {
  31.         label[i] = new JLabel("JLabel: " + i);
  32.         label[i].setSize(100,20);
  33.         label[i].setLocation(0,top);
  34.         top=top+25;
  35.         pane.add(label[i]);
  36.         pane.setLayout(new BorderLayout());
  37.         }
  38.  
  39.     frame.setSize(200,200);
  40.     frame.setVisible(true);
  41.     }
  42.  
  43. }
  44.  
this my java file ,i just comile using java compiler and make to byte code,and i use to change inito am jar file,then i download the tool which use to convert jar to an exe(if click the icon the file will execute autmatically in adesktop),it run in my system but when copy te file to other system it will give the error message,my question is whether it any possibility run the file without jre.we download the software in the net without have idea of technology and run it in our system for example we download yahoomessenger and run in our system without having any knowledge of their technology
Nov 2 '07 #3
JosAH
11,448 Expert 8TB
I normally ship and deploy my Java applications using an installer: it installs my
jar(s) as well as a JRE on the target machine. The user doesn't know that her
machine contains any Java technology.

kind regards,

Jos
Nov 2 '07 #4
I normally ship and deploy my Java applications using an installer: it installs my
jar(s) as well as a JRE on the target machine. The user doesn't know that her
machine contains any Java technology.

kind regards,

Jos
u cant able to get my question
Nov 2 '07 #5
JosAH
11,448 Expert 8TB
u cant able to get my question
I beg your pardon?

Jos
Nov 2 '07 #6
I beg your pardon?

Jos
i not mean like that i cant able to convey my question sorry
Nov 2 '07 #7
JosAH
11,448 Expert 8TB
i not mean like that i cant able to convey my question sorry
I do understand you: you want to create a single executable (.exe) file out of a
bunch of .java source files. I am trying to tell you (repeatedly) that this is not the
way Java works, i.e. you create executable .jar files and install a virtual machine.

In my previous reply I mentioned that you can install that virtual machine using a
proper installer. It installs the java virtual machine together with the .jar file(s) that
contain your application code.

kind regards,

Jos
Nov 2 '07 #8
thank josh,i have assign the work to do in jasper report,which will give the report dynamically,please give some idea i am not able to find the solution yet(dynamically insence we have to sent the value in textbox using swing and should able to sent the report in pdf
Nov 5 '07 #9
thank josh,i have assign the work to do in jasper report,which will give the report dynamically,please give some idea i am not able to find the solution yet(dynamically insence we have to sent the value in textbox using swing and should able to sent the report in pdf
Nov 5 '07 #10
jez
1
Well, its not uncommon question to ask, but still unresolved. Why to install whole jre, when you made just funny applet. (anyway, Josah, what installer do you normally use?)

During my searching I found a program which functiones exactly like what I would need. See here http://www.kytara.cz/download/chords/chords12ee.zip

He copied all the needed classes(this means all imports, including implicit java.lang.*) into classes.zip and included java.exe Then the program is run by .bat which calls

java.exe -classpath cclasses.zip;chords.jar chords.ChordsAppl

so it starts the main classChordsAppl. It is awesome, it works without any jre at all and zipped it has about 1.3MB. The drawback is, that it is made in java 1.1 and I failed to remake it to java 1.6 It just wouldnt run on computer without jre.

Thanks for any comments.
Nov 5 '07 #11
JosAH
11,448 Expert 8TB
Well, its not uncommon question to ask, but still unresolved. Why to install whole jre, when you made just funny applet. (anyway, Josah, what installer do you normally use?)

During my searching I found a program which functiones exactly like what I would need. See here http://www.kytara.cz/download/chords/chords12ee.zip

He copied all the needed classes(this means all imports, including implicit java.lang.*) into classes.zip and included java.exe Then the program is run by .bat which calls

java.exe -classpath cclasses.zip;chords.jar chords.ChordsAppl

so it starts the main classChordsAppl. It is awesome, it works without any jre at all and zipped it has about 1.3MB. The drawback is, that it is made in java 1.1 and I failed to remake it to java 1.6 It just wouldnt run on computer without jre.

Thanks for any comments.
If you included java.exe you have included the entire virtual machine. btw I use
IzPack for the installation of my applications.

kind regards,

Jos
Nov 6 '07 #12

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

114 posts views Thread by Maurice LING | last post: by
8 posts views Thread by Beatrice Rutger | last post: by
2 posts views Thread by Janna | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.