How to link two .java files together?

hello everybody,
is it possible to link two or more .java files together? I mean is if I have 3 .java files. (a.java, b.java, c.java) then I have 3 .class files too. How do I use the method in other .java files. For example :
public a extends Applet {
// call b.class
b();
public b extends Applet implements ActionListener {
void title1() {
How to call the b.class? How to call the title1() method?
Is it related to JAR or package??
Thanks for helping me. v(^_^)v

O.K, you do not link ".java" files together.
You compile them into class files and they can create new instances of each other and and access their variables and work together.
I recommend "Sam's Teach Yourself Java in 21 Days".
It will start you out with the basics.
--Ian                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

Similar Messages

  • I'm using pages 5.2 and feeling completely stupid by not knowing how to link two text pages together. Can anyone help? please...

    Hi there, I'm trying to use pages 5.2 for the first time and I cannot find how to connect two consecutive pages together as I use to do with earlier versions of Pages... Any help?

    Word Processing templates have what is called a Document Body.
    That is the area defined by the margins and holds a default text area which flows from page to page.
    Examples of WP templates are the Letters, Reports, CVs etc.
    Layout templates have that switched off and require you to add Textboxes or Shapes into which you can type text. Each page is an individual Section and no text flows from page to page.
    Examples of Layout templates are the Brochures, Business Cards, Posters, Newsletters etc
    In Pages '09 you can manually link Textboxes to flow in your own set order and across pages. Pages 5 has dropped this along with 100 other features.
    Peter

  • How to link two header files so that it may be taken from the library ONLY

    Hi.
    I was able to compile and successfully execute a program earlier
    written in Oracle 7 (Solaris) Now in Oracle 10G (Linux). The only
    problem is that I have to include two header files
    sqlca.h and sqlda.h in the present working directory.How to enter them in the linking command so that I do not need to
    copy them everytime in the current working direcotry ?
    I have used the following commands :
    $ proc sample.pc
    $ cc -L$ORACLE_HOME/lib -L/usr/lib -lclntsh -o sample sample.c
    regds.
    J.S.S

    Use always -I option of the compiler to include all header file directories U wich to add. In this case no need to copy the files.

  • How to merge two java files with InputDialog to select?Please help me!?

    //Addition Java application
    import javax.swing.JOptionPane; // import the class
    public class Addition {
    // main method
    public static void main(String[] args)
    String firstNumber, secondNumber;
    int number1, number2, sum;
    // read the first number
    firstNumber = JOptionPane.showInputDialog("Please enter a integer: ");
    // read the second number
    secondNumber = JOptionPane.showInputDialog("Please enter another integer: ");
    // data type conversion
    number1 = Integer.parseInt(firstNumber);
    number2 = Integer.parseInt(secondNumber);
    sum = number1 + number2;
    // display the result
    JOptionPane.showMessageDialog(null, "The sum is " + sum + ".", "Results", JOptionPane.PLAIN_MESSAGE);
    System.exit(0);
    //Multiplication Java Application
    import javax.swing.JOptionPane;
    public class Multiplication5
    public static void main(String args[])
    int number1, number2, number3, number4, number5, product;
    String firstNumber, secondNumber, thirdNumber, forthNumber, fifthNumber ;
    firstNumber =
    JOptionPane.showInputDialog("Please input an integer");
    secondNumber =
    JOptionPane.showInputDialog("Please input another integer");
    thirdNumber =
    JOptionPane.showInputDialog("Please input the third integer");
    forthNumber =
    JOptionPane.showInputDialog("Please input the forth integer");
    fifthNumber =
    JOptionPane.showInputDialog("Please input the fifth integer");
    number1 = Integer.parseInt(firstNumber);
    number2 = Integer.parseInt(secondNumber);
    number3 = Integer.parseInt(thirdNumber);
    number4 = Integer.parseInt(forthNumber);
    number5 = Integer.parseInt(fifthNumber);
    product = number1 * number2 * number3 * number4 * number5;
    JOptionPane.showMessageDialog(null, "The product is " + product, "Results", JOptionPane.PLAIN_MESSAGE);
    System.exit(0);
    I seek for help to merge above two java application files.
    I need to call JoptionPane.showInputDialog to prompt the user to input the operation, 1 for addition, 2 for multiplication. In this dialog, the user is expected to enter the integer of 1 or 2 for the calculation.
    Please help me ! Thank you!

    Hi CRay,
    You just need to call the main methods of the 2 classes according to "1" or "2" entered.
    It is better if the "multiplication" and "addition" are declared as methods rather than in main methods.
    Example:-
    public static void Addition()
    Then call
    Addition.addition();
    than
    Addition.main(new String[]{});
    as shown below.
    import javax.swing.JOptionPane; // import the class
    public class Test{
        public static void main(String[] args){
            // read which  operation to perform
            String operation = JOptionPane.showInputDialog("Please enter which operation : ");
            if(operation.equals("1")){
                Addition.main(new String[]{});
            else{
                Multiplication5.main(new String[]{});
    }Rose

  • How to link two user interfaces together through networking using java??

    Im doing an java assignmet...the entry system...
    I have to create two interfaces ..
    one is a interface which is a keypad and let user key in their password
    for accessing...
    another interface is receive the password and determine whether it is valid or not...
    Two interfaces is on different computer.....
    I have to link these interfaces together using java....
    PLS HELP!!!!!!

    It sounds like you should probabally use RMI.That is, remote method invocation...these guys are doing a more complicated version of what you want to do:
    http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20680356.html#8935218
    Be sure to check out Sun's RMI tutorial:
    http://java.sun.com/docs/books/tutorial/rmi/
    Happy coding! Sounds like a fun little project...I want to do some RMI sometime when I get a chance...

  • How to link two labview files

    Hi,
    I have got a file that generates a signal, i have to link the signal that is generated in the first file to the second one . can you please help me how to do this. awaiting for your reply.
    Solved!
    Go to Solution.

    Create a subvi of the vi that generates the signal and use it in the main vi (second one).

  • Linking two video clips together

    I cannot find the way, how to link two video clips together so, that when moving one, the linked clip follows.
    Is there a way of doing that?
    The manual gives nothing with words: "linking video clips".
    Message was edited by: TRST

    You can't link video clips to each other. You can nest them. Put the two clips in a sequence the way you want them. Put the sequence with the two clips inside your master sequence. They will act as a single clip. That's the only way.

  • How do I fuse audio files together?

    Hey, I'm finishing up the editing for my full-length horror feature, and currently I'm putting in the sound effects and I was trying to figure out how can I fuse audio files together?
    Here's the thing, my video files are files I converted into AVIs from VOBs, only problem is that the audio disappeared from them, but my friend tried to load all my VOBs into AVIs for me since I did something wrong but when he converted them the video was gone but the audio was there...so I figured I'd just take the audio and put it in place.
    Right now I have to put in a sound effect of the guy screaming while gory sounds are playing in the background, then after that I have a chainsaw scene where a woman screams, a chainsaw blases, a mechanical laughter is heard, and gory sounds are playing all together.
    If you could help me figure out how to get the files to fuse together to play the sounds all together, knowing I have to change the volume for each one, that would be very much appreciated. Thanks!
    -Toby

    Ah, those scroll bars. They don't stand out, as much, as I would like. I always overlook the ones in the Share Panel, though I have used them many times.
    Unfortunately, PrE has chosen an arrangement, where Audio & Video Tracks are grouped. I like the PrPro layout, where all Video Tracks are above a "centerline" and all Audio Tracks are below that.
    About the closest that one can come in PrE is to use Delete Unused Tracks, to remove empty Video Tracks, or to View Video Tracks (alone), or View Audio Tracks (alone). With a combo of those, one can customize the Timeline a bit.
    When cleaned up, one can then Add Tracks, for any additional Audio Tracks necessary.
    If one did ONLY the View Audio, they loose the ability to refer to the Video Track, and with SFX, that is necessary, at least for me.
    I like to keep each type of Audio on its own Track. That makes actions, like applying Track Keyframes, or adjustments to JUST that Clip, or Clip type. If I have SFX, music, camera Audio, and other Audio sources, I will put many SFX on their own Audio Track, the camera Audio on another, and then the music one one, or more additional Audio Tracks. Not too long ago, I had one Project with about 10 separate SFX Audio Tracks, one for a "loon," one for "crickets," three for "frogs," one for "pond ambiance," and then two for music (as I was doing faux DD 5.1 SS in PrPro), with one from Music F (front) and Music R (rear).
    Good luck, and happy editing,
    Hunt

  • OBIEE: Link Two Separate Queries Together

    Hi,
    I am trying to link two separate queries together in BIEE.
    I have a query that will give me the sales value in January 2012 (monthly query)
    But I would need to use the sales value of January 2012 to help derive the weekly sales value in another query (weekly query).
    How would you link up two queries together?
    I tried using union but it doesnt seem to be working.
    Thanks.
    Bill

    Hi Billy,
    Sure, My pleasure. Here are the basic steps what you could go through.
    1. Create an analysis with your Month (January) and Sales.
    2. Save this analysis as Report1.
    3. Create another analysis with Week and Sales.
    4. Create a filter on column:Sales using the option 'Based on Another Analysis'. The analysis editor will provide you an option to browse your other analysis which you want this analysis to be based on and just click on this browse button, and navigate to and select Report1.
    5. Once you have selected Report 1 through browse option, you get down in the same pop-up the relationship and use values in column.
    So sample entries in this pop-up might look like
    Column : Sales
    Operator : is based on results of another analysis
    Saved Analysis : /My Folder/Report1
    Relationship : is equal than
    Use values in Column : Sales
    6. If you run this analysis, you could get all weekly sales figures which are equal to the january sales figures.
    Hope this helps.
    Thank you,
    Dhar

  • How to Open Two Excel Files in Multiple Monitors in Windows 7

    How to open two excel files in two excel windows using multiple monitors in Windows 7.
    Currently it opens multiple files on top of each other on the same one monitor.
    I found this article in a blog it says
    "The snap feature that you are looking for will not work unless you open two instances of Excel. This is because Excel Unlike Word is not a True SDI Application. Microsoft is aware of the Issue however there is no resolution to the problem but the workaround"

    If you are working almost the entire day in front of your computer at your office with lots of Excel Sheets and Word, then probably you might be working with a
    dual monitor or may be even more than that. Studies have shown that having an additional monitor increases the productivity by 20 to 30 percent (Source: NY Times)
    But some applications like MS Office Excel, even though you open multiple files, they are all from the same instance of the application. So if you want to compare two
    Excel
    files, then you may not be able to have it in two
    separate monitors as the files are loaded using the same instance of Excel. If you move one
    Excel
    file to the other window, the other Excel files are also moved to the other window.
    So how to have two separate Excel files or other application side by side in dual monitors?
    Option A:
    In Excel 2003, go to Tools -> Options ->
    General tab.
    Make sure the option, ‘Ignore other applications’ is checked. Now all the Excel files will be opened as separate instance and you can move the Excel files individually across the monitors.
    In Excel 2007, Click the Office button ->
    Excel Options -> Advanced.
    Under General, check ‘Ignore other applications that use Dynamic Data Exchange’.
    or
    As this method forces each Excel file as a separate instance, the memory consumption will be more. If you don’t want too many memory consumption then you can open only two instances (see
    Option B) and manage wisely to view in both the monitors.
    Note: If you are having issues like Excel opens without displaying a workbook, then you may have to
    uncheck this option. (See Microsoft Help for more details on this). You can use option B in this case. I have this option checked and I have not faced any issue yet.
    Option B:
    They key here is, the application has to be loaded as separate instances. Lets say you have opened an Excel file in
    Monitor 1 and you want to open the next excel file in Monitor 2. You can usually open another instance of Excel by browsing through the
    Start Menu -> Programs -> Microsoft Office ->
    Excel. Make sure this newly opened Excel file is the last Excel file you had viewed and then double click on the Excel file that you wanted to open. This will force the Excel to
    open
    in the second instance of Excel. Now you can move these
    two excel files separately across windows or monitors.
    This may be little cumbersome way to open new instances of Excel every time. The easy solution would be to keep these links in the
    quick links near the Start button. So, every time you want to open a new instance of the application, you can just use those quick links.
    hope work thanks
    http://www.lytebyte.com/2008/05/13/how-to-open-two-excel-files-side-by-side-in-separate-monitors/

  • How to Generate a Java file for a JSP Page

    Hi ,
    I am using weblogic11 .
    I am working on a JSP page which nearly consists of 4000 lines of code.
    I need to debug the file , but weblogic server is not generating the java file for the JSP pages .
    Please let me know how can i genertae Java file for the jsp pages ??

    JSPs are compiled into servlets automatically and those classes are stored in WEB-INF/classes folder. Servlet engine handles servlets.

  • How can i execute "*.java " files in Workshop

    Hi,
    Im sunil,new to this weblogic workshop8.1..i dont know how to execute standalone .java files or servlets in workshop.plz help me and tell the way.
    regards
    Budati sunil

    Im not too sure about the Java project. But single normal java files with public static void maain(String [] args) are very simple to execute.
    1. Write the java code somewhere lets call this class A.
    2. Make a dummy page flow.
    3. In the begin action of this pageFlow, call the main method of the A class directly using A.main(null) since main is a static method. your code will work fine.
    4. If you have to pass a String[] as parameters. Before calling main, create this String[] and then pass it.
    In this way you can make a jsp and take the input from the user also.
    Hope it helps
    Cheeers

  • How to compile a java file which is in memory?

    how to compile a java file which is in memory?
    such as:
    String s="class MyClass {....}";
    how to compile the string?
    thx

    come on ...That was a perfectly valid solution.
    Do you know how to call the sun.* compiler? If not then search the forums for it. If that interface still exists (which it might not in newer versions) you then will create a string stream from your class and pass it to that.

  • How to compile a java file in J9 for windows mobile 5.0

    I have downloaded J9 for windows mobile 5.0 and need help on how to compile a java file.

    You can compile your source code using J2SE ;)
    may be this is important for you:
    http://awareness.ics.uci.edu/~rsilvafi/pocketPC/index.
    html
    Regards!!!Actually i am using some eSWT related classes also.. so is there any way to compile from the J9 environment using J9 console..

  • How to link an image file in code view

    I can't seem to figure out how to link the image file in code view. It has to be in code view because the image is hidden in Design View so I can't do it in HTML view. Here's the coded section:
    <!-- TAB #3 CONTENT -->
                    <div id="tab3" class="tabsGeneral">
                      <div class="tabsFeatureImageContainer asyncImgLoad" title="img/index/tabs/tab3/DonateNow-168x112.jpg"></div>
                      <h3 class="tabsHeader">Partner With Us</h3>
                      <p class="tabsDesc">Get involved with all the exciting things God is doing at Provision House. Partner with us to help others find true and lasting freedom from addiction in Christ. <a href="http://provisionhouse.org/giving.html" class="commonLink">Click here</a></p>
    It's' the red jpeg image file I want to link to another page in the site and I don't have enough experience to do this.
    I am thankful for your help.
    Paul

    Thanks, Gramps. Here's the page I want to like to from the image:
    http://provisionhouse.org/giving.html
    Paul
    Here's the whole section where the problem exists:
    <!-- TABS -->
                <div id="tabsContainer">
                    <div id="tabsWrapper">
                        <!-- TAB #1 CONTENT begin -->                
                        <div id="tab1" class="tabsGeneral">
                         <div class="tabsFeatureImageContainer asyncImgLoad" title="img/index/tabs/tab3/WalkingByTheSpirit-168x112.jpg"></div>
                        <h3 class="tabsHeader">Session 5 of the Breaking the Chains Seminar Completed</h3>
                            <p class="tabsDesc">Visit the <a href="videos.html" class="commonLink">Videos page</a> to watch clips of Session 5, <span class="Italic">Walking by the Spirit</span></a></p>   
                        </div> <!-- tab1 -->
                        <!-- TAB #2 CONTENT begin -->                       
                      <div id="tab2" class="tabsGeneral">
                            <div class="tabsFeatureImageContainer asyncImgLoad" title="img/index/tabs/tab2/FreedomFromAddiction168x112.jpg"></div>
                            <h3 class="tabsHeader">Session 2, Freedom from Addiction</h3>
                            <p class="tabsDesc">Is it possible for the Christian to find true and lasting freedom from addiction? This session explains how all addictions are also sin, and it is sin that Jesus has set us free from. Anticipated release: November, 2011. <span class="commonLink"><a href="curriculum.html">Read about Session 2</a></span>
    <!--HIDDEN SECTION<<div class="tabsThumbsContainer">
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/1.jpg">
                                    <img src="img/index/tabs/tab2/thumb1.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>
                                </a> 
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/2.jpg">
                                    <img src="img/index/tabs/tab2/thumb2.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>                           
                                </a>
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/3.jpg">
                                    <img src="img/index/tabs/tab2/thumb3.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>                               
                                </a> 
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/4.jpg">
                                    <img src="img/index/tabs/tab2/thumb4.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>
                                </a>
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/5.jpg">
                                    <img src="img/index/tabs/tab2/thumb5.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>                           
                                </a> 
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/6.jpg">
                                    <img src="img/index/tabs/tab2/thumb6.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>                           
                                </a>                   
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/7.jpg">
                                    <img src="img/index/tabs/tab2/thumb7.jpg" alt="" />
                                    <span class="desc isplayNone">Dubai</span>                           
                                </a> 
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab2/8.jpg">
                                    <img src="img/index/tabs/tab2/thumb8.jpg" alt="" />
                                    <span class="desc displayNone">Dubai</span>                           
                                </a>
                            </div> --> <!-- tabsThumbsContainer -->          
                      </div> <!-- tab2 -->
                        <!-- TAB #3 CONTENT -->                        
                        <div id="tab3" class="tabsGeneral">
                        <div class="tabsFeatureImageContainer asyncImgLoad" title="img/index/tabs/tab3/DonateNow-168x112.jpg"></div>
                            <h3 class="tabsHeader">Partner With Us</h3>
                            <p class="tabsDesc">Get involved with all the exciting things God is doing at Provision House. Partner with us to help others find true and lasting freedom from addiction in Christ. <a href="http://provisionhouse.org/giving.html" class="commonLink">Click here</a></span>
                            <div class="tabsThumbsContainer">
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab3/WalkingByTheSpirit-350x250-no text.jpg">
                                    <img src="img/index/tabs/tab3/WalkingByTheSpirit-26x26-no text2.jpg" alt="" />
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab3/WalkingByTheSpirit-350x250-no text.jpg">
                                    <img src="img/index/tabs/tab3/WalkingByTheSpirit-26x26-no text2.jpg" alt="" />
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab3/WalkingByTheSpirit-350x250-no text.jpg">
                                    <img src="img/index/tabs/tab3/WalkingByTheSpirit-26x26-no text2.jpg" alt="" />
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab3/WalkingByTheSpirit-350x250-no text.jpg">
                                    <img src="img/index/tabs/tab3/WalkingByTheSpirit-26x26-no text2.jpg" alt="" />
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab3/WalkingByTheSpirit-350x250-no text.jpg"><img src="img/index/tabs/tab3/WalkingByTheSpirit-26x26-no text2.jpg" alt="" />
                                <a class="tabsThumb imgTipLeftTop" rel="img/index/tabs/tab3/WalkingByTheSpirit-350x250-no text.jpg">
                                    <img src="img/index/tabs/tab3/WalkingByTheSpirit-26x26-no text2.jpg" alt="" />
                                    </span>                           
                                </a>                   
                            </div>
    <!-- tabsThumbsContainer -->         
                        </div> <!-- tab3 -->
                    </div> <!-- tabsWrapper -->
                    <!-- TABS BUTTONS -->
                    <div id="tabsBtnBar">               
                        <div class="tabsBtn">latest news<span class="tabsSource">#tab1</span><span class="tabsSource">#tab1</span>                
                    </div>
                        <div class="tabsBtn">Current Project
                            <span class="tabsSource">#tab2</span>
                        </div>
                        <div class="tabsBtn">how to help
                            <span class="tabsDefaultTab"></span>
                            <span class="tabsSource">#tab3</span>
                        </div>                   
                    </div> <!-- tabsBtnBar -->
                </div> <!-- tabsContainer -->

Maybe you are looking for

  • How do i open a pdf file that say's i do not have permission to open it when i created it ?

    hi my hard drive died and i have replaced it but now i have transfered the files back to my computer but it will not let me open them it tells me i do not have permission to open them what do i do ?

  • Mac os 10.9.3 calendar problem

    May 20, 2014 Just "upgraded" to Mac os 10.9.3.  Lost all my calendars.  Only events now are default holidays. New bug?  Anyone else? Jack

  • Photo Library Not Syncing in iOS 4.1

    Hi, Ever since I installed iOS4.0/4.01/4.1, I lost the ability to sync my photos on the computer (MAC running OS 10.6.4 with iTunes 10) with my iPhone 3GS. I used to be able to do so in 3.1.3. Anyone having the same problem? Any solution? Thanks,

  • MIRO Document Posting

    Dear All, While doing MIRO posting, one user getting the message like Document No. XXXX Created (Std. SAP Message no. 60)  and one user getting message like Invoice Doc. XXXX was posted ( Accounting Doc. No.XXXX) (Std. SAP Message No. 697) Any one te

  • Java OutputStream help

    Hello all, I am relatively new to using Java's Output and Input streams. I know the basics and I know how to use them but what is driving me crazy is I am not entirely sure how it works. For example I know the following code writes a file from an Inp