1 2 Previous Next 24 Replies Latest reply: Sep 11, 2007 6:43 AM by 796254 Go to original post RSS
      • 15. Re: how can i create a 2D vector??
        807587
        so how can i set the classpath in *.java file??
        • 16. Re: how can i create a 2D vector??
          JosAH
          so how can i set the classpath in *.java file??
          It's got nothing to do with *.java files. You can pass the classpath as a command line argument
          when you start up the Java virtual machine. Suppose your Users.class file resides in a directory
          /foo/bar, i.e. the fully qualified path name of your class is /foo/bar/Users.class.

          When you start up your client class, say Client.class, you issue the following command:
             java -cp /foo/bar Client 
          kind regards,

          Jos
          • 17. Re: how can i create a 2D vector??
            807587
            oh!!after make a copy of the Users.class from the server application folder to the client application folder, it worked!

            the Users.class must also be placed in the same folder as the client.class ??
            • 18. Re: how can i create a 2D vector??
              JosAH
              oh!!after make a copy of the Users.class from theserver application folder to the client application
              folder, it worked!

              the Users.class must also be placed in the same folder as the client.class ??
              Not per se; it has to be located somewhere where your classpath points to. If the jvm can find your
              client.class (it should be capitalized), you could stick your Users.class there; but not necessarily.

              Suppose I keep my .class files in three directories: /foo, /bar and /boo/qwe. Also suppose that I want
              to run a class in directory /foo, say /foo/MyClass. I have to pass all those directories as a classpath
              list to the jvm as:
              java -cp /foo;/bar;/boo/qwe MyClass
              kind regards,

              Jos

              ps. using any *nix box, you'd substitute colons for those semi-colons ...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
              • 19. Re: how can i create a 2D vector??
                807587
                thank you very much!!!!!!!!!!!!!!!!but I think i will have some other problems very soon!!!!!!!!!
                this assignment must be handed in on tuesday or i will get zero mark!!!!!!!!!!
                • 20. Re: how can i create a 2D vector??
                  JosAH
                  thank you very much!!!!!!!!!!!!!!!!but I think i will have some other problems very soon!!!!!!!!!
                  this assignment must be handed in on tuesday or i will get zero mark!!!!!!!!!!
                  You've got a sticky '!' key ... ;-)

                  kind regards,

                  Jos

                  ps. an old sod's remark: if your assignment is due on Tuesday, you've started too late.
                  • 21. Re: how can i create a 2D vector??
                    807587
                    Doesn't "!" mean "NOT"?

                    /k1
                    • 22. Re: how can i create a 2D vector??
                      JosAH
                      Doesn't "!" mean "NOT"?
                      Yes, but only as a unary prefix operator ...

                      kind regards,

                      Jos~
                      • 23. Re: how can i create a 2D vector??
                        807592
                        Vector <Vector <String>> MyVector;
                        MyVector= new Vector <Vector <String>>();

                        MyVector is a 2D vetcor;
                        • 24. Re: how can i create a 2D vector??
                          796254
                          Why on earth did you resurrect a three year old thread?

                          %
                          1 2 Previous Next