Solved

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

Posted on 1998-11-07
3
175 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
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…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

792 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