Wednesday, 7 August 2013

Linux javac command erroring on wildcard in classpath

Linux javac command erroring on wildcard in classpath

I am running Windows 7 with java version 1.6.0_31-b05 on my pc and my
computerlab's network Linux (Fedora, possibly version 13), is running java
version 1.6.0_35-b10.
I have a C:\myproject (et al) directory, with src, lib, and bin
subdirectories. The src folder contains all of the source code in a tree
structure, that corresponds to the java packages. The lib directory
contains jar files. I have re-created the tree in Linux, under
../myproject (et al). When I attempt to compile in Dos, from the
..\myproject\src directory, with the first command below, it works fine.
When I attempt to compile in Linux, from the ../myproject/src directory, I
get the message incorrect classpath: ../lib/*.
javac -cp ".;../bin;../lib/*" -d ../bin
org/unlv/schillerlab/motif_diversity/step02/*.java
javac -cp ".:../bin:../lib/*" -d ../bin
org/unlv/schillerlab/motif_diversity/step02/*.java
The computerlab network location is accessible from both Dos and Linux. In
Linux, I first created the ../myproject/src, ../myproject/lib, and
../myproject/bin directories. Then, in Dos, I copied the necessary files
from my C drive to ../myproject/src01 and ../myproject/lib01. Then, in
Linux, I used the cp -av command to populate src and lib from src01 and
lib01, respectively. Therefore, I don't think there is a Linux permissions
problem.
In Linux, from the ../myproject/src location, issuing ls ../lib shows that
the (sibling) lib directory does contain the jar files. I have tried also
tried the Linux javac command with an absolute path to the lib directory;
no joy. Similarly, I tried removing the quote (") marks from the -cp
clause; no joy. Could the problem be that I am running an old version of
Fedora? If not, does any one have a hypothesis as to what the problem is?

No comments:

Post a Comment