I need to create executable file (*.exe) in VC++ environment.
Then, I need to use and call java functions from this excutable file . Does neone know how this is possible. JNI is not an answer for this cuz it creates a dll file and not a executable file. Someone has suggested that its possible through corba. Does anyone know how to do it?
if possible can neone send me a sample code??

To do this you need a C++ CORBA IDL compiler and a Java IDL compiler. You create an IDL file for the methods that you want to be accessible between the C++ process and the Java process and you compile it with the IDL-to-C++ compiler on the C++ side and the IDL-to-Java compiler on the Java side.

You then implement the methods/functions exposed by the IDL interface in C++ according to the instructions provided by your CORBA provider. You create implementations of your objects (called servants, which reside in your C++ executable process) and register them with a retrieval mechanism, e.g. the Naming Service.You then call them through your Java client according to the instructions provided by your Java CORBA provider.

You should find sample code to do this in the programmers' references for the ORB implementations that you plan to use. You will find these on vendors websites - as a starter for ten check out Iona's and Visibroker's sites.