Compiling Multiple Files using JDK1.3.1

C:\jdk1.2.2\bin\javac -d C:\classes -classpath <some classpath> C:\release\*.java
The above works fine in the CMD promt of WIN2K server.
C:\jdk1.3.1\bin\javac -d C:\classes -classpath <some classpath> C:\release\*.java
This doesn't work, same error type is thrown for multiple files: "cannot resolve symbol".
I think the problem seems to be in the autocompile, i.e while compiling a java file, the javac compiles all the import files (if class files don't exist). This happens in JDK1.2.2, but not in JDK1.3.1
Any pointers to solve this problem.
Thankx

If your class uses another class from a package which is not compiled already
it will throw this error. To overcome this just include the path to all the packages
that your class uses in your classpath.
Fx,
you want to compile xxx.java and yyy.java in c:\javatest\
But to compile these above two files you also have to compile files
in c:\javatest\test\files\aaa.java and c:\javatest\test\files\bbb.java
then you should have c:\javatest\ in your classpath.
hope this helps.
cheers.Also you should have the follwing import statements in xxx.java and yyy.java
import test.files.aaa;
import test.files.bbb;
aaa.java and bbb.java can be compiled from c:\javatest\test\files\
but alternatively, if you don't have the files compiled...when you compile
xxx.java or yyy.java they should be compiled automatically, provided you
have included the proper import statements.
All the best !

Similar Messages

  • Compiling multiple files?

    This is kind of a theory question.
    when you compile a file that has references to other files(all files are in the same package), isnt the compiler supposed to check that those other files have been compiled and if they are not, then isnt it supposed to compile them as well. For example;
    public class MainFrame {
    public MainFrame () {
    super ();
    // init ();
    //testUnits ();
    init2 ();
    private void init2 () {
    FDocument document = new FDocument ();
    FPage page = new FPage ();
    FFrame rectangle = new FFrame ();
    FParagraph header = new FParagraph ();
    FFrame pageFrame = new FFrame ();
    FFrame footer = new FFrame ();
    FFrame testRectangle = new FFrame ();
    FFrame childRectangle = new FFrame ();
    when I compile MainFrame, should it not also compile FDocument, FPage, FFrame etc as well?
    at present I get the errors cannot resolve symbol: class FDocument etc.
    As well, where I have a file FPrintObject which contains a reference to another file FPage such as
    public FPrintObject(FPage pg){
    shouldnt it compile FPage when I compile FPrintObject?
    I get the same cannot resolve symbol error, and they are definitely in the same package.
    any suggestions? Thanks alot in advance. OZ!!
    PS I have to reference that code snippet, it was from an excellent article in Javaworld autjhored by Jean-Pierre Dube "Printing in Java".

    Ok, thanks alot guys, looks like I was mistaken in my understanding of how the compiler worked, That pretty much cleared it up. It looks like the easiest way to do it is through and IDE(I' m using JCreator LE) by using the build batch function. If I wanted to do it through the Dos Prompt, How would I do it?
    At present I would normally do;
    c:Print>c:\j2sdk1.4.0-rc\bin\javac MainFrame.java
    as quoted above
    No, only the file(s) you specify on the javac command> is(are) compiled. If you want to compile multiple
    > files at a time, then you need to specify them all as
    > arguments to the javac command.
    >
    so what would be the entry in order to specify them all as arguments to the javac command?
    using the example above if I also wanted to compile FDocument, FPage, FFrame.
    with regard to classpath, I have it set to
    path=c:\windows;c:\windows;c:\windows\command\j2sdk1.4.0-rc\bin
    Thanks, you're help is great.

  • Load multiple files using the same data load location

    has anybody tried loading multiple files using the same load locations. I need to do this as the data in these multiple files will need to be exported from FDM as a single export file. the problem i am facing is more user related. since these files will be received at different points of time, users will need a way to tell them what has been loaded and what is yet to be loaded.
    is it possible to throw a window on the web broser with OK and Cancel buttons from an event script?
    any pointers to possible solutions will be helpful

    was able to resolve this. the implementation method is as follows
    take a back up of previously imported data in the befcleardata event script. then in the beffileimport event append the data to the import file. there are many other intricacies but this is the broad implementation logic. it allowed my users to load multiple files without worrying about append or replace import type choices

  • How to upload multiple files using af:inputfile

    Hi,
    I am using J dev 11.1.1.3. I have a requirement wherein i need to upload multiple files using af:inputfile. Can we do in it ADF ? Is there any other work around to implement the same. I have checked previous questions but not able to find proper solution for this.
    Any pointer in this regard is highly helpful.
    Regards,
    Kalyan

    You have to do this your self by either (as vinod said) using a different component (not present in adf) or implementing this:
    1) allow the user to select multiple filenames (somehow)
    2) zip them together
    3) upload the zip
    4) unpack the zip on the server
    5) work with the files
    Timo

  • How to upload multiple files using wicket

    Hai,
    how to upload multiple files using wicket at a single browse.
    any suggestion?
    Thanks in advance

    You have to do this your self by either (as vinod said) using a different component (not present in adf) or implementing this:
    1) allow the user to select multiple filenames (somehow)
    2) zip them together
    3) upload the zip
    4) unpack the zip on the server
    5) work with the files
    Timo

  • URGENT: Is it possible to upload multiple files using STRUTS

    Hi,
    Is it possible to upload multiple files using STRUTS.
    I am able to upload a single file. But how do i upload multiple files ??
    upload.jsp
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html>
    <head>
    <title>New Page 1</title>
    </head>
    <body>
    <html:form action="/secure/uploadFile.do" enctype="multipart/form-data" method="POST" type="com.smartstream.webconnect.user.actions.UploadActionForm">
    <p>File to upload
    <html:file property="fileUpload" size="20"/></p>
    <p><html:submit/></p>
    </html:form>
    </body>
    </html:html>
    UploadAction.java
    public class UploadAction extends BaseAction {
        Logger log = Logger.getLogger(AttachMessageAction.class);
        public ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ActionException {
            System.out.println("executeAction of UploadAction");
            UploadActionForm uploadActionForm = (UploadActionForm) form;
            int fileSize = uploadActionForm.getFileUpload().getFileSize();
            System.out.println("uploadActionForm.getFileUpload().getFileSize() = " + uploadActionForm.getFileUpload().getFileSize());
            byte buffer[] = new byte[1024];
            try {
                BufferedInputStream bufferedInputStream = new BufferedInputStream(uploadActionForm.getFileUpload().getInputStream());
                FileOutputStream fos = new FileOutputStream("s:\\uploaded\\" + uploadActionForm.getFileUpload().getFileName());
                int read;
                while ( (read = bufferedInputStream.read(buffer,0,buffer.length)) != -1) {
                    fos.write(buffer, 0, read);
                fos.flush();
                fos.close();
                bufferedInputStream.close();
                return mapping.findForward("success");
            } catch (IOException e) {
                e.printStackTrace();
                return mapping.findForward("error");
            }catch(OutOfMemoryError o){
                o.printStackTrace();
                System.out.println("o.getMessage() " + o.getMessage());
                return mapping.findForward("error");
    UploadActionForm.java
    public class UploadActionForm extends ActionForm{
        private FormFile fileUpload;
        private byte[] fileContent;
        public FormFile getFileUpload() {
            org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0;
            return fileUpload;
        public byte[] getFileContent() {
            return fileContent;
        public void setFileUpload(FormFile fileUpload) {
            this.fileUpload = fileUpload;
        public void setFileContent(byte[] fileContent) {
            this.fileContent = fileContent;
    }--Bhupendra Mahajan

    Yes, you could try using the multipart handler...
    But I have a better idea...
    Determine the maximum number of file uploads that the
    user can do at one time. I mean, you can't
    realistically have the user upload a million files at
    one time. So say the max is 20. So you create your
    action form class with 20 FormFile fields called file1
    to file20.
    Then when you dynamically create your page, you
    dynamically create the specified number of file fields
    and 1 hidden field called "totalFiles" which contains
    the number of file fields you created. This should be
    an int field in the form bean.
    Then when you do your action processing, you just loop
    thru the totalFiles... Or well, actually, you may not
    need that at all. You could just check all the
    FormFile fields and whatever ones aren't null contain
    files.But what about UploadActionForm.java[b]
    How do i have exact mapping of the HTML form in this file ??
    --[b]Bhupendra Mahajan

  • Upload multiple file using csom

    how to upload multiple files programmatically using csom and store in sharepoint list
    Blitz

    Hi,
    I have seen a similar post from you, you want to upload multiple file using csom.
    You can take a look at the following thread:
    http://social.msdn.microsoft.com/Forums/en-US/edd3bd86-417b-4174-9627-5a714c733256/upload-multiple-files-using-client-context-object-model?forum=sharepointdevelopment
    I would suggest you to open only single thread for single issue. You can discuss your problem in the above thread only.
    Thank you for your understanding and support.
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Renaming multiple files using automator.

    hello. i am renaming multiple files using automator. now when i import the images they are in sequential order like dscn001, dscn002 etc... i want to rename it to 001 my pic, 002 my pic, etc...
    i am choosing the sequential renaming option. after importing the pics to automator i see to it that i sort them by name so that the new names i provide are in the order of the actual file names ie. 001mypic = dscn001, 002mypic = dscn002, etc..
    however, it seems that inspite of sorting then my name they are being renamed randomly. what should i do. this is distrubing the cronological order of the pics.
    thanks in advance
    Neerav

    Well, whenever I rename in sequential order (presorted or otherwise), that is exactly what happens, so I am not sure what is causing your particular problem. If you look at the results of sorting before the rename, you should see that the items are renamed in that order - although the way that they are sorted after the rename may be different. You can easily see this sorting by just adding a prefix/suffix and looking at the differences in how the lists are sorted (sorting by name (numerically) may give you different results). Check out this Apple document to see if this is what is happening.

  • Zip and extract multiple files using java program

    how can i zip and extract multiple files using java program.

    Hi,
    Look into the java.util.zip and java.util.jar they expose methods to manipulate zip and jar files.

  • Error while compiling java file using J2SE 1.5.0

    Dear Sir,
    I'm getting the following error while compiling the java file.The code is also given.
    package test;
    public class TestRowSet {
    public TestRowSet() {
    "TestRowSet.java": cannot access java.lang.Object,bad class file: D:\Program Files\Java\jdk1.5.0\jre\lib\rt.jar\java\lang\Object.class,class file has wrong version 49.0, should be 48.0,Please remove or make sure it appears in the correct subdirectory of the classpath. at line 4, column 1
    Please help me out.
    --Suketu Naik.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    But I'm compiling within "Borland JBuilder 9.0". I've
    set the JDK path of the current project to point to
    the path of JDK 1.5.0 . I've also tried to compile at
    command prompt with "javac". I'm getting the same
    error of "Undefinedclassloader" with long StatckTrace.
    I don't know anything about JBuilder either. If you use the command prompt and enter the full path to the 1.5 javac.exe then that will prove whether the issue is using an older javac or not. For example "c:\j2sdk1.5.0_01\bin\javac HelloWorld.java"

  • Solution for undefined Sym when compiling multiple files

    Hi, I'd like to suggest a solution for the common 'undefined sym' problem.
    Combining all the source files into one file solves the problem quite effectively.
    I'm not sure if this is due to gcc, or some name mangling scheme that's throwing
    the avm2 off but in any case, when I compile multiple c++ files 'separately', ie
    g++ (or gcc) A.c B.c C.c -O3 -DOSX -DRT_AS3 -swc -o library.swc
    results in
    1) undefined _main if main() is not in C.c (but in another file which is not last in the list),
    and
    2) calling ANY function in A.c or B.c from C.c results in an "undefined sym" runtime error.
    When combining the files into one unit however, and then compiling that unit works fine:
    on linux/darwin:
    cat A.c B.c C.c > unit.c
    g++ (or gcc) unit.c -O3 -DOSX -DRT_AS3 -swc -o library.swc
    hope this helps someone.
    J

    Perhaps I didn't explain my question well enough. We already are using a dependency management system (based on jam - blows the doors off of make). However, some of our libraries that we build consist of many ( 100+ ) individual .cpp files, and there are many of these libraries in a dependency hierarchy. Invoking the compiler once per file seems to be a source of considerable overhead. I want to invoke the compiler only twice per library, no matter how many individual .o files need to be rebuilt - once to rebuild the out of date subset of .c files (one "-c" style invocation, no link step, generate object files only), and once to link the rebuilt .o files and the unchanged .o files into the target shared object.
    However, the compiler will not accept multiple "-o" flags, forcing us to invoke it once per file if we want to specify an output name. I want an option (or a workaround) that will allow us to specify multiple source files, and the output name for each in one compiler invocation. One approach could be a flag that could be used repeatedly to specify source file name / object file name pairs on the command line. Another would be a flag that set a derivation rule by which the output object file name would be generated from the input source file name.
    Repeatedly invoking the entire toolchain to compile one file of many, when the include dependency graphs, symbol tables, template instantations, etc. of each of those files are certain to overlap to a great degree, seems to me like a huge waste. Why must we reparse std::basic_string for each source file if we know the build environment is the same, just because we want to specify the output filename?

  • Sending multiple files using file adapter

    The scenario I am implementing requires multiple files of different names to be picked up by my adapter. I dont want to create different file adapters for each file. I tried using the "Additonal Files" option in the sender file adapter in my configuration, but am not able to do the same. Any idea as to how the configuration for multiple files for same adapter isto be done?

    Hi bhavesh
    Fundamental of adapter configuration is you have to give valid xml structure to XI, so you will define your configuration according to your requirement.
    for .xml you have file as a message protocol while for .csv you have file content conversion as a message protocol.
    So you have to define adpater configuration for sender side for one type of structure.
    So you need a different communication channel for different extentions.
    for diffrent strcutures,having same extention, you can execute this.
    Please make me clear that what is your scenario?
    why you need to pick all files under a directory with a same communication channel?
    Regards
    Piyush

  • How to compile Java files using Ant in Eclipse

    Hi All ,
    I would like to compile all Java files using Ant in Eclipse.Since am very new to Ant and Eclipse can someone help me to create a build.xml file and let me know how to compile all the java files.
    For ex , I have placed my java files inside the path C:\HEC\Terab.Initially the Terab folder holds 7 jar files which i had decompiled using JD compiler and placed the unzipped 7 folders (which contains the java files ).Now i have imported the HEC project into Eclipse using New ->Project ->Java Project.after importig it throwed me an error saying missing jar files.again i copied the jar files and placed inside Terab folder with other 7 folder.
    Now How i can compile the java files and convert in to class files.Then after compiling the files i will again need to jar all the 7 folder.
    Please tell me the steps i need to follow.How to write an build.xml file ? where i should keep it ? only one build.xml file is enough or should i write 7 build.xml file for each folder ? Please help me out...
    Thanks & Regards
    Kar1983

    put it another way, what I am trying to do is to compile David Brackeen's ch 18 code from his book. The java sourse files can be downloaded here:
    http://www.brackeen.com/javagamebook/
    my question is that how would I complie all of these file so that I can get the program in ch18src\src\com\brackeen\javagamebook\test\ to run?

  • Failed to load multiple files using theMgr.createLocalFileInputStream

    Hi
    I am using 2.3.8 and having trouble with putting multiple files to the container using XmlInputStream.
    I have hundreds of documents in 'output' folder from my project root, and I was able to load them by using other signature - reading each line from each file via BufferedReader.
    However, if I switch to XmlInputStream, the first putDocument() is successful but I get an error an XmlException at the second iteration.
    container = theMgr.createContainer(theContainer, config);
    XmlUpdateContext updateContext = theMgr.createUpdateContext();
    Transaction dbtxn = environment.beginTransaction(null, null);
    txn = theMgr.createTransaction(dbtxn);
    Iterator filesIterator = files2add.iterator();
    while (filesIterator.hasNext()) {
    File file = (File) filesIterator.next();
    String docName = fileNameToDocName(file);
    XmlInputStream theStream = theMgr.createLocalFileInputStream(file.getName());
    container.putDocument(docName,
    theStream,
    updateContext,
    null);
    com.sleepycat.dbxml.XmlException: Error: The resource does not exist: malformed or non-existent stream source, errcode = INVALID_VALUE
         at com.sleepycat.dbxml.dbxml_javaJNI.XmlContainer_putDocument__SWIG_5(Native Method)
         at com.sleepycat.dbxml.XmlContainer.putDocument(XmlContainer.java:405)
         at com.sleepycat.dbxml.XmlContainer.putDocument(XmlContainer.java:77)
         at com.expd.arch.persistence.BerkeleyTestCase.loadXmlFilesViaStream(BerkeleyTestCase.java:85)
    The second document failing looks like this - nothing wrong
    <?xml version="1.0" encoding="UTF-8"?>
    <consol version="0">
    <import-file-number>21345</import-file-number>
    <ownership-location>LAX</ownership-location>
    <id>0</id>
    </consol>
    Can someone tell what's wrong in my code?

    Hello,
    The error is indicating something wrong with the file name or location, not the content. Try verifying that the file name passed to createLocalFileInputStream() is in good shape and refers to a regular file with permission to read. If that looks OK, there's a small chance you need to explicitly delete the XmlInputStream between calls. That should not be necessary, because the putDocument() call should consume it, but it does not hurt.
    Regards,
    George

  • Create a Multiple Files using PL-SQL

    Hi Experts,
    I have a table which contains 360 records and want to create multiple files with each file containing 12 records.
    I tried to use the below code, however was unsuccessfull..
    Please help!!!!
    DECLARE
       num      NUMBER             := 1;
       f_file   UTL_FILE.file_type;
       row_sm   NUMBER             := 0.00;
    CURSOR c_cur
       IS
          SELECT   customer_key, all_columns_concat
              FROM demo;
    c_rec    c_cur%ROWTYPE;
    BEGIN
       OPEN c_cur;
       LOOP
          FETCH c_cur
           INTO c_rec;
         EXIT WHEN c_cur%NOTFOUND;
          WHILE num = c_rec.file_num
          LOOP
             f_file := UTL_FILE.fopen ('DM_DIR', 'FILE_' || num, 'w', 3267);
             num := num + 1;
          END LOOP;
          UTL_FILE.put_line (f_file, c_rec.all_columns_concat);
          row_sm := c_rec.sum_row + row_sm;
       END LOOP;
       UTL_FILE.fclose (f_file);
      CLOSE c_cur;
    END;
    Regards,
    RaviR.

    Thanks Ramin,
    Your Code really helped. I am now not getting no errors and files are also being created. However, if I replace the UTL_FILE with DBMS_OUTPUT, I get below output. In your code i replaced 12 with 3. Hence its dividing after 3 rows. (with 1st row duplicated)
    Output
    1
    1
    2
    3
    ========================================
    4
    4
    5
    6
    ========================================
    7
    7
    8
    9
    ========================================
    10
    10
    11
    12
    ========================================
    13
    13
    14
    15
    ========================================
    16
    16
    Now my concern is that i my table I have a flag which determines the seperation...
    Column1
    File_Num
    1
    1
    2
    1
    3
    1
    4
    2
    5
    2
    6
    2
    7
    3
    8
    3
    9
    3
    10
    3
    11
    3
    Hence if the file_Num is 1 it will go to File1, file_num=2 will be written to File2 and so on.
    Please help me to get this logic.
    Thanks in advance.
    Regards,
    RaviR

Maybe you are looking for

  • Cross Reference paragraphs from Word to imbedded Visio document

    I have a word document with about 200 steps included which are cross referenced throughout Word.  I have a Visio flowchart that serves as a visual picture of these steps, but requires manual input and adjustment when we adjust the steps in Word.  I d

  • Authorisation for reversal of service entry sheet

    Hi, I want to restrict some of the users to do reversal of service entry sheet, hw can i do this? what is the authorisation object / field to restrict this Regards, Kalpesh

  • How to restrict special characters for a specific column

    Dear gurus, i have a table emp with a field field_1 in this particular field_1 is an address column where data can be like '12 st first floor' but suppose mistakenly user has entered the data as '12 st first floor & ' it should be restricted (not usi

  • ABAP Proxy to SOAP using PI

    Dear Friends, I have the requirement ABAP Proxy to SOAP using PI. In R/3 I had generated the proxy , after that what I need to do. Please suggest me. Regards, Shalini Shah

  • Connecting 2 G5's Via Firewire

    Is it possible to connect to G5 towers via a Firewire 400 cable, and have the 2 Hard drives in G5 A show up on the desktop of G5 B? I remeber reading something a long time ago that said you could do it with the Laptops, but its been so long that I do