Solved

How do I call a C or C++ program in a Java Applet?

Posted on 1998-11-07
3
174 Views
Last Modified: 2013-11-24
I need to call a C or C++ program, compiled with Visual C++ 5.0. This program has to be included in a Java applet, for its deployment in a intranet/internet environment. The executable code of the C program is located in the Web Server. Can anyone tell me how to do this?
0
Comment
Question by:phalley
3 Comments
 
LVL 27

Expert Comment

by:BigRat
ID: 1227067
The problem with a Java Applet (embedded in a HTML page and downloaded, is that the security regulations are quite severe. The simplest solution would be to encapsulate the program into a Java Servlet and access it from the applet via RMI.
   One would need to know a bit more about the program though, before one could really be of help. One would.
0
 
LVL 16

Accepted Solution

by:
heyhey_ earned 70 total points
ID: 1227068
Java applications can call native procedures but:
1. you lose platform independance
2. it seems that Microsoft's VM still don't support Sun's NativeInterface standard

now the applets
1. applets are downloadable - so the platform inipendance is much more needed !!!
2. applets must be secure, so ordinary applets CAN'T execute native code.
3. you'll have problems with downloading native code (for WIn95 it is DLL file) and installing it so that the OS can see and use it ...

so what:
1. it seems that you can use applets with native code.
2. you can use Java application + native code, but why - you better
2.1. implement everything in VC (why Java ???)
2.2. rewrite everything in Java
2.3. rewrite the VC part as a server application. Java applets can connect (using TCP) with that application and so on ...
0
 

Author Comment

by:phalley
ID: 1227069
Regarding Heyhey's answer, we need Java because we have Sun Workstation as clients, so we need the Virtual Machine for the clients. It was a good suggest to rewrite the VC as a server and communicate with TCP
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question