How to make a class executable ?

1.
I'm wondering if it is possible to make a class file executable?
If yes I would like to no how can I do that.

2.
Is it possible to convert a class to native code which runs without
a java virtual machine. I ask this because this would incrase the performance of my application.

I use windows NT.

Can somebody help me?

Tybe
tybeAsked:
Who is Participating?
 
rreyeltsConnect With a Mentor Commented:
1) You cannot directly make a class file executable. There are however many products on the market which allow you to build executables from your classes. To name two, there is TowerJ and IBM's Visual for Java Enterprise Edition.

2) See the above answer. I think you'll find out, though, that generally speaking, the performance gains you get from doing this aren't very significant. You should profile your application and look for the exact performance problems for which you are suffering.
0
 
wnrossCommented:
1) Javasoft provides a stub C program that launches a Hello world class.
Minor modification of this file can create a platform dependent (read "NT Based") executable to launch your class
see:
http://java.sun.com/products/jdk/1.1/jre/example/index.html

2) As for question #2, yes, there are a number of Java to C and C++ projects on the web, j2c comes to mind (http://www.meurrens.org/ip-Links/Java/codeEngineering/j2c.html) however current development in this area has stagnated with the development of newer JIT compilers.
0
 
sgrajCommented:
There are many companies providing the tool to convert a class to exe.
Visit this site you find some free products which will help you to conversion of java class to exe.
        www.bravozulu.com
This site providing JToExe tool.
0
 
Ravindra76Commented:
Hi type,

it is previously asked question

Create the Java Application first. Then there is an utility in Tucows.com where
      u can convert the class file into
      an exe file. u can find it in the Java section of www.tucows.com.
      It will be something like Class to EXE
      converter.  
      Good Luck.

     
      JtoExe link is broken!!!


      Thank you mbormann, I found the product on the tucows site.  Thanks for the
      URL.  This is what I was looking for.  Please propose an answer so I
       can give you the points.

      I bought JtoExe and it works great!

      If anybody wants to know how to get it (since the link is broken),
       email me and I will post the info here.

      quikscor@ix.netcom.com


0
 
tybeAuthor Commented:
Thank you very much for your help !!!
0
All Courses

From novice to tech pro — start learning today.