C# and Java

G

geeshan_kumarasena

Hi,
I need to read the system registry to enable a button of the GUI when
it starts.the button is enable only if the .NEt is installed in the
system. that's why I need to read the registry.
And I when run CSC in command prompt it gives me this.
"'csc' is not recognized as an internal or external command,
operable program or batch file."
so what should I do.
How I get the exact path of the Csc compiler
or else can I compile a C# file straight away through my Java Program.
Please let me know if you have a sample coding.
Geeshan
 
R

Roedy Green

I need to read the system registry to enable a button of the GUI when
it starts.the button is enable only if the .NEt is installed in the
system. that's why I need to read the registry.
And I when run CSC in command prompt it gives me this.
"'csc' is not recognized as an internal or external command,
operable program or batch file."
so what should I do.
How I get the exact path of the Csc compiler
or else can I compile a C# file straight away through my Java Program.
Please let me know if you have a sample coding.

you could read the registry with JNI. See
http://mindprod.com/jgloss/jin.html
and http://mindprod.com/jgloss/registry.html

You could put csc.exe on the path.

You could pass the full path of csc to java as a command line parm or
system parameter or in the set environment.

You could look for some smaller utility to give you this information
you could exec. See http://mindprod.com/jgloss/exec.html

You could look for the presence of some file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,163
Latest member
Sasha15427
Top