Java classpath question and how to run a program from command line?



Hi:

Sorry. I am confused about how to run a Java class from command line(I
can run it from Eclipse). I use Cygwin on Windows 7.
This Java source file is /cygdrive/d/project/src/A/B/C/
MainWindow.java
The class file(MainWindow.class) is located at /cygdrive/d/project/bin/
A/BC/MainWindow.class (compiled by Eclipse)
MainWindow.java package is:

package A.B.C;

The following JAR files are also needed to run the program: /cygdrive/
d/project/libs/*.jar

In Cygwin command window, "echo $CLASSPATH" does not show anything, so
CLASSPATH has not been set.

Now in Cygwin command window, I am at /cygdrive/d/project/bin, I typed
the command below, but it didn't work:

java -classpath /cygdrive/d/project/libs;. A.B.C.MainWindow

Can you help me on how to run it from the command line?

I also tried to set up CLASSPATH in .bashrc file beforehand:
export CLASSPATH=/cygdrive/d/project/libs/;/cygdrive/d/project/bin
I am confused: should I separate them by ";" or ":" ?
I tried both ways, none of them is working: ". .bashrc" command
complains or no complains, but MainWindow still cannot be run.

Thank you very much.
.



Relevant Pages

  • Re: [TIN] Reading groups from active file
    ... "Primary DNS suffix of this computer:". ... do a "ipconfig /all" command (in a Command Prompt ... Windows utilities and the Windows "Command Prompt" window and its ... Cygwin - have 'set', ...
    (news.software.readers)
  • RE: re-setting boot partition
    ... Description of the Windows 2000 Recovery Console ... For a Microsoft Windows XP version of this article, ... MB of hard disk space on your system partition to hold the Cmdcons folder ... Windows NTBoot Console Command Interpreter. ...
    (microsoft.public.win2000.setup_upgrade)
  • RE: Win2000 Upgrade to SP3 Express Setup error.
    ... Start your computer with the Windows Setup floppy disks, ... MB of hard disk space on your system partition to hold the Cmdcons folder ... Windows NTBoot Console Command Interpreter. ... you cannot copy a file from the local hard disk to a floppy disk. ...
    (microsoft.public.win2000.setup_upgrade)
  • Re: printing single quotes
    ... The point is that it's nothing to do with Windows per-se, ... If you put the whole gawk script in quotes, you will have to escape double ... shell quotes do not protect parameter and command substitution. ... Here you're invoking cygwin to run a *command*. ...
    (comp.lang.awk)
  • Re: gnome-list Digest, Vol 109, Issue 9
    ... You got a blinking command prompt. ... Prior to Mac and Windows, ... gnome3, yet another negative feedback ... DE developers, you have my support. ...
    (GNOME)