JADE (NetBeans IDE 6.8) and Rev Studio 4.0

zeeshan aamir shani.runrev at gmail.com
Fri Mar 19 18:54:59 EDT 2010


Hi Mark,
Thanks,

I test with this changes in command ( put shell("Server 6800") into tResult)

 this command will work but it gives this error.

        java.lang.NoClassDefFoundError: Server (wrong name: Server/Server)
        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(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$000(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Server.  Program will exit.Exception in
thread "main"



Is it problem that this code is in JADE(Netbeans) and not work in simple
Java.
//Code for Server.java  (JADE)
package Server;

import java.io.DataInputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {
public static void main (String[] args) throws IOException{
ServerSocket server=new ServerSocket(6800);
System.out.println("Server Started");
Socket client= server.accept();
DataInputStream in= new DataInputStream(client.getInputStream());

System.out.println("Client Syas: " + in.readUTF());
}
}

.................................................................................................
/7code for client Socket. (JADE)


package Cleint;

import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;

public class Cleint {
public static void main (String[] args) throws IOException {
Socket client= new Socket("localhost",6800);
System.out.println("Connected to server");
DataOutputStream out = new DataOutputStream(client.getOutputStream());
out.writeUTF ("AllowServer");


}

}
.....................................................................


Regards,
Shani


On Fri, Mar 19, 2010 at 11:37 PM, Mark Wieder <mwieder at ahsoftware.net>wrote:

> zeeshan-
>
> Friday, March 19, 2010, 3:01:26 PM, you wrote:
>
> >    put shell("Server 6800") into tResult
>
> Unless you've somehow compiled "Server" as an executable binary file,
> you'll need to launch it as
>
> put shell("java Server") into tResult
>
> otherwise you'll end up with something in tResult like "'Server' is
> not recognized as an internal or external command, operable program or
> batch file."
>
> --
> -Mark Wieder
>  mwieder at ahsoftware.net
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list