Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

My Java doesn't load...I get the square, circle, and triangle box

  Asked By: Emily    Date: Feb 16    Category: Java    Views: 1900
  

Here's my question: My Java doesn't load...I get the square, circle,
and triangle box. I've enabled every java setting on my browser,
i've downloaded java applet v1.4.1_03, I've looked everywhere on the
internet searching for an answer to my problem. I'm running on a Win
98 SE.

Share: 

 

9 Answers Found

 
Answer #1    Answered By: Brian Ross     Answered On: Feb 16

you could try this first;

open control panel, select java  plugin, then set the plugin to
\program files\java soft\ then the path to the later version of java
jre-1.4 or something similar i dont know it off hand.

windows 98 is aweful for java. ive used 2000 since it came out, but
got involved in java about 2 years ago, so i never really used java on
98. my college friends told me of the troubles they had trying to use
java 1.4 on 98. it may be just that 2000 doesnt come with java so
installing it is far easier.

my advice is to use mozilla/netscape/firebird with the java plugin.

its not a good answer  i know, but unless you can find a way to remove
java from 98 i can not help you.

java.sun.com/.../download-windows.html

i havnt read the release notes but they may contain information which
helps in a situation like this.

 
Answer #2    Answered By: Heidi Larson     Answered On: Feb 16

unload java  1.4 and load  java 1.2 or 1.3 it will run

 
Answer #3    Answered By: Nagina Mian     Answered On: Feb 16

what is wrong with 1.4??????????????

 
Answer #4    Answered By: Whitney Cruz     Answered On: Feb 16

It is beta version and under testing
error can be known from the creater

 
Answer #5    Answered By: Asir Hashmi     Answered On: Feb 16

Well, it seems that someone has not checked out http://java.sun.com for a
loooong time.
JDK1.4.2 is out now (and not a beta) so you can take this version of course.

 
Answer #6    Answered By: Saxon Anderson     Answered On: Feb 16

or u can just install jre's to run

 
Answer #7    Answered By: Geraldine Perkins     Answered On: Feb 16

Has asnyone Used IntellijIdea I feel its the best
Iam using it for the last 1.5 years
Sezhian

 
Answer #8    Answered By: Corey Jones     Answered On: Feb 16

You have to use Mutithreading to handle more than one Client simultaniously..
means instead putting the Socket's action code in listener thread itself, create
a new Thread for each incoming socket & put ur handle code in that class (pass
the incoming Socket as a paramter to tht Thread)

I hv attached sample code,

To run Server,
java JServerSock

To run Clients
java JClientSock "Client 1"
java JClientSock "Client 2"
.
.
.
java JClientSock "Client n"

regards,
S.Vasanth Kumar.

SERVER CODE
============
import java.net.*;
import java.io.*;

public class JServerSock implements Runnable
{
ServerSocket ss;
Thread thrdListen;

public JServerSock()
{
try
{
ss = new ServerSocket(10000);
thrdListen = new Thread(this);
thrdListen.start();
System.out.println("Server Started Successfully!!");
}
catch(Exception ex)
{
System.out.println(ex.toString());
System.exit(1);
}
}

public void run()
{
if(Thread.currentThread() == thrdListen)
{
try
{
while(true)
{
Socket s = ss.accept();
new SocketHandle(s).start();
}
}
catch(Exception ex)
{
System.out.println(ex.toString());
System.exit(1);
}
}
}

public static void main(String args[])
{
new JServerSock();
}


class SocketHandle extends Thread
{
Socket s;

public SocketHandle(Socket inSocket)
{
this.s = inSocket;
}

public void run()
{
try
{
while(true)
{
BufferedInputStream bin = new BufferedInputStream(s.getInputStream());
int n=-1;
byte[] b = new byte[5000];
while((n=bin.read(b,0,b.length))!=-1)
{
for(int i=0;i<n;i++)
{
System.out.print((char)b[i]);
}
}
bin.close();
s.close();
}
}
catch(Exception ex)
{
System.out.println(ex.toString());
stop();
}
}
}
}
CLIENT CODE
===========
import java.net.*;
import java.io.*;
public class JClientSock implements Runnable
{
Thread thrdListen;
static String strClientName = "Client1";

public JClientSock()
{
try
{
thrdListen = new Thread(this);
thrdListen.start();
System.out.println("Client Started Successfully!!");
}
catch(Exception ex)
{
System.out.println(ex.toString());
System.exit(1);
}
}

public void run()
{
if(Thread.currentThread() == thrdListen)
{
try
{
Socket s = new Socket("localhost",10000);
BufferedOutputStream bOut = new BufferedOutputStream(s.getOutputStream());
while(true)
{
bOut.write((strClientName + " Request\n").getBytes());
bOut.flush();
Thread.sleep(1000);
}
}
catch(Exception ex)
{
System.out.println(ex.toString());
System.exit(1);
}
}
}

public static void main(String args[])
{
if(args.length>0)
strClientName = args[0];

new JClientSock();
}
}

 
Answer #9    Answered By: Troy Kelley     Answered On: Feb 16

Add the following 2 lines before creating a socket if u r behind some proxy..

System.setProperty("http.proxyHost","192.168.0.85"); //Change to ur Proxy
Address
System.setProperty("http.proxyPort","8080"); // Change port for ur setup

I hv added a small sample code also here..
these 2 properties enables the java  Sockets to be created behind a Proxy /
Firewall..

regards,
S.Vasanth Kumar.

import java.net.*;
import java.io.*;
public class ProxySocket2
{
public static void main(String args[]) throws Exception
{
System.setProperty("http.proxyHost","192.168.0.85");
System.setProperty("http.proxyPort","8080");

URLConnection url = new URL("http://www.xyz.com:80").openConnection();
// Socket s = new Socket("216.109.112.135",80);
InputStream in = url.getInputStream();
BufferedInputStream bIn = new BufferedInputStream(in);
int n=-1;
byte b[] = new byte[5000];
StringBuffer sb = new StringBuffer();
while((n=bIn.read(b,0,b.length))!=-1)
{
for(int i=0;i<n;i++)
{
sb.append((char)b[i]);
}
}
bIn.close();

System.out.println(sb.toString());
}
}

 




Tagged: