Solved

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

Posted on 1998-11-07
3
171 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This video teaches viewers about errors in exception handling.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now