hi......
Im doing my main project...
im creating an IDE for c,c++,java using java lang...
i need to link the program written, to the c compiler...
any ideas...
then whr can i download the source code for net beans IDE

This link should help you in getting NetBeans IDE sources and explain how to work with them.
A C Compiler would be an external application, so for invoking it you will need to use the Runtime class and process the output, Sorry had mixed it up with JNI when I posted at the start

Thank u......
is there any function in java for executing external application....
can u explain abt runtime classes..

This should be an easy project, until you have to create a command for executing an applet instead of a standalone application.

Also executing packaged-classes might be a bit tricky.

It will help if you ran some batch files (or possibly even shells for a UNIX box) to see what it takes to execute a java class file, or compile a .java file into a .class file.

Running from the command line gives similar results, but it may be easier to see mistakes or organize your commands by using the above method.

Once you've figured that out, look up the Runtime API

http://www.javadocexamples.com/java_examples/java/lang/Runtime/


-- some executions by example--

http://www.javadocexamples.com/java/lang/Runtime/exec(String%20command).html


-- a reference for executing applets from the command line--

http://www.cs.colostate.edu/helpdocs/JavaInDOS.html


-- the brute-force method of executing an applet (using main)--

http://www.linuxtopia.org/online_books/programming_books/thinking_in_java/TIJ316_006.htm

commented: Gave all the necessary pieces to make the puzzle. +1

> This should be an easy project

You have seriously got to be joking...

> Also executing packaged-classes might be a bit tricky.

Take a look at how Ant handles such things.

> This should be an easy project

You have seriously got to be joking...

> Also executing packaged-classes might be a bit tricky.

Take a look at how Ant handles such things.

I meant creating the GUI layout would be easy.

It will be hard to create plug-ins for the IDE, but depending on the scope of the assignment plugins can be an optional addition to the IDE.

If its a simple IDE that is dedicated to interfacing with a java compiler and runtime (or even certain components of a JDK) then it shouldn't be too bad.

But this is obviously an assumption. Not enough information of the scope of the assignment is given, and if the scope is bigger than I assumed then I agree that this assignment will not be as easy as I originally thought.

Edit: Actually the OP needs the IDE to interface with a c compiler, not java, though the way it would be done is not too different.

what r the files required for compiling java pgm....
is javac and java enough....

what r the files required for compiling java pgm....
is javac and java enough....

are you now telling you haven't even tried to compile anything yet? javac is the compiler, yes. I 'd suggest you first get to learn how that thing works, before you go and try to create an IDE

then whr can i download the source code for net beans IDE

You cant. Its not opensource.

You cant. Its not opensource.

uhm... yes, yes it is actually. NetBeans is openSource, at least that's what the website sais :)

The CDDL is incompatible with the GPL so you cant do much with it

> You cant. Its not opensource.

Yes it is.

i thought netbeans is opensource .....
alright i need to know hw can i compile c program from java code
i should call the c compiler from java code.........

which compiler should i install???
and what method i should call...

which compiler should i install???
and what method i should call...

to compile java code? I'd suggest the standard Java compiler :)

im not asking for java..
im asking for c....
and what method i should call to compile the c program using java code...

since you wrote/are writing the code. aren't you supposed to know that?

ya i must ....
but im trying to find for calling the c compiler...

tried the options Ezzaral suggested?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.