answersLogoWhite

0

You don't. There are two possible workarounds.

  1. Use the Java Native Interface (JNI). JNI code resembles C-style code and is able to be compiled in the native machine language of the underlying system. This is a rather complicated solution, and is not ideal for a "quick fix."
  2. Write your C++ code like normal, compile it, and use Java code to call your compiled code. You can use the Runtime.getRuntime().exec() methods to accomplish this.
User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

Why is java's portability better than c plus plus?

As we know that java is a plateform independent language and the main advantage of java is that it can support to any operating system and can be executed to any machines without any modifications.Due to the use of class in java it has become more easier to understand the program compared to c plus plus.Hence,java is portable than c plus plus


What is a Java Drive-By?

AnswerA Java Drive-By is a Java Applet that is coded in Java and is put on a website. Once you click "Run" on the pop-up, it will download a program off the internet. This program can be a virus or even a simple downloader. If you'd like to get the source code or wanna know more information about a Java Drive-By, use Google.


Executon steps in java?

First of all the compiler converts our source code into byte code ,this is done by "javac" compiler.then we use interpretor that is the"java interpretor" for making our byte code executed.thats y java is called as an compiled and interpred language.by that way our java program will be interpreted. First of all our source code vl b converted into byte code by da java compiler named "javac" ,then dt byte code vl be executed by da interpretor named "java" interpretor. These are execution steps in java dts y v call java as a compiled and interpreted language.


How java use extern key word which is used in C plus plus?

No extern keyword in Java.


What does the Java compiler translate Java source code to?

The Java compiler translates Java source code to Java byte code.

Related Questions

What is a program that translates a high level language like C plus plus to machine language?

A compiler. We can also use an interpreter to translate high-level code as it is executed, however in order to create a stand-alone executable we must use a compiler. A compiler is simply a program that translates high-level code to a lower-level code (but not necessarily machine code). For instance, the Java compiler emits Java byte code which is suitable for interpretation by the Java virtual machine.


What is Re usability in java?

Reusability in Java means that once you write some code, you can use it over and over again - if you write it so that it can be reused. For example, if you write a Enumeration-Iterator adapter, or some code that lets you treat an Enumeration - Java legacy code - as an Iterator - shiny NEW Java code - then you can use it not only in your animal simulation program, but also in your Jacuzzi interface program.


How do you write a java program for finding multiligual languages?

You can use Java's built-in functions to write a code that will find multilingual languages.


What is the best language to program a game in I know c plus plus is fairly standard but would something like java work as well?

Yes you can use Java. But, while it will be highly portable, it won't perform anything near as well as a native machine code program would, hence C++ is the preferred language for high-performance gaming.


Why is java's portability better than c plus plus?

As we know that java is a plateform independent language and the main advantage of java is that it can support to any operating system and can be executed to any machines without any modifications.Due to the use of class in java it has become more easier to understand the program compared to c plus plus.Hence,java is portable than c plus plus


Why the execution of java program is slower than a C program?

This is because Java runs it's code through a Virtual Machine which compiles it and runs it. C will compile native on your machine and the code will be run directly, without the use of a virtual machine.


What is a Java Drive-By?

AnswerA Java Drive-By is a Java Applet that is coded in Java and is put on a website. Once you click "Run" on the pop-up, it will download a program off the internet. This program can be a virus or even a simple downloader. If you'd like to get the source code or wanna know more information about a Java Drive-By, use Google.


What is JAVA drive by?

AnswerA Java Drive-By is a Java Applet that is coded in Java and is put on a website. Once you click "Run" on the pop-up, it will download a program off the internet. This program can be a virus or even a simple downloader. If you'd like to get the source code or wanna know more information about a Java Drive-By, use Google.


What is a Java Drive By?

AnswerA Java Drive-By is a Java Applet that is coded in Java and is put on a website. Once you click "Run" on the pop-up, it will download a program off the internet. This program can be a virus or even a simple downloader. If you'd like to get the source code or wanna know more information about a Java Drive-By, use Google.


Where can one get the program Java?

The program Java can be downloaded from the official Java website on the internet. The program is free for personal use, so it can be downloaded without any cost by anyone.


Executon steps in java?

First of all the compiler converts our source code into byte code ,this is done by "javac" compiler.then we use interpretor that is the"java interpretor" for making our byte code executed.thats y java is called as an compiled and interpred language.by that way our java program will be interpreted. First of all our source code vl b converted into byte code by da java compiler named "javac" ,then dt byte code vl be executed by da interpretor named "java" interpretor. These are execution steps in java dts y v call java as a compiled and interpreted language.


How java use extern key word which is used in C plus plus?

No extern keyword in Java.