• 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

Pplease answer me

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone please tell me whether it is possible to make a EXE file from a JAVA file. If it is possible, please tell me how.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To what I know you cannot
 
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Prosenjit,
Just thinking aloud why you need to convert the *.class file
into an *.exe. If the idea is to run it on any platform
then why would you want to convert a byte code into a
specific platform depending *.exe file. The byte is anyway
platform independent write once, run everywhere!
Ravindra Mohan.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you just want to be able to invoke a java application, normally you write a .bat file with the commands to invoke the application. Then you can have an icon that executes the bat file. or you can double click on the bat file from explorer.
 
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Keep in mind that (to my knowledge, anyway) you can't simply copy a java application onto a floppy and transport it to any machine and run it (the way you can some EXE files) unless that machine has a JRE installed.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can do it. Many of the IDE's support this directly. There are other products out there you can purchase. You should note that there is little (if any) performance improvement in creating an exe file.
 
Prosenjit Banerjee
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sirs,
Thanks to everybody who answered me. I had to post my question to get the answer.
But yet I don't have the correct answer. Mr. Thomas Paul
says that it is possible to convert a .java file to an .exe file. But it is not mentioned that how (by using which program and particularly where can I get that) is it possible.
It is a known fact that a .class file can be decompiled. So, a programmer cannot hide his valuable source code.
My only intension in not to run the code everywhere but to hide the source code. Again, it would be better if I can make the .exe file platform independent.
Please please answer me.
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would suggest that you go to http://www.google.com and do a search. That is what search engines are used for.

[This message has been edited by Thomas Paul (edited May 25, 2001).]
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or you could have done a search on JavaRanch (which is what I did) and you would have found this forum:

http://www.javaranch.com/ubb/Forum1/HTML/001312.html
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should note that other than Jove (which costs $800) all of the ClassToExe programs work by simply wrapping your class file. Anyone who is determined can still get at the class file.
 
Prosenjit Banerjee
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks again for answering me. Special thanks goes to Mr. Thomas Paul and Mr. John Zukowski (with reference to http://www.javaranch.com/ubb/Forum1/HTML/001312.html ). So, the situation is that I can make .Exe file from a .Java one by using a software like J2Exe which is nothing but a wrapper class and thus can be breakable to get the source code.
My question is, [b]is there any way to absolutely hide my source code?
reply
    Bookmark Topic Watch Topic
  • New Topic