How to create a .java file with multiple classes

I have all the below classes declared in a file say ABC.java under
a common package called somepackage
Abstract class A
Void abstract metod1();
Void metod2();
Class B
void method3();
Void method4();
Class C
void method1();
Void method2();
In Client.Java
On compiling the Client.Java I get errors
Import somepackag.*;
Class Samp extents A
void Method1()
Public class Client
A a1 =new Samp(); //error undeclared class A
B b1 = new B1();//error undeclared class B
C c1 = new C1();//error undeclared class C
is it possible to have all the class declared in one file ( i dont need mutiple classes, as this file will be autogenerated , i need all classes in one file) and use the classes inside this in the some client app
regards
MP

Peetzore wrote:
As long as you have only one public class and your .java file is named after it you shouldn't have any problem.I did exactly that, but still i get the same error "Cannot find symbol"
i have used the import command on top as import somepackage.*;
Edited by: mpjava on Jun 2, 2009 1:29 AM
Edited by: mpjava on Jun 2, 2009 1:30 AM

Similar Messages

  • How to create a pdf file from multiple images ?

    Dear All,
    I want to create a SINGLE page pdf file from two or more page size images that are combined to make a single page pdf. Again, this question is on pdfs that are made out of several, atleast  two color images and a black-and-white mask for one of them.
    I have such pdf files from an unknown source (the producer is edited out) whereby there are three tiff images, obtained using the well known pdfimages extractor.
    When I want to make a pdf out of tiff or png or other image formats, I right click and tell Adobe Acrobat to make a pdf.
    However, I dont know how I can give a command to select say,  three tif images and specify which is the mask for which and then join  them in a way that I get the pdf from the composite of the two color images and a mask for one of them.
    Please help me out.
    I am a little familiar with the pdf structure skeleton and when necessary, fixed xref tables in one of my favorite editors. A few years ago, I also wrote a bunch of javascripts to make some annotations and needed some automation and used some itext type libraries. However, I need your help in this problem as I am now rusty and forgot some of what I studied to solve my earlier problems. This is a new problem for me. Gentle hints from you would be very nice to help me in this problem. Please specify if necessary what manual and pages to read. in the pdfspec.
    Best Regards
    Disabled Veteran [physically handicapped]

    Hello Again.
    On Fri, May 11, 2012 at 12:20 PM, lrosenth <[email protected]> wrote:
    >
    > Re: How to create a pdf file from multiple images ?
    >
    > created by lrosenth in PDF Language and Specifications - View the full
    > discussion
    > ________________________________
    >
    > No clue who Irving is…
    >
    I was hoping to have your first name so its easy for me to address you.
    > I have no clue what OS platform, programming language, etc. you use so
    > can’t really narrow things down.
    I would gladly mention that I am working on windows platform, preferably XP.
    I can also work on linux for free products that come with it.
    >  Also, as this is an Adobe forum, we only
    > recommend Adobe products – so there may be other options that even my list
    > wouldn’t include.
    But adding other products, for the help of an adobe products user,
    even if it outside adobe, shall add greater prestige to your company
    and give impression of user-centeredness.
    > If you read ISO 32000-1:2008 (aka the PDF standard), you will find the
    > information about Images and Image Masks well described.  I didn’t think I
    > needed to repeat any of that information.
    Well, just add the few pdf stanzas since you are proficient on it and
    I am presently a little rusty as I mentioned. Just asking a little
    extra yard, not even to go an extra mile.
    > And, if you read that same document, you will see that there is NO SUCH
    > THING as a “text only PDF”.   All PDF documents are structured binary files.
    Well, ascii format or uncompressed format that is human readable. I
    know its a binary file, but human readable ascii version of it.
    I hope you can give me some stanza and various other approaches
    possible so I can select or combine things for myself. I see only a
    miniscule number of posts claiming to have written masks in this forum
    and then with no details.
    Regards
    Roger
    Message was edited by: dying veteran
    because the adobe posting system went crazy and truncated all except the first line ... dunno why

  • Create a flat file with multiple characters for enclosures

    Hello,
    we use OWB 11g2 (11.2.02).
    Now we try to create a flat file with multiple characters for enclosures. The manual wrote:
    "Enclosures (Left and Right): Some delimited files contain enclosures that denote text strings within a field. If the file contains enclosures, enter an enclosure character in the text box or select one from the list. The list displays commonenclosures. However, you may enter any character. The default for both the left and right enclosure is the double quotation mark ("). You can specify multiple characters and hexadecimal characters as field enclosures."
    But it will not work. The OWB use the first character from the left enclosure definition as left enclosure and the second one as right enclosure !?!
    Did anyone know this behavior? Is there a solution for this problem?
    Thanks and regards
    Norbert

    HI Raghu,
               Use the function module 'GUI_UPLOAD'.
               In that you have to specify the field_separator value = 'X' in export section.
    Regards,
    S.C.K

  • How to create a pdf file with CS5

    Hello, I'm new to PhotoShop CS5 and haven't figured out yet (despite two hours of trying) how to create a pdf file with pictures and texts.  Can someone please help me with this ?  The "help" button in CS5 doesn't seem to cover this question.  Nor do the FAQs.
    Thank you very much.

    Save As... Photoshop PDF.

  • How to create a csv file with NCS attributes?

    Hi
    i installed Cisco Prime NCS and trying to perform bulk update of device credentials with csv file.
    How to create a csv file with all required attributes?
    This is part of NCS online help talking about this topic:
    Bulk Update Devices—To update the device credentials in a bulk, select Bulk Update Devices from the Select a command drop-down list. The Bulk Update Devices page appears.You can choose a CSV file.
    Note        The CSV file contains a list of devices to be updated, one device per line. Each line is a comma separated list of device attributes. The first line describes the attributes included. The IP address attribute is mandatory.
    Bellow is test csv file i created but does not work:
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    The error i am getting while importing this file:
    Missing mandatory field [ip_address] on header line:10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    Assistance appreciated.

    It looks like the IP address field is incorrectly set.,
    It should be as follows
    {Device IP},{Device Subnet Mask}, etc etc
    so a practical example of the aboove could be (i dont know if this is completely correct after the IP address / Subnet Mask)
    10.64.160.31,255.255.255.0,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    below is a link to the documentation
    http://www.cisco.com/en/US/docs/wireless/ncs/1.0/configuration/guide/ctrlcfg.html#wp1840245
    HTH
    Darren

  • How to create a exe file of a .class file

    how to create a .exe file for windows .class file of java
    please answer this so that i can complete the project to be submited to collage

    There is a program called JET. Is enables you to create .exe files of .class files.
    This is the URL:
    http://www.excelsior-usa.com/jet.html
    Succes
    --=tReShR=--

  • How to create a .java file through a j2me program?

    I am trying to develop a small application in j2me which needs dynamic creation of a .class file. For this purpose I tried to create .java file through my j2me code, but i could not do that..I want to know whether a java file can be created on a mobile phone or not..
    I would be grateful to you on your help in this regard..

    ...develop a program xyz.java using j2me which performs the following functionalities:
    1.create a file called abc.java
    2.extract its class file...For +1+ ie to create a file (any file, no matter java or not) from j2me, device need to support File Connection specified in [jsr 75|http://www.jcp.org/en/jsr/detail?id=75]. If you're interested, learn the jsr API on how to create and manage needed file.
    For +2+ described as extract its class file one needs to have java compiler (javac) on device. *) If you're interested, ask for more details at [Java Compiler forum|http://forums.sun.com/forum.jspa?forumID=7]. Also, if the class file is for CLDC then javac needs to support "JDK 1.3-compliant" compilation. To create CLDC classes on device, one also needs to have a preverifier tool. Check this at Java Compiler forum if needed.
    Good luck - I think you'll need a lot of it...
    *) javac on device -- it should not only be present but also provide a j2me API allowing to invoke it for particular java file with needed options. Same applies to preverifier tool.

  • How to create a .exe file with eclipse 3.1

    Hello every body. I want to know how create a .exe file with eclipse 3.1. A friend tell me it's possible but he forgot how ! So I ask my question ay you, how can I do that? I think it's like in Dev-C++, when he compiling the programme he create
    a .exe file but in eclipse, i don't know how do that. Please help me, I have finish some programs but I don't know how create .exe file for give their at my friend.
    Thank's.
    P.S : I'm a young french so maybe there are some mistake on my post. I hope you understand it.

    There might be a plugin in eclipse to do this, but I don't know what it is.
    The normal way to deploy a program is to create an executable jar file. This will be a .jar not a .exe.
    Or you can try ggogle.
    http://www.google.co.uk/search?q=java+exe

  • How to create a new file with existing file's resource fork?

    Hello,
    I would like to create a new file that has the resource fork of an existing file. I had though of making a copy of the existing file, seek to the beginning of the copy and write the new data, but for large files, that creates the whole file even when not needed. I currently create the new file with [NSFileManager createFileAtPath: contents: attributes:], but attributes do not include resource fork items, like custom icons, color label, etc.
    [NSURL resourceValuesForKeys] gives a common subset of resource data, like icons and color label, but that's about it. Is there some way to get the resource fork or a copy of the file without getting the whole file?
    Thanks

    What are you trying to do here? While resource forks might still be quasi-supported, you really shouldn't be thinking about them as such. Instead, think in terms of extended attributes. You can use the low-level xattr() functions to get some of that or you can use the new NSURL methods.

  • How can i create a zip-file with multiple volumes

    Hi,
    i've to zip a large file (250 MB and more). But the zip file shouldn't be greater than 5 MB, because i have to send the file via E-Mail. So i've thought, that the solution of this problem can be to zip the large file in smaller zip-files, which are multiple volumes of a zip-archive. I've searched very long in WWW, but didn't find something. Perhaps you can help.
    Sorry, about the bad english. :-)
    Timo Bunger

    Hi
    Who said your english is bad ?. OK, are you looking for compressing the 250 MB file in to multiple versions using a java program ?. If not, there is a shareware you can download and split the file into multiple parts by specifying size of each part. You can send these parts via email and the other person can combine these parts into a single file again.
    Find this @
    http://www.freedownloadscenter.com/Utilities/File_Splitting_Utilities/EzSplit.html
    You may need to read a bit about it on how to use.
    Thanks
    Srinivas

  • How to create AD contact object with multiple proxyAddresses?

    Hello,
    I need to create AD contact with multiple proxyAddresses to be used in mail routing.
    How can I accomplish this using Java?
    I can create an AD contact with single value fine. But I don't know how to populate a multivalue attribute.
    proxyAddresses: smtp:mytestuser@Domain1
    proxyAddresses: SMTP:mytestuser@Domain2
    Also, how do I update a multivalue attribute? When first name and/or last changes, the proxyAddresses will need to be updated?
    How can I do this?
    Thanks
    Khanh

    This error is no longer coming up, it is now saying that it has an unsupported class version error. I believe this may be because the class file and library files have been complied under different versions, is there a method to check this?

  • How to create a text file with data.

    Hi,
    I am writing java code for testing an application, some times test can failed in some cases, I want to display an error message in text file. To that I written the code as like,
    BufferedWriter bout;
    bout =new BufferedWriter(new FileWriter("test.txt"));
    String str=”Your input data is not match with pattern”
    bout.write(str);but here it is creating a text file “ test” without any data in it.
    Can any body help that to execute the program properly
    Regards
    Buntty

    sabre150 wrote:
    JoachimSauer wrote:
    You didn't close your BufferedWriter. Since it's buffered it probably didn't write anything to the underlying file.
    Generally you must close every Writer/OutputStream that you no longer use or it won't be written reliably.It's not quite as simple as that. If you have a chain of Writers / OutputStreams then you only have to close() the outer most one since each is responsible for closing any Writer/OutputStream that it wraps. If you do decide to close them individually (a bad idea but people do do it) then you MUST close them starting from the outer most one and working to the most inner one or you will not guarantee to flush any buffered content.Of course. I might have used a misleading phrasing here. What I meant is "Every time you are done with a Writer, you must close it" and not "You must close *every* Writer that you used". Thanks for the clarification.

  • How to create a java file from an xml file

    anybody who can help me? i'm really trying to get this job in a hurry..thanks

    wondering if velocity template engine can help.
    a. parse XML
    b. construct bean (will XMLBeans help?)
    c. write java files (velocity may have helped here) from predefined template.
    Looking forward to other suitable solution.
    JSP to servlet is, I guess, such example.

  • How to create an exe file for single class

    Hi all,
    l have one some program with only one class and want to create one exe file for
    easily execute for the user.
    I've use exe4j and another tool to do but all failure, the error message always shown me that main class not found.
    Any idea??
    Thanks a lot!

    I suspect your class has somewhat invalid thing.
    Have you verified:
    - The class you wish to be executed contains public static void main(String args[])- The package declaration on your executable-wannabe class is valid
    - In case you need to import another class, make sure the import statement(s) is valid
    No matter what kinda program you use to create .exe from java class, the above things must be valid. AFAIK.
    Regards,
    Farid Herman

  • How to read a xml file with StringReader class

    Hi,
    I need to read a XML document with StringReade class. My aplication receives an absolute path but this doesn't work:
    StringReader oStringReader =
    new StringReader(c:\java\libros.xml);
    However it works with:
    StringReader oStringReader =
    new StringReader("<?xml version="1.0" e......");
    ie, with the whole document as a String, but I need to do it as the frist way.
    Thanks

    Hi,
    I need to read a XML document with StringReade class.
    My aplication receives an absolute path but this
    doesn't work:
    StringReader oStringReader =
    new StringReader(c:\java\libros.xml);
    However it works with:
    StringReader oStringReader =
    new StringReader("<?xml version="1.0" e......");
    ie, with the whole document as a String, but I need
    to do it as the frist way.
    Thankstake a look at this link:
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/sax/2a_echo.html

Maybe you are looking for

  • IPhoto cannot find photo to open

    I have imported hundreds of photos into iPhoto. After installing 10.5 (upgrade method), many of the pictures I had imported previously will not export nor attempt to open when I drag to PSE 4.0. The message "cannot locate the photo" appears. I have n

  • Turning off my DAQPad 6016 causes my computer to reset

    When I turn off my DAQPad 6016 after a day of use it causes my computer to reset. I can only figure it is a driver issue however how can I prevent that as when I change the configuration of the 6016 I often turn it off just to be safe. Is there a pat

  • Encrypted Disk Image to Password Protect Folder Not Working!

    I have followed the instructions exactly for creating a Disk Image in order to password protect a folder.  Folder contains multiple types of files including images, pdfs, etc.  Here is what I've done and what happens: In Disk Utility I created a New

  • IDVD project with Win DVD burner???

    I was wondering If I can do a project with iDVD then send it to a Win comp to have it burn onto DVD. I have a Mac mini without the DVD burner.

  • Error message:  Mail can't connect to the account "Yahoo"

    Talked with Apple support and could not get this resolved.  We first tried going to Mail Preferences and making sure everything on the accounts were correct.  I do have two Yahoo email accounts on this computer.  Next time I called we went to System