Page 2 of 2 FirstFirst 12
Results 21 to 24 of 24
  1. #21
    vastrolorde is offline Senior Member
    Join Date
    Jan 2013
    Posts
    124
    Rep Power
    0

    Default Re: source code in multiple .class files

    C:\Users\Marko\Desktop\java>dir
    Volume in drive C is System
    Volume Serial Number is 6CA6-552A

    Directory of C:\Users\Marko\Desktop\java

    04.01.2013 16:18 <DIR> .
    04.01.2013 16:18 <DIR> ..
    03.01.2013 15:58 1*817 Board.class
    04.01.2013 16:18 <DIR> donut
    03.01.2013 15:58 652 Donut.class
    02.01.2013 21:11 <DIR> New Folder
    2 File(s) 2*469 bytes
    4 Dir(s) 5*096*202*240 bytes free

  2. #22
    vastrolorde is offline Senior Member
    Join Date
    Jan 2013
    Posts
    124
    Rep Power
    0

    Default Re: source code in multiple .class files

    ok.. lets start from the beginning. I have 2 java files Board.java and Donut.java. what do i do next

  3. #23
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    929
    Rep Power
    2

    Default Re: source code in multiple .class files

    Quote Originally Posted by vastrolorde View Post
    ok.. lets start from the beginning. I have 2 java files Board.java and Donut.java. what do i do next
    - Delete the obsolete class files in C:\Users\Marko\Desktop\java
    - Look at the package statements in those two files. That is the subdirectory they have to be in. So a java file with package foo.bar; needs to be in directory C:\Users\Marko\Desktop\java\foo\bar.
    - Compile: javac donut\*.java
    - Run the class file that has the main method: java donut.Donut
    - Both commands are to be executed from the root of the project, being C:\Users\Marko\Desktop\java
    Last edited by SurfMan; 01-04-2013 at 05:06 PM.

  4. #24
    vastrolorde is offline Senior Member
    Join Date
    Jan 2013
    Posts
    124
    Rep Power
    0

    Default Re: source code in multiple .class files

    Now its working. TYVM

Page 2 of 2 FirstFirst 12

Similar Threads

  1. read source code from a class
    By argus in forum New To Java
    Replies: 6
    Last Post: 10-14-2010, 07:05 PM
  2. Project containing multiple source files
    By mr smiley in forum Eclipse
    Replies: 0
    Last Post: 04-25-2009, 10:31 PM
  3. How to Compile JavaScript source into Java class files
    By tosreejith in forum New To Java
    Replies: 0
    Last Post: 04-06-2009, 03:12 PM
  4. multiple class files
    By nemesys571 in forum Eclipse
    Replies: 0
    Last Post: 06-26-2008, 01:58 AM
  5. Organize class source code
    By Alejandro Valdez in forum Eclipse
    Replies: 0
    Last Post: 05-16-2008, 02:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •