This should sort your problem out...
 
Where the class path is:
 
C:\x\com\multigarmenjaya\coba
 

set PATH=%JAVA_HOME%\bin;%PATH%
 
set SP=development
set S1=%SP%/x\com\multigarmenjaya\coba/Someclass.java
set S2=%SP%/x\com\multigarmenjaya\coba/SomeOtherClass.java
set S3=%SP%/x\com\multigarmenjaya\coba/Etc.java
 
javac -classpath %CPATH% -sourcepath %SP% -d . %S1% %S2% %S3%
 
Save this to your desk top as a batch file - e.g. MyProject.bat - and it will create a new package hierarchy that matches the original and place all the compiled class files in the right places.
 
Regards,
 
Rick Alsopp.
 
----- Original Message -----
To: JDJList
Sent: Monday, February 03, 2003 9:23 AM
Subject: [jdjlist] Re: package and CLASSPATH

Being a bit of a newbie  I may be wrong but I think your directory structure must match the package name:

So the directory structure would be something like:

 

C:\x\com\multigarmenjaya\coba;

 

And the class path:

 

C:\x

 

 

Can anyone confirm this?

 

 

Kola

 

-----Original Message-----
From: Paul Franz [mailto:[EMAIL PROTECTED]]
Sent
:
01 February 2003 16:08
To: JDJList
Subject: [jdjlist] Re: package and CLASSPATH

 

You need to specify the -d parameter on the javac command line.

For example, javac -d c:\x\classes c:\x\*.java

Paul Franz

----- Original Message -----
From: "Lambok Sianturi"
<[EMAIL PROTECTED]>Date: Fri, 31 Jan 2003 09:40:15 +0700
To: "JDJList"
<[EMAIL PROTECTED]>Subject: [jdjlist] package and CLASSPATH

Hallo again,

I'm so thankful have find this mail list. :)

 

I'm now have another problem and question.

I have write a .java class, and I want to put the .class file in a package. So I add a package statement like this:

 

package com.multigarmenjaya.coba;

 

and the CLASSPATH = C:\x\classes;C:\x

 

in which C:\x is my working folder and C:\x\classes is an empty foder.

 

I try to compile the source but the package folder doesn't created. Instead the .class file exist in the working folder. Would someone please tell me where I'm going wrong ? Another question, if a CLASSPATH variable contains more than one folders and we compile a java source wich contains package statament, in which folder the package will be located ?

 

Thanks in advance.

 

::Lambok Sianturi::
==(OFFICE BOY)==
PT. Multi Garmenjaya
Jl. Krawang No. 1
Bandung - Jawa Barat
Phone : 62 22 7272222

____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________ --

_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com

Meet Singles

____________________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm Be respectful! Clean up your posts before replying ____________________________________________________

____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________
____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________

Reply via email to