For Programmers: Free Programming Magazines  


Home > Archive > Java Help > October 2004 > Finding source files..









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Finding source files..
relaxedrob@optushome.com.au

2004-10-12, 3:57 am

Hi All!

These are the source files I have..

robertmarkbram - ~/SUNWappserver/apps/cardService
$ls src/cardservice/
CardServiceImpl.java CardService.java

But I cannot compile them from my current directory, even while
specifying sourcepath AND classpath..

robertmarkbram - ~/SUNWappserver/apps/cardService
$javac \
> -sourcepath src \
> -classpath src \
> -d ./build \
> cardservice/*.java

error: cannot read: cardservice/*.java
1 error

But if I put "src/" in front of my classes it compiles without
classpath or sourcepath.

robertmarkbram - ~/SUNWappserver/apps/cardService
$javac \
> -d ./build \
> src/cardservice/*.java


This is the version I am using:

robertmarkbram - ~/SUNWappserver/apps/cardService
$java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)

Can anyone explain if I am doing something wrong or is this a bug in
Java? It is driving me crazy - I should be able to specify sourcepath
and not have to put directories on my class names!

Any advice is most welcome!

Rob
:)
andreas kinell

2004-10-12, 8:57 am


> Hi All!
>
> These are the source files I have..
>
> robertmarkbram - ~/SUNWappserver/apps/cardService
> $ls src/cardservice/
> CardServiceImpl.java CardService.java
>
> But I cannot compile them from my current directory, even while
> specifying sourcepath AND classpath..
>
> robertmarkbram - ~/SUNWappserver/apps/cardService
> $javac \
> error: cannot read: cardservice/*.java
> 1 error
>
> But if I put "src/" in front of my classes it compiles without
> classpath or sourcepath.
>
> robertmarkbram - ~/SUNWappserver/apps/cardService
> $javac \
>
> This is the version I am using:
>
> robertmarkbram - ~/SUNWappserver/apps/cardService
> $java -version
> java version "1.4.2"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
> Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
>
> Can anyone explain if I am doing something wrong or is this a bug in
> Java? It is driving me crazy - I should be able to specify sourcepath
> and not have to put directories on my class names!
>
> Any advice is most welcome!
>
> Rob
> :)


maybe some problem because cardService is a package.
is it?

andreas


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com