Skip to main content

how to include html/exe file in lg3D

3 replies [Last post]
deepthi_ventrap...
Offline
Joined: 2006-08-29

Hi
Can anyone tell me how to include html file as well as exe file in a frame? Would be grateful if you can post/mail deepthi.ventrapragada@gmail.com a few examples for the same.

regards
deepthi

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
diabeteo
Offline
Joined: 2005-11-08

Hi,

With html it's easy.

It can be done using Swing integration for 2D widget support build in LG3D:

SwingNode
^
JPanel
^
JEditorPane

More pieces of information about JEditorPane can be found here:
http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-JEditorP...

Regards,

Stanley

deepthi_ventrap...
Offline
Joined: 2006-08-29

Hi
Thanks for your help. I could run a html sample by following the link given. Could anyone suggest me how it can be done with exe file?

regards
deepthi

diabeteo
Offline
Joined: 2005-11-08

What do you mean by running an .exe file in frame? An EXE file is an executable file. I'm afraid it's impossible.

But you can launch such executable file from java code:

[i]import java.io.IOException;

public class Launcher
{

public static void main(String[] args)
{

try
{
Runtime.getRuntime().exec( "something.exe" );
}
catch (IOException e)
{
e.printStackTrace();
}

}

}[/i]

Save this code as Launcher.java, change the name of the application to launch, compile and try it yourself.

Of course, it'll work only on Windows.

Please read this article:
http://mindprod.com/jgloss/exec.html

Regards,

Stanley