Making .exe in java
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]
Yogisha
hai 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
Similar Messages
-
I have a java file that contains password to log to embaded system using secure copy. So i do not wann to show that password to any one.
So can i make exe of it or any other way to hide the password.
i do not want to use jar or war because it can be easily brokenI have a java file that contains password to log to
embaded system using secure copy. So i do not wann to
show that password to any one.a native executable won't help that
So can i make exe of it or any other way to hide the
password.what makes you think an executable will do this?
i do not want to use jar or war because it can be
easily brokenjust as easily as an executable. and you can't choose between a jar and a war, you have to use whichever is appropriate for your deployment. if you are developing a web-app, how on earth is your container going to load a windows executable? and this isn't a JSP question, in any way shape or form -
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. -
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. -
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 -
Making .exe for a java file
Hello all, i'm much interested in making
a java file to be in .exe form without using any
IDE's available for JAVA .
Is it possible for us to make the .exe form of a
java file to be executed in a machine
which has only JRE AND JVM.Hi Jayandh,
Please see these forum threads. It will give you some idea.
http://forum.java.sun.com/thread.jsp?forum=17&thread=150203
http://forum.java.sun.com/thread.jsp?forum=31&thread=149733
I hope this will help you.
Thanks
Bakrudeen -
how can i compile java code into Windows executable program (exe) so I do not to use SDK every time i run my program?
Here's a good post about creating exe's, even if it was persian_dude who asked about it a week ago :P
http://forum.java.sun.com/thread.jsp?forum=31&thread=256821 -
Making '.exe' file/application using JAVA
Hi,
Is it possible to make an application(an exe file) using just Java, just as we in VB.If yes can you please give some idea how can we do that.
Thanks.....To make a java application run from a click on an icon
you must create a Jar file as I've explained below:
Create a separate folder and place all the source code programs needed to run the application in it. You just need the ones with the .class extension. You don't need the ones with the .java extension.
Open up 'Notepad' and type in this line:
Main-Class: your class that has the main method
You don't need the .class extension.
ex. If your main method is in a program called HelloWorld.class
type in :
Main-Class: HelloWorld
Make sure you hit the RETURN key at the end of the line. I forgot to do that which is why I spent four hours trying to get this to work!
Save this as: manifest.mf
and put in the same folder as above. Make sure it doesn't save as manifest.mf.txt
Open MS-DOS.
CD change to the directory and folder you are in.
Type this in exactly as I have written:
jar cvfm0 myprogram.jar manifest.mf *.class
This should put a Jar file in your folder. Just click on it and it should work.
Make sure the program doesn't need to take input from a command line, like DOS.
Otherwise it will do nothing. As long as your program creates a frame, window, button or something, it should work.
To run the Jar file from DOS(for testing purposes) type:
java -jar myprogram.jar
If you get an error stating that it can't find the main method class(like mine did), right click on the 'myprogram.jar' file that was created,
click on properties, then ZipMagic.
Open the 'manifest.mf' file and make sure
that 'Main-Class: yourprogramname' is in there.
If you followed these directions you should be able to create an executable java file.
Below I've explained what the commands to create the Jar file mean.
jar: means you are creating a java archive file which acts like a ZIP file
c: means create a new jar file
v: means verbose which tells DOS to show the action it is doing
f: means that the files to choose are going to be typed in by a user(you at the Dos prompt)
m: means to use the manifest file that you specify
0: means that the file won't be compressed
To make a JAR file you only need the cfm letters.
Maybe you are looking for
-
Problem Using The Scroll Wheel In Itunes 7.4.3.1
I cannot use the scroll wheel since I installed this version of iTunes on Vista. Has anyone experience this problem and did you find a solution?
-
No respond on my Win7 64bit ver. after install Adobe Reader
HI, I've installed adobe reader X recently. For the 1st time I tried to open a PDF file, below message pop up:-- I want to select "Accept" but I am not able to kick any button ("Accept", "Reject", "Print", "Save") inside the pop up message. I want to
-
Authority Check in Queries (SQ01 / SQ02)
Hi Friends. When I run a query (sq01 / sq02) , E.G. that contain the table MARC, the user can select all the plants, but he only must have access to plant "1000". In their roles / profiles, the basis only set authorisation to plant "1000". I can resc
-
Mail Profiles Being Deleted After Office 2010 to 2013 Deployment
I am deploying Outlook 2013 to user in our environment that has Outlook 2010 presently. Many users have additional attached mailboxes to their Outlook profile. After the deployment the default profile for Outlook in the Mail control panel is removed.
-
How to use ODI sequences ??
I have an interface which need an ODI sequence. When I execute it the value of the sequence is always the same. I have seen on another thread that it may pass by an agent but... I have 2 tables (source and target) from the same connexion which don't