Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How do I run test code in different file under a project

  1. #1
    Junior Member
    Join Date
    Sep 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How do I run test code in different file under a project

    New to Java and eclipse, not sure if my question is java or eclipse question so I will try post on both forums.
    Lets say you have a project, class, file created and the code you wrote so far works. In my case I wanted to
    add getting system time and using some math. Found examples on the net none worked. My next step is to
    try the inter net code examples in a separate file by it's self. So I tried adding another file, past the code there
    then try to run it and only the first file runs. SO I guess my question is this, must I create a new project, class,
    file to test a code section in this fashion?


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: How do I run test code in different file under a project

    What happens when you compile and run from the command line? Post an SSCCE demonstrating what you're trying to do, as well as the exact output from the command line, an we'll go from there.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Studying for a test, can't figure out my code won't work
    By coolidge in forum What's Wrong With My Code?
    Replies: 4
    Last Post: September 27th, 2011, 01:12 PM
  2. [SOLVED] Very strange results when reading from a test file
    By DougFane in forum File I/O & Other I/O Streams
    Replies: 10
    Last Post: September 11th, 2011, 06:30 PM
  3. [SOLVED] Issues with a test driver file
    By Gthoma2 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 18th, 2011, 07:54 PM
  4. [SOLVED] Pointing to file inside project
    By M3ss1ah in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: March 9th, 2011, 08:18 AM
  5. Add code to an existing project
    By atul.mathur31 in forum Java IDEs
    Replies: 1
    Last Post: January 5th, 2011, 06:50 PM