Re: Newbie: -classpath option of java does not load the content of the jar file
- From: Nigel Wade <nmw@xxxxxxxxxxxx>
- Date: Wed, 27 Jun 2007 17:03:42 +0100
printdude1968@xxxxxxxxx wrote:
On Jun 27, 11:59 am, Guy <guyhare...@xxxxxxxxx> wrote:
Yes everything is located in the same directory:
j.class
j.java
ojdbc14.jar
META-INF
oracle
Your web site has been blocked by our MIS departement. Dont know why.
If everything is in the same directory, then you need to specify the
path of the directory when you are specifying the classpath.
Otherwise, I think, java will look on your platform path or
classpath. Since it would appear that you have everything in the same
space, why not just say -cp ./ and be done with it?
That wouldn't look in jar files in ".", only class files.
What is required in the classpath is both "." and the jar-file. The arguments to
the java command must precede the main class as everything on the command line
following the main class is passed to the main class in the args array.
java -classpath .:ojdbc14.jar j
should work, although Windows command shell may require some quotes around the
argument.
--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@xxxxxxxxxxxx
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
.
- Follow-Ups:
- References:
- Newbie: -classpath option of java does not load the content of the jar file
- From: Guy
- Re: Newbie: -classpath option of java does not load the content of the jar file
- From: Roedy Green
- Re: Newbie: -classpath option of java does not load the content of the jar file
- From: Guy
- Re: Newbie: -classpath option of java does not load the content of the jar file
- From: Guy
- Re: Newbie: -classpath option of java does not load the content of the jar file
- From: printdude1968@xxxxxxxxx
- Newbie: -classpath option of java does not load the content of the jar file
- Prev by Date: Re: XML JDOM problems
- Next by Date: Re: If with colors
- Previous by thread: Re: Newbie: -classpath option of java does not load the content of the jar file
- Next by thread: Re: Newbie: -classpath option of java does not load the content of the jar file
- Index(es):
Relevant Pages
|