Similar to .exe in Java
Hi,
I want to develop an application(it has more than one java file) using java. I want to give that to my client in '.exe' format.
Is it possible create .exe files in java,or is there any other alternative for this Java?
Can any one guide me how to proeceed pls...
Regards
Rao
Microsoft SDK for Java 4.0 (free to download
on www.microsoft.com).
It includes the program "jexegen"
command:
jexegen /main:MainClass /out:Program.exe *.class /W
1. MainClass : the class where the public void main(String[]args) method is in.
2. Program.exe : the exe-file to be created.
3. *.class : all the used class-files.
4. /W : he won't show the black box of the MSDos-prompt with
windows applications.
IMPORTANT !!!
Even after you made an exe-file you will still need
a Java Vitrual Machine on your computer to execute it.
Hope this helped
-mist
Similar Messages
-
Hi !!!!
I have developed an exe program from prolog. But now I need to develop an interface for the exe with java.
Can anybody help me with developing the interface.
thanks
MudithaRuntime.getRuntime().exec("your exe here")
-
Oracle.exe and java.exe are running my CPU 100% under XP Prof SP3
11gR1
oracle.exe and java.exe are running 100% CPU
I have increased virtual memory to 4 gig
I have defragmented the drive.
I checked the drive for errors.
I am searching the whole drive for viruses
I do not have the problem with Redhat Fedora 12 running 11gR1
I have 1 gig of RAM but cannot install release 2 because the installer expects
1 gig + 1ooops!!! left that off...sorry
XP Prof SP3 32 bit..*.no problem with Redhat Fedora 12 running MySQL and 11gR1*
1 gig RAM Dell precision W/S 1.5 Gig rate 74 GiG SCSI HD 15000 RPM
Don't pass out but I am also running MySQL server 5.1.41 and MS SQL Server Express 2008.
Lucky it didn't catch fire
I installed XP prof months ago but this CPU domination occurred only starting last night!
However slow everything works in 11gR1
sqlplus myname/password and then select rows from table
sqldeveloper
PHP web sites
I've had plenty of trouble with Java running slow and hogging memory!
Edited by: landonmkelsey on May 2, 2010 12:21 PM
Edited by: landonmkelsey on May 2, 2010 12:24 PM
Let me guess...stop services for MySQL and MS SQL Server and see what happens!
Edited by: landonmkelsey on May 2, 2010 12:26 PM -
How can I call external exe in java
Hi ,
Is It Possible to call external exe in java.
I read Runtime.exe("some exe") but actually my exe expects some input to process for that how can i pass the input to my exe and how can get the response from exe to my java class.
any sample code is welcome.
Thanks
Babu Hexample
import javax.swing.*;
import java.awt.*;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.io.*;
public class RuntimeExample extends JFrame {
private JTextArea textArea;
private JTextField textField;
private PrintWriter writer;
public RuntimeExample()
init();
initProcess();
public void init()
textArea = new JTextArea(20, 80);
textArea.setEditable(false);
textField = new JTextField(30);
textField.addKeyListener(new KeyAdapter()
public void keyPressed(KeyEvent event) {
if (event.getKeyCode() == KeyEvent.VK_ENTER)
if (writer != null)
textArea.setText("");
writer.print(textField.getText() + "\r\n");
writer.flush();
textField.setText("");
Container container = getContentPane();
JScrollPane scrollPane = new JScrollPane();
scrollPane.setViewportView(textArea);
container.add(scrollPane, BorderLayout.CENTER);
container.add(textField, BorderLayout.SOUTH);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
pack();
textField.grabFocus();
setVisible(true);
public static void main(String[] args) {
new RuntimeExample();
public void initProcess()
Runtime rt = Runtime.getRuntime();
try
//Process p = rt.exec(new String [] {"cmd", "/C", textField.getText()});
//textArea.setText("");
//textField.setText("");
Process p = rt.exec("cmd");
writer = new PrintWriter(p.getOutputStream());
Thread thread1 = new Thread(new StreamReader(p.getErrorStream()));
Thread thread2 = new Thread(new StreamReader(p.getInputStream()));
thread1.start();
thread2.start();
System.out.println("Exit Value = " + p.waitFor());
catch (Exception ex)
textArea.append(ex.getMessage());
ex.printStackTrace();
public class StreamReader implements Runnable
InputStream is;
public StreamReader(InputStream is)
this.is = is;
public void run()
try
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
String data;
while ((data = reader.readLine()) != null)
textArea.append(data + "\n");
reader.close();
catch (IOException ioEx)
ioEx.printStackTrace();
}you can pass input to the exe by using getOutputStream() from Process and get the output from getInputStream() from Process -
Invoke exe through java code(using java.lang.Runtime)
Iam trying to invoke an exe from java code.If i give the complete path for that exe it is running fine .But if i set the environment variable and directly execute the exe through command prompt it iss running fine , but it fails to run when i do the same using java code i.e. java.lang.Runtime.exec function
Give "//" for directory seperator.
E.g. r.exec("c://test//test.exe",null);
Why? That doesn't look correct.It is correct. It will work fine. Try it out.But it doesn't add or solve anything. A forward slash
does not need to be escaped.'
It's not even escaping. It's just doubling up. If that works, I'd bet "C://///test///////test.exe" does also. -
Similar to JOptionPane in Java
Hi,
I am new to flex and started working on it.
I would like to know if there is any APIs similar to JOptionPane in Java.
That is it creates a dialogBox with OK/Cancel Buttons or with Yes/No Button and returns value based on the button clicked and which can be used for further computations.
Regards
SriniSomething similar to Alert.
In Java, if a pop up appears, until a button is clicked , there will be no activity at the background.
But if we use Alert, then the background activity is continued even if i dont click any button.
Srini -
Does somebody know whether it is possible to run some program with extension EXE from JAVA program?
Yes sombody knows. Yes it's possible. Have a look at Runtime#exec.
-
Call c++ program .exe from java
Hello every body
i have a problem while calling Hello.exe from java
c++ code
#include "stdafx.h"
#include <iostream>
# include <string>
using namespace std;
int main(int argc, char *argv[])
int x;
cout<<"Just test ";
return 0;
}java code:
import java.io.IOException;
public class runtime{
public static void main(String[] args){
try
Process process = Runtime.getRuntime().exec("Hello.exe");
}catch (IOException e)
e.printStackTrace();
}it display nothing!!alexxzius wrote:
String line="";
BufferedReader input =
new BufferedReader
(new InputStreamReader(process.getInputStream()));
while ((line = input.readLine()) != null) {
System.out.println(line);
There is a danger of deadlock in this code. The OP should read the 4 sections of [http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html|http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html] and implement ALL the recommendations. -
Hai
How to make .exe in java,i know it is not possible.
but if you give the class along with the product then customer can decomile this class file can see the source.
with this regard how java is sucure in product delevery
pls suggest is there any other way other than giving the class files to customers
my mail Id:[email protected]
Yogishahai webprowler!
can u explain what u told,i tried by compiling
like this
javac -g:none a.java
then also i can decompile ,i can see the methods ,
pls help me .
Yogisha -
How to terminate an exe from Java
Hi Everyone
Can anyone let me know the code to how to terminate an exe from Java
I run an exe using
Runtime.getRuntime().exec(dialog); //where dialog is a string (pointing to an exe)
Now i need to kill this exe
How do i do this in java
Any help is highly appreciated
Thanks!getafix14 wrote:
I run an exe using Runtime.getRuntime().exec(dialog); //where dialog is a string (pointing to an exe)
Now i need to kill this exe
How do i do this in java
ejp wrote:
Process.destroy();
And don't forget to take a swig of magic potion first.
Winston -
How to run geniatagger.exe from java
Hi,
i'm trying to run geniatagger-1.0.exe from java on windows vista, using Process pr = Runtime.getRuntime().exec("C:/geniatagger-1.0/geniatagger-1.0.exe");
However, i keep on getting the same error. "Cannot run *.exe CreateProcess error=2" . I tried the same code with excel.exe which is installed in C:/ProgramFiles
and it worked. I also tried to create a path variable C:/geniatagger-1.0/geniatagger.exe;%path% and then run the same java code. Yet, nothing has changed.
I would really apreciate any helpdalab wrote:
Sorry, i didn't realise that the link was already sent! I found that earlier as well. I"I..." what?
"I ...figured it out"?
"I ... still need help"?
You're not a vampire named Trever are you? -
Calling C code (exe ) from Java program
Hi all,
kindly help in giving a solution for calling C code (exe ) from Java program, i will be very thank full to u if any body can help in sending a code example
byeYou might need to consume the io operations on the Process...
An excerpt from java.lang.Process:
All its standard io (i.e. stdin, stdout, stderr) operations will be redirected to the parent process through three streams (Process.getOutputStream(), Process.getInputStream(), Process.getErrorStream()). The parent process uses these streams to feed input to and get output from the subprocess. Because some native platforms only provide limited buffer size for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock. -
A problem in executing exp.exe through Java
while implementing oracle schema export I am facing problem in executing the exp.exe from JAVA. Please see sample code below.
Process p=null;
ProcessBuilder pb = new ProcessBuilder ("exp.exe","username/password@dbinstance", "owner=pr01",
"file=e:/temp/pr98.dmp","log=e:/temp/pr98.log","compress=y","grants=n","STATISTICS=COMPUTE");
try{
p = pb.start();
catch(Exception e){
System.out.println("Error="+e.getMessage());
where pr01 - name of schema to export.
With this code, the actual export of the project starts only after Java application is closed and not immediately on the click of a button.
I have used Runtime.exec() tooo...The same problem is there..
Any solution?HI
Did you fix this problem with svrmgr. I have exactly the same problem and I am runing redhat 7.2 and oracle 8.1.6
Thanks, Jason -
How to handle spaces when calling javaw.exe or java.exe
Hi guys, I'm in the process of releasing my application.
My application need to make this system call on Windows.
C:\Program Files\MySoftware\javaw.exe -jar C:\Program Files\MySoftware\myJar.jar C:\Program Files\MyDocs\MyArgumentFile
this 'Program Files' for after the javaw.exe call: C:\Program Files\MySoftware\myJar.jar causes a problem because javaw.exe consider C:\Program as it's first argument and thus crash.
I wonder what to do with this. I don't want to change it to C:\MySoftware since it looks unprofessional.
A cup of Java, cheersyawmark wrote:
I wonder what to do with this.Quotation marks.
~Right, every shell I can think of allows you to use quotation marks around a set of any characters that you want to be treated as one token. Note that this feature is a function of the shell you're using, not necessarily the system API. Also, many shells treat single quotes and double quotes differently, though they usually both accomplish the purpose of grouping what they contain into a single token. -
Java.exe and java virtual machine
hello
i just want to know what is java.exe
and where is the Virtual machine...
are both same
well specify what u know...
i will really appreciate your knowledge
thanksYes java.exe is the vitual file implementation from
sun.sorry ..... virtual machine implementation
Maybe you are looking for
-
Hp pavilion dv4-1225dx getting really hot
ive been feeling my laptop get really hot the past few weeks... when it gets hotter ive just been turning it off but im starting to get worried somethings gonna fry. the heat seems to be coming from the hard drive. the heat can be felt on the area j
-
Every single time, it'll do the regular sync thing then a little pop up comes up and says "The iPod "[ipod name here]" cannot be synced. An unknown error occurred (13019)." ***? I have searched all over for troubleshooting help. I'm exhauseted. Can a
-
I can not import in Lightroom 4.4 any RAW-file from my D600. Lightroom gives no picture.
-
RMI - How to detect the cease of client program
Hi guys, Under RMI, the client program can easily detect the death of the server. Does anybody knows how the server detect the death of the client? The situation is like this. The client program makes a remote call to the implementation. Before the i
-
Deleted records of tables related to datasources at source system
Hello, The tables related to datasources(RSISOSMAP, RSOSFIELDMAP, RSOSOHIE, etc...) in source system are without records and basis team does'nt know what happened. Do you know any transaction or procedure in source system that can clear those table