ShaggyInjun
ShaggyInjun

Reputation: 2973

Netbeans create Java source files in a C/C++ project

I have recently started using Netbeans C/C++. I see that the new file wizard doesn't show any buttons to create java files, all of them disabled. I can create java files in a Java project however.

If I create a java file manually and open it inside the ide, it provides syntax-highlighting. But the IDE doesn not show any wizards that will enable me to create new java files inside a c/c++ project.

How can I enable this ?

Upvotes: 0

Views: 458

Answers (2)

simon.watts
simon.watts

Reputation: 1095

An observation, rather than a solution...

We need to support mixed language projects because the dependancies between artefacts-by-language can go in both directions.

For example: Java classes are used to generate JNI headers (javah) for C/C++, while C/C++ headers/libraries are used to generate wrapper classes (swig) for Java.

This represents a bidirectional dependancy between single-language projects, but not between artefacts in a single mixed language project - i.e. the build can be described by a DAG and thus satisfied by make.

Upvotes: 0

ollo
ollo

Reputation: 25370

You can't create Java files in a C / C++ project (and vice versa) . You have to use either Java or C(++).

I don't see a reason why you should mix them, but better you develop your Java code in a Java Project and same for C/C++. However, you have to move manually.

Btw. please explain your problem more detailed, it's hard to understand why you put two (or 3) totally different things together.

Upvotes: 1

Related Questions