• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JavaToExe

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Java Fans
I need to convert Java class files to Exe. I am sure Javaranchers would help me on this.
I would also like to have some idea about Protecting a java application, so that it wont be copied to a third party system
Thanks

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello man,
here is sol. for exeutable java file.

first u have to make manifest file for ur main class like ,
u open any new text file and write this command
Main-Class: urmainclass (without class extension)
then save this one with an extension like txt or mf, but after writting this line u put enter then save.(eg my.txt)
and now go to ur dir where ur class file are there in the command
promt & write the code like
jar cmf my.txt *.class
after this u will get a executable jar file. now if u double click on this file icon it will execute.
ejoy

 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can execute a jar file. Do you really need an exe?
Do a google search on "obfuscator".
[This message has been edited by Cindy Glass (edited May 22, 2001).]
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wait a minute. I have never seen a jar file that would execute an application on a double click. I think this guy is dreaming.
Making a java exe is not nearly that easy.
You can create a ".bat" file (create a text file, type in the command line command to run your java app, save the file with a .bat exentsion, now you can double click and get some action!)
There is also a javaToExe tool out there that probably uses a C++ Wrapper or something like that.
Additionally, you can use JNI and C++ to create a C++ executable that will start your program.
Do a search on this site for java exe and you'll get a ton of informative threads.
 
Jack Benno
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi David
I have tried JavaToExe, but it executes sucessfully in Windows NT
I am not so lucky with Windows 95.
Also i need the class file to be converted to exe only, since i have a hardware lock which protects the application using a command exeprot.
the hardware vendor is not supporting NT so i have to do it with Win 95.
I have also tried JNI, created a DLL then called the Java funtion in theat DLL, still the result not what i had expected.
Can i read an .obj file in Java??
I shall try downloading Microsoft SDK for Java , there is a tool jexegen wich converts .class to .exe.
Bye
 
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
David,
the fact that you have not seen a jar execute on a double click does not mean it can't be done.
ALl you have to do is create an executable jar file like dkumar sharma describes and then assoicate "*.jar" extension with a java command.
 
David Shepherd
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I meant no ill regard. I was simply feeling a little too sparky when I was writing.
What you describe is an excellent idea. Is it deployable without having the user do any configuration?
 
Ranch Hand
Posts: 388
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
without any configuration but having the jre installed....
i heard of somebody knowing somebody having a native code compiler, creating system specific code out of class/java files.
using a obfuscator wont prevent somebody of decompiling your files but it will make them harder to understand.
another way would be to encrypt your class files and write your own class loader. then user has to supply password to run app (this does not prevent somebody from passing the app with password.......and from decompiling with the password.....but it's again a little harder to do)
karl
 
Cindy Glass
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To protect an application you need to look into obfuscators. There are LOTS of them, just do a search in google or whatever.
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
I found one tool to create setup file. this is excellent tool which will create exe file with JVM or without JVM etc., and it has facility of multiple language too. Name of the tool is JExpress, and you will have 30 days evaluation copy also. site name is www.denova.com
if you are interested you can make use of this site.
wish you a good luck.
venkat
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you have a copy of Visual j++ the is an option on the drop down menu...
reply
    Bookmark Topic Watch Topic
  • New Topic