Click here to Skip to main content
15,903,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralJava Applets (jar) in MFC resources application Pin
Crercio O. Silva19-Oct-03 7:08
Crercio O. Silva19-Oct-03 7:08 
GeneralRe: Java Applets (jar) in MFC resources application Pin
Johnny ²19-Oct-03 21:47
Johnny ²19-Oct-03 21:47 
GeneralRe: Java Applets (jar) in MFC resources application Pin
Crercio O. Silva20-Oct-03 2:21
Crercio O. Silva20-Oct-03 2:21 
GeneralRe: Java Applets (jar) in MFC resources application Pin
Steve S20-Oct-03 2:23
Steve S20-Oct-03 2:23 
GeneralRe: Java Applets (jar) in MFC resources application Pin
Crercio O. Silva20-Oct-03 5:25
Crercio O. Silva20-Oct-03 5:25 
GeneralRe: Java Applets (jar) in MFC resources application Pin
Steve S20-Oct-03 5:50
Steve S20-Oct-03 5:50 
GeneralRe: Java Applets (jar) in MFC resources application Pin
Crercio O. Silva20-Oct-03 14:18
Crercio O. Silva20-Oct-03 14:18 
GeneralRe: Java Applets (jar) in MFC resources application Pin
antlers20-Oct-03 12:03
antlers20-Oct-03 12:03 
Short answer is: Sorry, can't be done.

When you start a Java applet, the browser passes the URL of the applet codebase to the Java Virtual Machine. The JVM is not going to understand a res: URL, and it is specifically prohibited from using a file: URL to load an applet because of all sorts of security problems.

What you should be able to do is run the applet as a regular Java application, in which case the JVM is free to access the local disk to find the Jar file. Often applets will also have a "main" function that lets you run them as a regular application; if yours does not you will have to write another Java class with a "main" function that creates a frame and starts the applet within it.

If your applet code needs tighter integration with your MFC app than running as a separate Java process will allow, you might have to look at the JNI (Java Native Interface), or whatever the equivalent is for Microsoft's brain-damaged JVM, to incorporate the Java runtime into your application.
GeneralRe: Java Applets (jar) in MFC resources application Pin
Crercio O. Silva20-Oct-03 14:25
Crercio O. Silva20-Oct-03 14:25 
GeneralRe: Java Applets (jar) in MFC resources application Pin
antlers21-Oct-03 8:57
antlers21-Oct-03 8:57 
Generalprecise time measuring Pin
tguzella19-Oct-03 6:55
tguzella19-Oct-03 6:55 
GeneralRe: precise time measuring Pin
David Crow20-Oct-03 2:50
David Crow20-Oct-03 2:50 
GeneralRe: precise time measuring Pin
PremL20-Oct-03 5:49
PremL20-Oct-03 5:49 
GeneralNeed opinion + help, can anyone just comment anything, suggestion, websites would be good, I would be forever Thankful Pin
Snyp19-Oct-03 6:37
Snyp19-Oct-03 6:37 
GeneralMRU problem Pin
YaronNir19-Oct-03 6:26
YaronNir19-Oct-03 6:26 
GeneralInteresting Interview with Bjarne Stroustrup Pin
Kevin McFarlane19-Oct-03 6:16
Kevin McFarlane19-Oct-03 6:16 
GeneralDatabase Implementation, Please!!! Pin
Chopper19-Oct-03 4:39
Chopper19-Oct-03 4:39 
GeneralSetAtGrow problem Pin
YaronNir19-Oct-03 2:42
YaronNir19-Oct-03 2:42 
GeneralRe: SetAtGrow problem Pin
BadJerry19-Oct-03 7:11
BadJerry19-Oct-03 7:11 
GeneralRe: SetAtGrow problem Pin
YaronNir19-Oct-03 7:12
YaronNir19-Oct-03 7:12 
GeneralSwitchnig beetween views Pin
Chernobog119-Oct-03 0:38
Chernobog119-Oct-03 0:38 
GeneralMCI prob Pin
AI_Warrior19-Oct-03 0:30
AI_Warrior19-Oct-03 0:30 
GeneralRe: MCI prob Pin
Alexander M.,19-Oct-03 4:00
Alexander M.,19-Oct-03 4:00 
GeneralSending a "Click". Help please is urgent. Pin
Rafael Fernández López18-Oct-03 23:54
Rafael Fernández López18-Oct-03 23:54 
GeneralRe: Sending a "Click" Pin
User 665819-Oct-03 1:00
User 665819-Oct-03 1:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.