Home arrow static arrow Java Programming [Archive] - run Java Applet w/o installing JRE
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - run Java Applet w/o installing JRE
This topic has 6 replies on 1 page.

Posts:82
Registered: 5/23/03
run Java Applet w/o installing JRE  
Jun 23, 2004 1:02 PM



 
Hi all,

I'm wondering what would allow the client to run the java applet w/o having to install the JRE? I have seen it done but not sure how they did it. I wrote a simple java applet (not even JApplet) and IE said "class not found" until I installed the JRE on that machine. Any tips? Thanks so much in advance.
 

Posts:82
Registered: 5/23/03
Re: run Java Applet w/o installing JRE  
Jun 23, 2004 1:12 PM (reply 1 of 6)



 
It seems like embedding the plug-in tag in the HTML source will prompt the user to download the Sun's java plug-in. However, I have seen it done w/o having to download anything.

Go to http://www.vietfun.com/chat.shtml and type in a nickname and press ENTER. It seems like they used only AWT components. However, I would love to be able to have the client use the applet WITHOUT having to download ANYTHING at all.

awaiting a solution...
 

Posts:2,067
Registered: 5/3/01
Re: run Java Applet w/o installing JRE  
Jun 23, 2004 1:17 PM (reply 2 of 6)



 
Most likely you are talking about the almost-Java Virtual Machine that comes (built-in) with Internet Explorer. But this jVM only supports very early versions of Java (1.0.x and maybe 1.1.x - can't recall for sure).
 

Posts:82
Registered: 5/23/03
Re: run Java Applet w/o installing JRE  
Jun 23, 2004 2:00 PM (reply 3 of 6)



 
Do you have any more info on this?

This is what I did on my sample applet. It's very basic so I'm sure java 1.0 is fine. However, IE won't run it w/o JRE installed.

import java.net.*;
import java.applet.*;
import java.awt.*;

public class SaleChatClient extends Applet
{
public void init()
{

}

public void start()
{

}

public void paint(Graphics g)
{
g.setColor(Color.red);
g.drawString("Hello", 50, 50);
}
}
 

Posts:2,067
Registered: 5/3/01
Re: run Java Applet w/o installing JRE  
Jun 24, 2004 7:14 AM (reply 4 of 6)



 
Looking at your sample, I would say this could run in the old JVM.

You might simply be having problems with the JVM finding your classes - I believe this is specified in the HTML (but its been too long for me to give details).

Also, your Internet Explorer could be looking for a plug-in JVM (I believe this is specified in Tools-Internet Options-Advance menu).

And finally, Windows (XP?) may not have this JVM built in anymore - never could figure out the outcome of the law suite.

Hopefully someone with more recent Applet experience will chime in.
 

Posts:149
Registered: 97-10-23
Re: run Java Applet w/o installing JRE  
Jun 24, 2004 8:24 AM (reply 5 of 6)



 
What does your html file look like? Use a similar format as the example applet you sited in your 2nd post.
 

Posts:82
Registered: 5/23/03
Re: run Java Applet w/o installing JRE  
Jun 28, 2004 1:15 AM (reply 6 of 6)



 
The problem is the compiler. Set the compiler to compile to work w/ Java 1.1 and earlier. IE has built-in JVM but only run Java 1.1 or earlier.
 
This topic has 6 replies on 1 page.