Results 1 to 5 of 5
  1. #1
    Tartaglia is offline Member
    Join Date
    May 2012
    Posts
    14
    Rep Power
    0

    Default java file is not compiled

    Hello everyone,

    I have a very peculiar problem. I create a new Java project in Eclipse (Hello World) which runs fine, but after I add another project to the Java Build Path of this project, the project (still Hello World, nothing changed), does only produce the original output, i.e. the file is not compiled anymore, so even if I change things in the code (e.g. "Hello World 2222") this does not change the output, I can even delete the entire code and I still get the output from the first Hello World example (so it still runs the same file that was originally compiled).

    Does anyone have an idea what the source of the problem might be?

    Thank you and best regards,
    Tartaglia

  2. #2
    AndrewM16921 is offline Senior Member
    Join Date
    Jan 2009
    Location
    CA, USA
    Posts
    264
    Rep Power
    6

    Default Re: java file is not compiled

    Try doing Project -> Clean -> All Projects. It's a long shot, but see if that fixes the problem.

  3. #3
    Tartaglia is offline Member
    Join Date
    May 2012
    Posts
    14
    Rep Power
    0

    Default Re: java file is not compiled

    That did the trick, thank you so much!!
    Last edited by Tartaglia; 06-13-2013 at 01:47 AM.

  4. #4
    AndrewM16921 is offline Senior Member
    Join Date
    Jan 2009
    Location
    CA, USA
    Posts
    264
    Rep Power
    6

    Default Re: java file is not compiled

    demo.Model? Is that file named Model.java? The class name and the filename must match. Either change the filename to HelloWorld.java or the class to Model.

  5. #5
    Tartaglia is offline Member
    Join Date
    May 2012
    Posts
    14
    Rep Power
    0

    Default Re: java file is not compiled

    Sorry Andrew, did not do it correctly the first time. But it works perfect now, thank you so much!!

Similar Threads

  1. Netbeans runs better than compiled file
    By bodyady in forum Advanced Java
    Replies: 1
    Last Post: 10-23-2012, 10:24 AM
  2. problem running compiled class file
    By SnakeDoc in forum New To Java
    Replies: 6
    Last Post: 04-14-2012, 12:54 AM
  3. this java programme has compiled but does it answer the qn
    By luciawashaya in forum New To Java
    Replies: 1
    Last Post: 11-01-2011, 01:42 PM
  4. Replies: 5
    Last Post: 10-19-2010, 04:57 AM
  5. Replies: 3
    Last Post: 12-12-2008, 02:44 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
  •