PDA

View Full Version : [317] Ric's Webclient Tutorial [317]



Xdragon
June 20th, 2010, 16:55
Note: This tutorial was only posted on Moparscape, rune server, rune locus. I am only registered on these 3 forums.


Only the registered members can see the link.

Old Polls:


Last Updated: August 22, 2009
Difficulty: Look at poll
Purpose: To make a webclient for your server/site.
Browser's Tested on: Google Chrome (with the java plugin), Internet Explorer, Mozilla Firefox, Opera.
Client's Tested on: Mine But should work on all 317 clients
Classes Modified: Signlink.java, Client.java, Class30_Sub2_Sub1_Sub1.java
Table of Contents:

--------------------------------------------------------------------------------------------------------------

Section 1 - Updates/Requirements
1.1 - Revision History:

1/2/09 - Downloading cache percentage will appear in the client(no more jframe)
1/3/09 - Downloads cache faster.
4/1/09 - Tutorial re-written.
4/2/09 - Uploaded "Cache + Sprites Zipping" video from uppit to youtube.
4/25/09 - Tutorial updated.
4/28/09 - Step 2.6 was updated.
5/3/09 - Step 2.3 was updated.
8/22/09 - New FAQ question and updated browser's tested on list.


1.2 - Requirements
1. Regular Web host or VPS(Virtual Private Server) or Dedi(Dedicated Server) - For the web client page, client.jar(Should be around 600kb), cache.zip(usually is around 16mb)
2. Jar maker - Download below
3. A Client
4. Patience and Time

1.3 - Files to download:
1. Jar Maker: Only the registered members can see the link.

Incase above don't work:
Only the registered members can see the link.

Section 2 - Tutorial:
This video is to help you see what you gotta do.
Webclient tutorial video: Only the registered members can see the link.
Subscribe for future videos. I might make a new webclient video or something.
--------------------------------------------------------------------------------------------------------------

2.1 - Step 1 - Signlink.java
Open up Signlink.java and search for findcachedir() and replace that method with this one:



replace yourclientname with the name of your client. For example: C:/.ricscape_file_store_32/
Save signlink.java and close it.

--------------------------------------------------------------------------------------------------------------

2.2 - Step 2 - Client.java
Open up client.java and search for Class44 method67 and replace that method with this one:



private Class44 method67(int i, String s, String s1, int j, byte byte0, int k)
{
byte abyte0[] = null;
int l = 5;
try
{
if(aClass14Array970[0] != null)
{
abyte0 = aClass14Array970[0].method233(true, i);
}
if(abyte0 == null)
{
method13(15, (byte)4, "Downloading Cache");
downloadcache("YOUR CACHE URL LINK HERE", "cache.zip", "", "cache");
}
if(aClass14Array970[0] != null)
{
abyte0 = aClass14Array970[0].method233(true, i);
}
}
catch(Exception exception) { }
if(abyte0 != null);
if(abyte0 != null)
{
Class44 class44 = new Class44(44820, abyte0);
return class44;
}
int i1 = 0;
do
{
if(abyte0 != null)
{
break;
}
String s2 = "Unknown error";
method13(k, (byte)4, "Client updated - please reload client");
//method13(k, (byte)4, (new StringBuilder()).append("Requesting ").append(s).toString());
Object obj = null;
try
{
int j1 = 0;
DataInputStream datainputstream = method132((new StringBuilder()).append(s1).append(j).toString());
byte abyte1[] = new byte[6];
datainputstream.readFully(abyte1, 0, 6);
Class30_Sub2_Sub2 class30_sub2_sub2 = new Class30_Sub2_Sub2(abyte1, 891);
class30_sub2_sub2.anInt1406 = 3;
int l1 = class30_sub2_sub2.method412() + 6;
int i2 = 6;
abyte0 = new byte[l1];
for(int j2 = 0; j2 < 6; j2++)
{
abyte0[j2] = abyte1[j2];
}

while(i2 < l1)
{
int k2 = l1 - i2;
if(k2 > 1000)
{
k2 = 1000;
}
int l2 = datainputstream.read(abyte0, i2, k2);
if(l2 < 0)
{
s2 = (new StringBuilder()).append("Length error: ").append(i2).append("/").append(l1).toString();
throw new IOException("EOF");
}
i2 += l2;
int i3 = (i2 * 100) / l1;
if(i3 != j1)
{
method13(k, (byte)4, (new StringBuilder()).append("Loading ").append(s).append(" - ").append(i3).append("%").toString());
}
j1 = i3;
}
datainputstream.close();
try
{
if(aClass14Array970[0] != null)
{
aClass14Array970[0].method234(abyte0.length, abyte0, (byte)2, i);
}
}
catch(Exception exception3)
{
aClass14Array970[0] = null;
}
}
catch(IOException ioexception)
{
if(s2.equals("Unknown error"))
{
s2 = "Connection error";
}
abyte0 = null;
}
catch(NullPointerException nullpointerexception)
{
s2 = "Null error";
abyte0 = null;
if(!signlink.reporterror)
{
return null;
}
}
catch(ArrayIndexOutOfBoundsException arrayindexoutofboundsexception)
{
s2 = "Bounds error";
abyte0 = null;
if(!signlink.reporterror)
{
return null;
}
}
catch(Exception exception1)
{
s2 = "Unexpected error";
abyte0 = null;
if(!signlink.reporterror)
{
return null;
}
}
if(abyte0 == null)
{
for(int k1 = l; k1 > 0; k1--)
{
if(i1 >= 3)
{
method13(k, (byte)4, "Game updated - please reload page");
k1 = 10;
} else
{
method13(k, (byte)4, (new StringBuilder()).append(s2).append(" - Retrying in ").append(k1).toString());
}
try
{
Thread.sleep(1000L);
}
catch(Exception exception2) { }
}

l *= 2;
if(l > 60)
{
l = 60;
}
aBoolean872 = !aBoolean872;
}
} while(true);
Class44 class44_1 = new Class44(44820, abyte0);
if(byte0 != -41)
{
throw new NullPointerException();
} else
{
return class44_1;
}
}


Replace the following:
YOUR CACHE URL LINK HERE
cache.zip
which is in this line:
downloadcache("YOUR CACHE URL LINK HERE", "cache.zip", "", "cache");
You only replace what's in the first 2 quotes.

The first quote is your link.
Your cache link must end with .zip
For example:
Only the registered members can see the link.

The second quote is the extraction so it would like this:
"cache.zip"
Unless your zip file has a different name. If it does then you would put:
"zipfilename.zip"

This is the most important method and without it your client will not download the cache.
On top of Class44 method67 put this:


/*
Made by Ric914
*/
public String name;
public String dir;

public void downloadcache(String url, String name1, String dir1, String type)
{
dir = dir1;
name = name1;
try
{
URLConnection connection = (new URL(url)).openConnection();
String f[] = url.split("/");
File file = new File(f[f.length - 1]);
int length = connection.getContentLength();
InputStream instream = connection.getInputStream();
try{new File(signlink.findcachedir()+dir).mkdir();}catch(E xception e){}
FileOutputStream outstream = new FileOutputStream(signlink.findcachedir()+dir+file) ;
int size = 0;
int copy;
byte[] buffer = new byte[4096];
while((copy = instream.read(buffer)) != -1)
{
outstream.write(buffer, 0, copy);
size+= copy;
int percentage = (int)(((double)size / (double)length) * 100D);
method13(percentage, (byte)4, "Downloading Cache - "+percentage+"%");
}
if(length != size)
{
instream.close();
outstream.close();
} else
{
method13(5, (byte)4, "Unpacking files...");
instream.close();
outstream.close();
unZipFile();
deleteFile();
method13(10, (byte)4, "Unpacking was complete");
}
}
catch(Exception e)
{
System.err.println("Error connecting to server.");
e.printStackTrace();
}
}
public void writeStream(InputStream In, OutputStream Out) throws IOException
{
byte Buffer[] = new byte[4096];
int Len;
while((Len = In.read(Buffer)) >= 0)
{
Out.write(Buffer, 0, Len);
}
In.close();
Out.close();
}

public void unZipFile()
{
try
{
ZipFile ZipFile = new ZipFile(signlink.findcachedir()+dir+name);
for(Enumeration Entries = ZipFile.entries(); Entries.hasMoreElements();)
{
ZipEntry Entry = (ZipEntry)Entries.nextElement();
if(Entry.isDirectory())
{
(new File(signlink.findcachedir()+dir+Entry.getName())) .mkdir();
} else
{
writeStream(ZipFile.getInputStream(Entry), new BufferedOutputStream(new FileOutputStream(signlink.findcachedir()+dir+Entry .getName())));
}
}
ZipFile.close();
}
catch(Exception e)
{
e.printStackTrace();
}
}

public void deleteFile()
{
try
{
File file = new File(signlink.findcachedir()+dir+name);
file.delete();
}
catch(Exception e)
{
e.printStackTrace();
}
}


Once you have added those method's in your client.java, scroll all the way up still you see import's then add the following under the rest of them.


import java.awt.Dimension;
import java.net.URL;
import java.net.URLConnection;
import javax.swing.*;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;


--------------------------------------------------------------------------------------------------------------

2.3 - Step 3 - Class30_Sub2_Sub1_Sub1.java(Sprites)
Now for the sprite part. Which most people don't do right.
Open up Class30_Sub2_Sub1_Sub1.java and replace all:

with this

Like this:
Only the registered members can see the link.
Do the same for the background

Once you have changed the location your client reads the sprites from your gonna wanna save the file and close it.

--------------------------------------------------------------------------------------------------------------

2.4 - Jarring and Signing
Before we start make sure you have downloaded the jar maker.(link located on top)
If you have already downloaded it then run the jar maker and watch this video.

Jarring and signing video: Only the registered members can see the link.

Once you have jarred and signed the client do the following:
Put the cache files(Everything inside the cache folder) and sprite "folder" together in a zip file.

To understand what i mean watch this video:
Cache + Sprites/Background Zipping:
Youtube: Only the registered members can see the link.

--------------------------------------------------------------------------------------------------------------

2.5 - Webclient Web Page

Replace yourclientname with the name of your client.

--------------------------------------------------------------------------------------------------------------

2.6 - End of tutorial details
This is what your webclient should do if you did this tutorial right:
Only the registered members can see the link.

--------------------------------------------------------------------------------------------------------------

Section 3 - Extra
3.1 - Frequently Asked Questions
Question: What's a good file host for my cache?
Answer: You can use any host that allows direct linking. Here are some that allow direct linking:
Only the registered members can see the link.
Only the registered members can see the link.

Question: Ric, it's too hard. Can you make it for me?
Answer: No, I don't do this for people anymore. You gotta learn how to make a webclient for when you update your client.

Question: I have found a error or a misspelled word on your tutorial, what do I do?
Answer: Send me a private message with the error or misspelled word.

Question: The java console says it cannot find client.class, What should I do?
Answer: I recommend deleting all the class files and recompile your client.

Question: I get the 1,2,3,4,5 error. What do I do?
Answer: Make sure you have the cache and sprites in cache.zip and that the client reads the cache and sprites from *where your cache.zip downloads/extracts to*

Question: I get a java heap space error, What do I do?
Answer: Make sure you have <param name="java_arguments" value="-Xmx1024m"> in your applet code.
--------------------------------------------------------------------------------------------------------------

3.2 - Credit:
Ric914 - Writing/Releasing this tutorial.
Moparisthebest - I used some stuff from his downloader


No Credits to me bc its Ric's Tut :D
I only posted this bc i thought We need a Webclient Tut :o !

caelum6
June 20th, 2010, 16:58
Good job for reposting. You should make a very detailed video.

Xdragon
June 20th, 2010, 19:35
Ty :D

XxBryantD
June 20th, 2010, 23:16
help error


client.java:4138: cannot find symbol
symbol : method downloadcache(java.lang.String,java.lang.String,ja va.lang.Strin
g,java.lang.String)
location: class client
downloadcache("Only the registered members can see the link.", "cache.zip", "", "cache
");
^

Xdragon
June 21st, 2010, 13:35
Hmm i dont see the problem. Weard it says the last part is wrong but i cant see anything wrong about it.
Its maybe that u need a better Cache url or somethin idk Or its the big letter thing try :


Only the registered members can see the link.

Aaron
June 21st, 2010, 13:57
Sweet Tutorial, Very detailed, I'm going to try this soon as soon as I purchase a VPS, Will be a very fun attempt+project in some cases:) - Thanks,

Regards,

Aaron

XxBryantD
June 21st, 2010, 15:54
someone said i might need downloadcache method but idk

client.java:4138: cannot find symbol
symbol : method downloadcache(java.lang.String,java.lang.String,ja va.lang.Strin
g,java.lang.String)

Xdragon
June 21st, 2010, 16:10
oh lol Here put this on top for class 44 method 67 :


/*
Made by Ric914
*/
public String name;
public String dir;

public void downloadcache(String url, String name1, String dir1, String type)
{
dir = dir1;
name = name1;
try
{
URLConnection connection = (new URL(url)).openConnection();
String f[] = url.split("/");
File file = new File(f[f.length - 1]);
int length = connection.getContentLength();
InputStream instream = connection.getInputStream();
try{new File(signlink.findcachedir()+dir).mkdir();}catch(E xception e){}
FileOutputStream outstream = new FileOutputStream(signlink.findcachedir()+dir+file) ;
int size = 0;
int copy;
byte[] buffer = new byte[4096];
while((copy = instream.read(buffer)) != -1)
{
outstream.write(buffer, 0, copy);
size+= copy;
int percentage = (int)(((double)size / (double)length) * 100D);
method13(percentage, (byte)4, "Downloading Cache - "+percentage+"%");
}
if(length != size)
{
instream.close();
outstream.close();
} else
{
method13(5, (byte)4, "Unpacking files...");
instream.close();
outstream.close();
unZipFile();
deleteFile();
method13(10, (byte)4, "Unpacking was complete");
}
}
catch(Exception e)
{
System.err.println("Error connecting to server.");
e.printStackTrace();
}
}
public void writeStream(InputStream In, OutputStream Out) throws IOException
{
byte Buffer[] = new byte[4096];
int Len;
while((Len = In.read(Buffer)) >= 0)
{
Out.write(Buffer, 0, Len);
}
In.close();
Out.close();
}

public void unZipFile()
{
try
{
ZipFile ZipFile = new ZipFile(signlink.findcachedir()+dir+name);
for(Enumeration Entries = ZipFile.entries(); Entries.hasMoreElements();)
{
ZipEntry Entry = (ZipEntry)Entries.nextElement();
if(Entry.isDirectory())
{
(new File(signlink.findcachedir()+dir+Entry.getName())) .mkdir();
} else
{
writeStream(ZipFile.getInputStream(Entry), new BufferedOutputStream(new FileOutputStream(signlink.findcachedir()+dir+Entry .getName())));
}
}
ZipFile.close();
}
catch(Exception e)
{
e.printStackTrace();
}
}

public void deleteFile()
{
try
{
File file = new File(signlink.findcachedir()+dir+name);
file.delete();
}
catch(Exception e)
{
e.printStackTrace();
}
}{

Ninga Nun
June 21st, 2010, 21:07
help error


client.java:4138: cannot find symbol
symbol : method downloadcache(java.lang.String,java.lang.String,ja va.lang.Strin
g,java.lang.String)
location: class client
downloadcache("Only the registered members can see the link.", "cache.zip", "", "cache
");
^
This is because your client reads the downloadcache("Only the registered members can see the link.", "cache.zip", "", "cache
");
differently to what has been posted but i have explained the error but i'm afraid i dont know the solution soz :(

But i have a idea of how to solve and this is it:

make an acc at Only the registered members can see the link. and upload your cache to that and put the url from that into the client.java instead of the old one and it might work :D :S

P.S. Please post the result you get cause im just wondering if i solved it, thanks !!! :D :D :D :D

Fenway`
June 21st, 2010, 21:19
what poll

XxBryantD
June 21st, 2010, 23:16
forget it m make my own way of doing this bc im tired of all the probs

XxBryantD
June 22nd, 2010, 23:18
ok i got almost working but gets stuck loading at starting up
Only the registered members can see the link.

Keith
June 23rd, 2010, 00:02
I'll give it a shot soon enough. :)

XxBryantD
June 23rd, 2010, 05:26
ok xdragon if u get my client up on webclient for me ll give u $20

Bifocaler
July 6th, 2010, 18:39
can you see what i did wrong im not sure why it dont work

Java Plug-in 1.6.0_19
Using JRE version 1.6.0_19-b04 Java HotSpot(TM) Client VM
User home directory = C:\Users\Peoples
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------


load: class client.class not found.
java.lang.ClassNotFoundException: client.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:Only the registered members can see the link.
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: client.class
load: class client.class not found.
java.lang.ClassNotFoundException: client.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:Only the registered members can see the link.
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: client.class
load: class client.class not found.
java.lang.ClassNotFoundException: client.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:Only the registered members can see the link.
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: client.class
load: class client.class not found.
java.lang.ClassNotFoundException: client.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:Only the registered members can see the link.
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: client.class

Xdragon
July 9th, 2010, 11:57
can you see what i did wrong im not sure why it dont work

Java Plug-in 1.6.0_19
Using JRE version 1.6.0_19-b04 Java HotSpot(TM) Client VM
User home directory = C:\Users\Peoples
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------


load: class client.class not found.
java.lang.ClassNotFoundException: client.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:Only the registered members can see the link.
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: client.class
load: class client.class not found.
java.lang.ClassNotFoundException: client.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:Only the registered members can see the link.
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: client.class
load: class client.class not found.
java.lang.ClassNotFoundException: client.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:Only the registered members can see the link.
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: client.class
load: class client.class not found.
java.lang.ClassNotFoundException: client.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:Only the registered members can see the link.
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: client.class

Try to Delete all Class Files and try to making it again

$RINGMASTER$
July 9th, 2010, 18:04
You forgot the codes for signlink..to me it just looks like this
Open up Signlink.java and search for findcachedir() and replace that method with this one:

NO CODE HERE

replace yourclientname with the name of your client. For example: C:/.ricscape_file_store_32/
Save signlink.java and close it.
and for this
2.3 - Step 3 - Class30_Sub2_Sub1_Sub1.java(Sprites)
Now for the sprite part. Which most people don't do right.
Open up Class30_Sub2_Sub1_Sub1.java and replace all:

with this: nothing here..

Like this:

Charlie`
July 13th, 2010, 06:46
nice tut

box
July 15th, 2010, 14:32
ok i got it all working until after it downloads cache then it says error connecting and has a timer that resets every 5 secs and nothing happens, help please ill rep++ someone I have teamviewer please somebody who is good with this!

my pker pure
July 15th, 2010, 21:50
I have found that alot of people cannot do this tutorial and make it work, i personally have never tried so i'm going to do that now.

kaasknager
July 16th, 2010, 14:54
need some help whit this someone can help me whit it

Fenway`
July 18th, 2010, 10:56
lol this hasnt worked once?

Vader5844
July 18th, 2010, 11:39
Great release, you will please many lol.

nmanpure
September 6th, 2010, 21:29
i did this and it just says retying in blah blah blah, but when i run the jar on my pc it works (off the desktop not html), besides the downloading cache part witch doesn't work for me, despite their were no compile errors.

iCannon
December 8th, 2010, 02:55
My java error :S


java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file client
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknow n Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(U nknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Un known Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file client

0r4nge ownz
December 30th, 2010, 16:32
How do i put the jared file onto a website? such as webs.com?

sskillz
February 2nd, 2011, 22:42
load: class client.class not found.
java.lang.ClassNotFoundException: client.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:Only the registered members can see the link.
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknow n Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: client.class


What should I do?

_1Greg1_
February 2nd, 2011, 23:14
Fix the path to the client.class file...
client.class not found

Jram811
February 5th, 2011, 02:58
I think there is a problem.
Under step 2.1, it says to replace something with this :
But there isnt anything there.
Might just be my computer. Please help.

Ilikethisbot
February 7th, 2011, 05:20
Great Webclient Tutorial.

smerkz
February 10th, 2011, 09:35
Thanks for this, I will be using it later.

igiveup
February 12th, 2011, 20:57
that my signlink.java where would i change it for first step my different


package sign;

import java.applet.Applet;
import java.io.*;
import java.net.*;

public final class signlink
implements Runnable
{
public static void startpriv(InetAddress inetaddress)
{
threadliveid = (int)(Math.random() * 99999999D);
if(active)
{
try
{
Thread.sleep(500L);
}
catch(Exception _ex) { }
active = false;
}
socketreq = 0;
threadreq = null;
dnsreq = null;
savereq = null;
urlreq = null;
socketip = inetaddress;
Thread thread = new Thread(new signlink());
thread.setDaemon(true);
thread.start();
while(!active)
try
{
Thread.sleep(50L);
}
catch(Exception _ex) { }
}

public void run()
{
active = true;
String s = findcachedir();
uid = getuid(s);
try
{
File file = new File(s + "main_file_cache.dat");
if(file.exists() && file.length() > 0x3200000L)
file.delete();
cache_dat = new RandomAccessFile(s + "main_file_cache.dat", "rw");
for(int j = 0; j < 5; j++)
cache_idx[j] = new RandomAccessFile(s + "main_file_cache.idx" + j, "rw");

}
catch(Exception exception)
{
exception.printStackTrace();
}
for(int i = threadliveid; threadliveid == i;)
{
if(socketreq != 0)
{
try
{
socket = new Socket(socketip, socketreq);
}
catch(Exception _ex)
{
socket = null;
}
socketreq = 0;
} else
if(threadreq != null)
{
Thread thread = new Thread(threadreq);
thread.setDaemon(true);
thread.start();
thread.setPriority(threadreqpri);
threadreq = null;
} else
if(dnsreq != null)
{
try
{
dns = InetAddress.getByName(dnsreq).getHostName();
}
catch(Exception _ex)
{
dns = "unknown";
}
dnsreq = null;
} else
if(savereq != null)
{
if(savebuf != null)
try
{
FileOutputStream fileoutputstream = new FileOutputStream(s + savereq);
fileoutputstream.write(savebuf, 0, savelen);
fileoutputstream.close();
}
catch(Exception _ex) { }
if(waveplay)
{
String wave = s + savereq;
waveplay = false;
}
if(midiplay)
{
midi = s + savereq;
midiplay = false;
}
savereq = null;
} else
if(urlreq != null)
{
try
{
System.out.println("urlstream");
urlstream = new DataInputStream((new URL(mainapp.getCodeBase(), urlreq)).openStream());
}
catch(Exception _ex)
{
urlstream = null;
}
urlreq = null;
}
try
{
Thread.sleep(50L);
}
catch(Exception _ex) { }
}

}



public static String findcachedir() {
String as[] = {"C:/"};
if(storeid < 32 || storeid > 34)
storeid = 32;
String s = "LostLegacy";//upndererscores ftl
for(int i = 0; i < as.length; i++)
try {
String s1 = as[i];
if(s1.length() > 0) {
File file = new File(s1);
if(!file.exists())
continue;
}
File file1 = new File(s1 + s);
if(file1.exists() || file1.mkdir())
return s1 + s + "/";
}
catch(Exception _ex) { }
return null;
}


public static String sencondDir() {
File file = new File("C:/ChaosofCreation/");
if (!file.exists())
file.mkdir();
return file.toString();
}

private static int getuid(String s) {
return 234523;
}

public static synchronized Socket opensocket(int i)
throws IOException
{
for(socketreq = i; socketreq != 0;)
try
{
Thread.sleep(50L);
}
catch(Exception _ex) { }

if(socket == null)
throw new IOException("could not open socket");
else
return socket;
}

public static synchronized DataInputStream openurl(String s)
throws IOException
{
for(urlreq = s; urlreq != null;)
try
{
Thread.sleep(50L);
}
catch(Exception _ex) { }

if(urlstream == null)
throw new IOException("could not open: " + s);
else
return urlstream;
}

public static synchronized void dnslookup(String s)
{
dns = s;
dnsreq = s;
}

public static synchronized void startthread(Runnable runnable, int i)
{
threadreqpri = i;
threadreq = runnable;
}

public static synchronized boolean wavesave(byte abyte0[], int i)
{
if(i > 0x1e8480)
return false;
if(savereq != null)
{
return false;
} else
{
wavepos = (wavepos + 1) % 5;
savelen = i;
savebuf = abyte0;
waveplay = true;
savereq = "sound" + wavepos + ".wav";
return true;
}
}

public static synchronized boolean wavereplay()
{
if(savereq != null)
{
return false;
} else
{
savebuf = null;
waveplay = true;
savereq = "sound" + wavepos + ".wav";
return true;
}
}

public static synchronized void midisave(byte abyte0[], int i)
{
if(i > 0x1e8480)
return;
if(savereq != null)
{
} else
{
midipos = (midipos + 1) % 5;
savelen = i;
savebuf = abyte0;
midiplay = true;
savereq = "jingle" + midipos + ".mid";
}
}

public static void reporterror(String s)
{
System.out.println("Error: " + s);
}

private signlink()
{
}

public static final int clientversion = 317;
public static int uid;
public static int storeid = 32;
public static RandomAccessFile cache_dat = null;
public static final RandomAccessFile[] cache_idx = new RandomAccessFile[5];
public static boolean sunjava;
public static Applet mainapp = null;
private static boolean active;
private static int threadliveid;
private static InetAddress socketip;
private static int socketreq;
private static Socket socket = null;
private static int threadreqpri = 1;
private static Runnable threadreq = null;
private static String dnsreq = null;
public static String dns = null;
private static String urlreq = null;
private static DataInputStream urlstream = null;
private static int savelen;
private static String savereq = null;
private static byte[] savebuf = null;
private static boolean midiplay;
private static int midipos;
public static String midi = null;
public static int midivol;
public static int midifade;
private static boolean waveplay;
private static int wavepos;
public static int wavevol;
public static boolean reporterror = true;
public static String errorname = "";

}

ricky4105
February 25th, 2011, 23:41
How hdo i make this work with pi i dont have Class30_Sub2_Sub1_Sub1.java

pixelpwn
February 26th, 2011, 01:33
sweeet as bro great tutorial

nmanpure
February 27th, 2011, 20:50
One problem a lot of people have is the - "Error retrying in # Time"* # being the time.. ..
Sometimes it is a simple fix, simply change the host you upload the .jar file to. A lot of hosts (Especially free ones) don't allow the clients to load. This was weird to me, but when i switched to a host like zymic it worked.. ..

It is a crying shame that zymics's MySQL doesn't allow ex-bond connections other wise it would be a very good host.

Turkey
March 29th, 2011, 18:56
can you fix signlink please ?