Runclient error.

Hi there,
I have ant, j2ee sdk and j2se sdk installed.
I've been recently trying to use the applictaion "runclient", whenever I try to use it I get an error that I've been unable to solve.
"Exception in thread "main" java.lang.NoClassDefFoundError: and"
This happens when I just do "runclient" or when I do "runclient -client (nameofappclient).jar -name (nameofappclient) -textauth".
My paths
ANT_HOME=C:\jakarta-ant-1.3
J2EE_HOME=C:\j2sdkee1.3.1
JAVA_HOME=C:\j2sdk1.4.2
PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\jakarta-ant-1.3\bin;C:\j2sdkee1.3.1\bin;C:\j2sdk1.4.2\bin;
APPCPATH=C:\Documents and Settings\Andy\Desktop\J2EE\CD FILES\j2ee_kit\02_j2ee\j2eetutorial\examples\ears\SavingsAccountAppClient.jar
CLASSPATH=.;C:\j2sdkee1.3.1\lib\j2ee.jar;C:\j2sdk1.4.2\lib\tools.jar;
I have a slight suspicion that the fix lies in my paths, but I'm almost certain that they are correct. Can anyone help me out?
Thanks.

runclient is a java program. Java programs don't like spaces in the path. I suggest you install the tutorial in a directory besides the desktop, because this causes the "Documents and Settings" directory, which contains spaces, to appear in APPCPATH.

Similar Messages

  • J2ee tutorial on Windows 98 - runclient error org.omg.CORBA:NO_PERMISSION

    I am using Win98...I have successfully run J2ee , deployement tool, and can run Web clients for the examples. However my runclient utility is giving errors.
    javax.naming.CommunicationException: org.omg.CORBA.NO_PERMISSION: minor code:
    0 completed: No
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at com.sun.corba.ee.internal.iiop.messages.ReplyMessage_1_2.getSystemExc
    eption(ReplyMessage_1_2.java:93)
    I am enclosing the codes for my .bat files.
    J2EE.BAT FILE CONTENTS:
    @echo off
    rem
    rem Set JAVA_HOME and J2EE_HOME before running this script.
    rem
    rem set JAVA_HOME to the path where you have Java 2 (JDK1.2) installed.
    rem
    rem set J2EE_HOME to the path where you have installed this package (EJB server).
    rem
    if not "%J2EE_HOME%" == "" goto CONT0
    echo ERROR: Set J2EE_HOME before running this script.
    goto END
    :CONT0
    if EXIST "%J2EE_HOME%\bin\setenv.bat" goto CONT1
    echo ERROR: Set J2EE_HOME to the path of a valid j2sdkee.
    goto END
    :CONT1
    call %J2EE_HOME%\bin\setenv.bat
    if not "%JAVA_HOME%" == "" goto CONT2
    echo ERROR: Set JAVA_HOME before running this script.
    goto END
    :CONT2
    if EXIST "%JAVA_HOME%\bin\java.exe" goto CONT3
    echo ERROR: Set JAVA_HOME to the path of a valid jdk.
    goto END
    :CONT3
    rem @echo on
    rem for win98 %JAVACMD% %LISTEN_OPTIONS% -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter -Dorg.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl -Djms.home=%JMS_HOME% -Dcom.sun.jms.service.jdbc.dbpath=%JMS_DB_PATH% -Djms.properties=%J2EE_HOME%\config\jms_service.properties -Djava.security.policy==%J2EE_HOME%\lib\security\server.policy -Djava.security.auth.login.config=%J2EE_HOME%\lib\security\login.config -Dcom.sun.enterprise.home=%J2EE_HOME% -classpath %CPATH% com.sun.enterprise.server.J2EEServer %*
    @echo on
    %JAVACMD% -D%SSL_A%=%SSL_B% -D%JAAS_A%=%JAAS_B% -D%LISTEN_A%=%LISTEN_B% -Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter -Dorg.xml.sax.driver=org.apache.crimson.parser.XMLReaderImpl -Djms.home=%JMS_HOME% -Dcom.sun.jms.service.jdbc.dbpath=%JMS_DB_PATH% -Djms.properties=%J2EE_HOME%\config\jms_service.properties -Djava.security.policy=%J2EE_HOME%\lib\security\server.policy -Djava.security.auth.login.config=%J2EE_HOME%\lib\security\login.config -Dcom.sun.enterprise.home=%J2EE_HOME% -classpath %CPATH% com.sun.enterprise.server.J2EEServer %
    cd c:\j2sdkee1.3\bin
    :END
    SETENV.BAT FILE CONTENTS:
    rem
    rem Set JAVA_HOME and J2EE_HOME before running this script.
    rem
    rem first include user-specified definitions.
    call %J2EE_HOME%\bin\userconfig.bat
    if "%JMS_HOME%" == "" set JMS_HOME=%J2EE_HOME%
    set LIBDIR=%J2EE_HOME%\lib
    set LOCALEDIR=%J2EE_HOME%\lib\locale
    set CLOUDSCAPE_INSTALL=%LIBDIR%\cloudscape
    set CLASSESDIR=%LIBDIR%\classes
    set JMS_CLASSESDIR=%JMS_HOME%\classes
    set J2EEJARS=%LIBDIR%\j2ee.jar
    set JAVATOOLS=%JAVA_HOME%\lib\tools.jar
    set JAVAHELPJARS=%LIBDIR%\jhall.jar
    rem JMS DB PATH must end in slash to specify a directory
    set JMS_DB_PATH=%J2EE_HOME%\repository\%COMPUTERNAME%\db\
    set SYSTEM_LIB_DIR=%LIBDIR%\system
    set JMS_RI_JDBC=%SYSTEM_LIB_DIR%\cloudscape.jar;%SYSTEM_LIB_DIR%\tools.jar
    set CLOUDJARS=%JMS_RI_JDBC%;%CLOUDSCAPE_INSTALL%\RmiJdbc.jar;%CLOUDSCAPE_INSTALL%\cloudclient.jar
    set CPATH=%CLOUDJARS%;%CLASSESDIR%;%JMS_CLASSESDIR%;%J2EEJARS%;%LOCALEDIR%;%J2EE_CLASSPATH%;%JAVATOOLS%;%JAVAHELPJARS%
    rem for win98 set JAAS_OPTIONS=-Djava.security.auth.policy=%J2EE_HOME%\lib\security\jaas.policy
    rem for win98 set SSL_OPTIONS=-Djavax.net.ssl.trustStore=%J2EE_HOME%\lib\security\cacerts.jks
    rem set LISTEN_OPTIONS=-Dcom.sun.CORBA.connection.ORBListenSocket=SSL:0,SSL_MUTUALAUTH:0,PERSISTENT_SSL:1060
    rem for win98 set JAVACMD=%JAVA_HOME%\bin\java -Xmx128m %SSL_OPTIONS% %JAAS_OPTIONS%
    set JAAS_A=java.security.auth.policy
    set JAAS_B=%J2EE_HOME%\lib\security\jaas.policy
    set SSL_A=javax.net.ssl.trustStore
    set SSL_B=%J2EE_HOME%\lib\security\cacerts.jks
    rem set LISTEN_A=-Dcom.sun.CORBA.connection.ORBListenSocket
    set LISTEN_A=com.sun.CORBA.connection.ORBSocketFactoryClass
    set LISTEN_B=SSL:0,SSL_MUTUALAUTH:0,PERSISTENT_SSL:1060
    @echo on
    set JAVACMD=%JAVA_HOME%\bin\java -Xmx128m
    RUNCLIENT.BAT FILE CONTENTS:
    @echo off
    rem
    rem Set JAVA_HOME and J2EE_HOME before running this script.
    rem
    rem set JAVA_HOME to the path where you have Java 2 (JDK1.2) installed.
    rem
    rem set J2EE_HOME to the path where you have installed this package (EJB server).
    rem
    if not "%J2EE_HOME%" == "" goto CONT0
    echo ERROR: Set J2EE_HOME before running this script.
    goto END
    :CONT0
    if EXIST "%J2EE_HOME%\bin\setenv.bat" goto CONT1
    echo ERROR: Set J2EE_HOME to the path of a valid j2sdkee.
    goto END
    :CONT1
    call %J2EE_HOME%\bin\setenv.bat
    if not "%JAVA_HOME%" == "" goto CONT2
    echo ERROR: Set JAVA_HOME before running this script.
    goto END
    :CONT2
    if EXIST "%JAVA_HOME%\bin\java.exe" goto CONT3
    echo ERROR: Set JAVA_HOME to the path of a valid jdk.
    goto END
    :CONT3
    @echo on
    %JAVACMD% -D%SSL_A%=%SSL_B% -D%JAAS_A%=%JAAS_B% -D%LISTEN_A%=%LISTEN_B% %VMARGS% -Djms.home=%JMS_HOME% -Djms.properties=%J2EE_HOME%\config\jms_client.properties -Djava.security.policy=%J2EE_HOME%\lib\security\client.policy -Djava.security.auth.login.config=%J2EE_HOME%\lib\security\login.config -Dcom.sun.enterprise.home=%J2EE_HOME% -classpath %CPATH%;%APPCPATH% com.sun.enterprise.appclient.Main %1 %2 %3 %4
    :END

    I am answering my own question, I have all the bat files to successfully run J2ee on windows 98. Mail me at [email protected]

  • Error by starting jdbcdemo jdbcimpl.jar

    I have download the sample code jdbcimpl.jar. By starting with "make", I got the following error message. Have an ideal ?
    /home/yuhui/j2ee-sample/jdbcdemo/jdbcimpl # make
    (cd client;java -classpath .:..:/usr/local/oc4j/j2ee/home/orion.jar:/usr/local/oc4j/j2ee/home/ejb.jar:/usr/local/oc4j/j2ee/home/jndi.jar:/usr/local/oc4j/j2ee/home/lib/classes12.zip Client ) Exception in thread "main" javax.naming.NoInitialContextException: Cannot instantiate class: com.evermind.server.ApplicationClientInitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.evermind.server.ApplicationClientInitialContextFactory]
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:175)
    at Client.main(Client.java:14)
    Caused by: java.lang.ClassNotFoundException: com.evermind.server.ApplicationClientInitialContextFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
    ... 4 more
    make: *** [runClient] Error 1

    Su,
    If I remember correctly, there hasn't been a "orion.jar" file in OC4J since the first version (1.0.2.2). For your information, the latest production version is 9.0.4 (also known as 10g -- don't ask me why :-).
    In any case, the "ApplicationClientInitialContextFactory" should be in the "orion.jar" file. Perhaps the "orion.jar" file is not located in your "/usr/local/oc4j/j2ee/home/" directory?
    However, I suggest you upgrade to the latest (production) versions of OC4J and java.
    Good Luck,
    Avi.

  • Runclient gives the following error message  :

    Dear all,
    please help as i am banging my head against the monitor trying to figure all these little things out. Currently, I am working through the j2ee tutorial. This uses the deploytool to package and deploy all files. however, when i try to run runclient from the command line, i get the following error message :
    Application threw an exception:java.io.IOException: converterApp.ear does not exist
    I cannot see wjy this should happen as the file converterApp.ear definately does exist. I have also added the application client file to the APPCPATH environment variable (as the tutorial instructs).
    Any help would be much appreciated
    Thanks

    r u sure that it's "converterApp.ear" and not "ConverterApp.ear " ..

  • Error - runClient two time

    I have run the Hello RMI for Java 1.5.
    First time it run good. But the second time i run it a my localhost the error is:
    Client exception: java.rmi.ConnectException: Connection refused to host:
    I think the host is bloqued or something like this...... any solution.
    The example is that is at the sun web.
    I have Win profesional 2000, and java 1.5
    regards

    Hello Allen,
    I am not sure what kind of waveforms you will be measuring, but I
    thought I would put some ideas out there until you can talk to your
    client.
    Assuming your two signals will be periodic and similar (same
    amplitude, frequency, shape), you can always use the Peak Detector VI
    to determine the different peaks and valleys. You can then subtract
    the resulting location arrays to determine the time shift between the
    two signals.
    Some data manipulation is required to get the shift into units of
    time. I have attached an example VI to help you get started.
    I hope this helps,
    Sean C.
    Applications Engineer
    National Instruments
    Attachments:
    TimeShift.vi ‏52 KB

  • Error in running EJB Client on a remote machine

    I delploy my beans and can run the EJB Client locally. However when I try to run the Client on another machine, there are errors.
    Here is the errors
    Syntax error
    Out of environment space
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/enterprise/appclient/Main
    I have follow the step in the j2ee tutorial and set the env variables according. Here is the bat file I write
    set APPCPATH=CBSAppClient.jar
    set VMARGS=-Dj2eelogin.name=guest -Dj2eelogin.password=guest123 -Dorg.omg.CORBA.ORBInitialHost=192.168.0.2
    runclient -client CBSApp.ear -name CBSClient -textauth
    Do anyone facing the same problem with me?
    And how can I solve the problems?
    This is really URGENT, please help

    You are running on Windows 9x or Me, right? The darn OS has 300 or so bytes allocated for environment by default.
    Try setting the Initial environment to 4096 in the Properties|Memory tab for the batch file. That will get rid of "Out of environment space". The syntax error is another matter; Windows (except NT and derivatives) shells do not allow '=' in an environment variables value. You cannot overcome that. Some software (Sybase for instance) interprets # as = just because of that. Unfortunately, the JVM doesn't take such an approach.
    Better, grab copies of Unix utilities for Windows (www.gnu.org) including the wonderful shell 'bash' and write .sh scripts, which are inherently more powerful.

  • Problem using runclient with j2ee

    Dear all,
    please help as i am banging my head against the monitor trying to figure all these little things out. Currently, I am working through the j2ee tutorial. This uses the deploytool to package and deploy all files. however, when i try to run runclient from the command line, i get the following error message :
    Application threw an exception:java.io.IOException: converterApp.ear does not exist
    I cannot see why this should happen as the file converterApp.ear definately does exist. I have also added the application client file to the APPCPATH environment variable (as the tutorial instructs).
    Any help would be much appreciated
    Thanks

    You must go to your diroctory where ACount.ear exist. Then you set up your classpath for the sub client application like :
    set Classpath= AcountAppliClint.jar
    to run application client do :
    runclient -client AccountEAR.ear -name Applicationclient -textauth
    by

  • Error when send file by RMI

    I take application RMI client, server.
    Client will auto print screen by 3 seconds, when send to server.
    Server delete picture old and update picture new.
    But client only send a first time, next time is throw Exception "java.io.IOException: Write error"
    Server_
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface IUpload extends Remote{
         public void close() throws RemoteException;
         public void sendData(byte[] data, int offset, int length) throws RemoteException;
         public void sendFileName(String fileName) throws RemoteException;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    import java.util.Date;
    public class UploadServer extends UnicastRemoteObject implements IUpload{
        public UploadServer() throws RemoteException {
              super();
         FileOutputStream fout = null;
         public void close() throws RemoteException {
              if(fout != null) {
                   try {
                        fout.close();
                   } catch (IOException e) {
                        e.printStackTrace();
         public void sendData(byte[] data, int offset, int length) throws RemoteException {
              if(fout != null) {
                   try {
                    fout.flush();
                        fout.write(data, offset, length);
                        fout.flush();
                   } catch (IOException e) {
                        System.out.println("Error sendData " + e);
                System.out.println("Nhan file " + (new Date()).toString());
         public void sendFileName(String fileName) throws RemoteException {
            File file = new File(fileName);
            if ( file.exists() ){  
                System.out.println("File nay da ton tai va da xoa");
                file.delete(); 
            else {
                System.out.println("File nay chua ton tai");
            if(fout == null) {
                   try {
                        fout = new FileOutputStream(fileName);
                   } catch (Exception e) {
                        System.out.println("Err sendFileName " + e);
    import java.rmi.Naming;
    import java.rmi.RemoteException;
    public class RunServer {
         public static void main(String[] args) throws RemoteException {
            //java.rmi.registry.LocateRegistry.createRegistry(8585);
            IUpload download = new UploadServer();
            try {
                Naming.rebind("Server", download);
                System.out.println("Khoi dong server thanh cong...");
            catch (Exception exp){
                System.out.println("Err " + exp);  
    Client_
    import java.awt.*;
    import java.awt.image.*;
    import java.io.*;
    import java.rmi.Naming;
    import javax.imageio.*;
    public class CaptureScreen {
        String outFileName;
        public CaptureScreen(String fileName) {
            outFileName = fileName;
        public void Send() throws Exception
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            Dimension screenSize = toolkit.getScreenSize();
            Rectangle screenRect = new Rectangle(screenSize);
            Robot robot = new Robot();
            BufferedImage image =
                    robot.createScreenCapture(screenRect);
            ImageIO.write( image, "jpg", new File(outFileName) );
            try {
                IUpload upload = (IUpload)Naming.lookup("//localhost/Server");
                upload.sendFileName(outFileName);
                FileInputStream fin = new FileInputStream(outFileName);
                byte[] data = new byte[8000];
                int lengthFile = fin.read(data);
                int offset = 0;
                while ( lengthFile != -1  )
                    upload.sendData(data, offset, lengthFile);
                    lengthFile = fin.read(data);
                upload.close();
                fin.close();
            catch (Exception exp){
                System.out.println( exp.toString() );
    public class RunClient {
        public static void main(String[] args) throws Exception
            while (true)
                try {
                    System.out.println("Waiting 3 seconds....");
                    Thread.sleep(3000);
                catch (Exception exp){
                    System.out.println("Err " + exp);    
                CaptureScreen screen = new CaptureScreen("screen.jpg");
                screen.Send();   
    }

    throw Exception "java.io.IOException: Write error"Who threw it, the client or the server? At what line of code?
    You'd be better off declaring those remote methods to also throw IOException and let it be thrown back to the client if it happens, rather than catching it silently inside the server. That way the client knows the server is failing and can made a decision about whether to continue.The client should also show the complete stack trace, not just the message.

  • Trouble in runclient on SavingsAccount example

    I am following the J2EE Tutorial. I'm on the
    j2eetutorial/doc/BMP2.html#63189
    part of the tutorial. Not sure what does
    Binding name:`java:comp/env/ejb/SimpleSavingsAccount` means. I didn't recompile the SavingsAccount example when using the "deploytool" I just open->file use the examples/ears/SavingsAccountApp.ear.
    Below is what my error looks like when I runclient
    Hope I can get some idea. Thanks.
    --Bob
    D:\j2eetutorial\examples\ears>runclient -client D:\j2eetutorial\examples\ears\SavingsAccountApp.ear -name SavingsAccountClient -textauth
    Initiating login ...
    Username = null
    Enter Username:guest
    Enter Password:guest123
    Binding name:`java:comp/env/ejb/SimpleSavingsAccount`
    Application threw an exception:java.lang.NoClassDefFoundError: SavingsAccountHom
    e
    Unbinding name:`java:comp/env/ejb/SimpleSavingsAccount`

    Hi Bob,
    1. Basically, I follow step by step and it work for me.
    2. Here is what I did
    ..:\j2eetutorial\doc\GettingStarted.html
    I install and set up as in this step and then do the saving account example and it work.
    3. All you need is go slowly. You might have forgot 1 step along the way. Good luck.
    --Paul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Error runing MIDlet's with Wireless Toolkit

    Hi
    I'm having problems executing MIDlet's. I'm using WTK2.1 and j2sdk1.4.2_04. When I try to run the examples in the wireless toolkit I get the following error:
    Error running executable C:\WTK21\bin\zayit
    java.net.BindException: Cannot assign requested address: JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
         at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
         at java.net.ServerSocket.bind(ServerSocket.java:318)
         at java.net.ServerSocket.<init>(ServerSocket.java:185)
         at java.net.ServerSocket.<init>(ServerSocket.java:97)
         at com.sun.kvem.Lime.runClient(Unknown Source)
         at com.sun.kvem.KVMBridge.runKVM(Unknown Source)
         at com.sun.kvem.KVMBridge.runKVM(Unknown Source)
         at com.sun.kvem.midp.MIDP$5.run(Unknown Source)
    Has anybody encountered this problem or know how to solve it? Any answers will be greately apreciated
    thanx
    christian

    I had the same problem. I simply allowed my firewall software to allow the C:\WTK21\bin\zayit application full access. Previously even when I disabled the firewall it still wouldnt work, until i did the above.
    Hope this helps

  • Unexpected Error - client$1 - pls help...

    Hi, I'm just started to set up my first app with Java Web Starter.
    I've solved al lot of problems and this one I can't find...
    Everything is going fine, he downloads the apps, start the installaten and then it stops with the error:
    Category: Unexpected Error
    client$1
    this is the code:
    import java.io.*;
    import java.net.*;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    public class client extends JFrame {
         private JTextField enter;
         private JTextArea display;
         ObjectOutputStream output;
         ObjectInputStream input;
         String message = "";
         public client()
              super( "client" );
              Container c = getContentPane();
              enter = new JTextField();
              enter.setEnabled (false);
              enter.addActionListener(
                   new ActionListener() {
                        public void actionPerformed (ActionEvent e )
                             sendData (e.getActionCommand() );
              c.add (enter, BorderLayout.NORTH);
              display = new JTextArea();
              c.add ( new JScrollPane ( display), BorderLayout.CENTER);
              setSize (300, 150);
              show();
         public void runclient()
              Socket client;
              try {
                   String IP = JOptionPane.showInputDialog ("Geef IP of host in");
                   display.setText ( "Attempting to make connection\n" );
                   client = new Socket (
                        InetAddress.getByName ( IP ), 5222 );
                   display.append ("Connected to: " +
                        client.getInetAddress().getHostName() );
                   output = new ObjectOutputStream(
                        client.getOutputStream() );
                   output.flush();
                   input = new ObjectInputStream(
                        client.getInputStream() );
                   display.append ( "\nGot I/O streams\n" );
                   enter.setEnabled (true);
                   do {
                        try {
                             message = (String) input.readObject();
                             display.append ( "\n" + message);
                             display.setCaretPosition(
                                  display.getText().length() );
                        catch ( ClassNotFoundException cnfex ) {
                             display.append (
                                  "\nUnknown object type received.\n" );
                   }while ( !message.equals ( "SERVER>>> TERMINATE") );
                   display.append ( "closing connection.\n" );
                   input.close();
                   output.close();
                   client.close();
              catch ( EOFException eof ) {
                   System.out.println ( "Server terminated connection" );
              catch (IOException e ) {
                   e.printStackTrace();
         private void sendData (String s)
              try {
                   message = s;
                   output.writeObject ( "CLIENT>>> " + s );
                   output.flush();
                   display.append ( "\nCLIENT>>>" + s );
              catch (IOException cnfex ) {
                   display.append(
                        "\nError writing object" );
         public static void main ( String[] args )
              client app = new client();
              app.addWindowListener(
                   new WindowAdapter() {
                        public void windowClosing ( WindowEvent e )
                             System.exit(0);
              app.runclient();
    And is this the right command to make the rar?: jar cvf client.jar client.class
    After that command I added a signature.
    Is this about classpaths or anything?
    This is the webstart log:
    java.lang.NoClassDefFoundError: client$1
         at client.<init>(client.java:22)
         at client.main(client.java:102)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Greetz

    I found the solution. I used RealJ als editor and compiler and it seems he makes 3 files. client.class client$1.class and client$2.class. I thought these where backup classes. I included this 3 files in my JAR file and everything is going fine :)

  • Runclient problem

    After runclient -client ConverterApp.ear -name ConverterClient -textauth
    I got: Binding name: 'java:com/env/ejb/SimpleConverter'
    Application threw an exception: java.lang.NoClassDefFoundError: ConverterHome
    I am using redhat linux8.0, J2ee1.3, jdk1.3.1_06, ant1.5.1
    Can anyone help me sort out this problem?
    Thanks

    How to set the APPCPATH?
    Have you set the APPCPATH environment variable to
    "ConverterAppClient.jar" ?
    Your error would suggest that you've skipped this
    step.
    HTH, Ben

  • Interesting compiler error....

    import java.net.*;
    import java.io.*;
    public class Client
         // Stores the client socket information.
         private Socket c_socket;
         // Stores a string to be send to the server for printing.
         private String lineToBeSent;
         // Gets strins from the client.
         private BufferedReader input;
         // Used to write strings to the server.
         private PrintWriter output;
         public static void main(String[] args)
              runClient();
         private void runClient()
                                   doing stuff here....
    }When I try to compile this code I get an error saying non static method runClient() cannot be referenced from a static context. What causes this? And is it possible to solve it without lumping all my code into the main method including variables (which works).

    Only static methods can be accesed from main since it is static. so make runClient() static and it will work. or else make a separate class ,say Client , add runClient() method to it and from main () create an object of class Client and call the method runClient. This way u won't have to make the method static.

  • Need help badly- Keep getting error: connection refused.

    I'm developing an online multiplayer game, and everytime I try to use the multiplayer capabilities I get this kind of error. I have created a mini-connection class just to test if my program is working right, and apparently not. I have not included disconnection object in the following classes, since they are unneccessary since I cannot connect in the first place. First I ran my Servertest.class, which runs up to "Waiting for Connection", then waits, then I ran my ClientTest.class, which always gives me the error at teh bottom of the page.
    Please tell me what is wrong with the following-
    import javax.swing.*;
    import java.awt.*;
    import java.util.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.event.*;
    import java.net.URL;
    import java.io.*;
    import java.net.*;
    public class Servertest {
    private ObjectInputStream input;
    private ObjectOutputStream output;
    private ServerSocket server;
    private Socket connection;
    public void Servertest() {
    public void runServer() {
    try {
    server = new ServerSocket( 12347, 100 );
    System.out.print( "Waiting for connection\n" );
    connection = server.accept();
    System.out.print( "Connected to: " + connection.getInetAddress().getHostName() );
    output = new ObjectOutputStream( connection.getOutputStream() );
    output.flush();
    input = new ObjectInputStream( connection.getInputStream() );
    System.out.print( "\nGot I/O Streams\n" );
    catch ( IOException ioException ) {
    ioException.printStackTrace();
    public static void main( String args[] ) {
    Servertest application = new Servertest();
    application.runServer();
    import javax.swing.*;
    import java.awt.*;
    import java.util.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.event.*;
    import java.net.URL;
    import java.io.*;
    import java.net.*;
    public class ClientTest {
    private ObjectInputStream input;
    private ObjectOutputStream output;
    private Socket client;
    public void ClientTest() {
    public void runClient() {
    System.out.println( "Attempting Connection" );
    try {
    client = new Socket( InetAddress.getLocalHost(), 12348 );
    System.out.println( "Connected to: " + client.getInetAddress().getHostName() );
    output = new ObjectOutputStream( client.getOutputStream() );
    output.flush();
    catch (EOFException eofException) {
    System.err.print( "Client Terminated Connection!" );
    catch (IOException ioException) {
    ioException.printStackTrace();
    public static void main( String args[] ) {
    ClientTest application = new ClientTest();
    application.runClient();
    When I run Server Test it shows: Waiting for Connection.
    When I run Client Test is show the following:-
    Attempting Connection
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
    at java.net.Socket.connect(Socket.java:452)
    at java.net.Socket.connect(Socket.java:402)
    at java.net.Socket.<init>(Socket.java:309)
    at java.net.Socket.<init>(Socket.java:153)
    at ClientTest.runClient(ClientTest.java:26)
    at ClientTest.main(ClientTest.java:41)
    Any help would be greatly appreciated!

    Your server listens on port 12347. Your client tries to connect to a different port. No server is listening on the other port, so the connection is refused. Solution: make client connect to port 12347.

  • Error in starting Adobe Bridge in Photoshop CS2

    I've just installed Photoshop CS2, however upon opening Adobe Bridge this error message appears " The application has failed to start because libagluc28.dll was not found. Reinstalling to application may fix the problem"
    I have reinstalled and click repair but to no avail
    I followed Adobe Support Knowledgebase solution and run CMD and this appears:
    c:Documents and Settings/Jesus M Ferraris>
    then i entered the command
    cacls c:\windows\installer /T /E /C /G administrators:F
    but an error message appears - 'cacls' is not recognized as an internal or external command, operable program or bathc file
    I also entered the next command
    cacls "c:\documents and setting\all users" /Y /E /C /G administrators:F
    still the same error as above appears, Please help, have I miss something or was my procedure correct...
    P4, 512ram, WXP 80gHD

    Very useful.
    Good Luck.
    My
    Si
    tes

Maybe you are looking for