facebook

Classes not getting updated. [Closed]

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #211335 Reply

    vinny_george
    Member

    Hello,

    I am getting a really strange error on a MyEclipse, Struts Project. When I compile(save) a java file, class files are not getting updated.

    For example say I have a file like ServiceDetailsForm.java

    new method
    ————–
    private String wtntest;

    public String getWtntest() {
    return wtntest;
    }
    public void setWtntest(String wtntest) {
    this.wtntest = wtntest;
    }

    When I add the above mentioned method to the file and save it. NO error; little building bar comes and goes at the bottom. But at this point, if I look at the class file, it DOES NOT have the new method.

    Most wierd thing is if I go to another java file (ServiceDetailsTest.java) and try to refer this new method(serviceDetailsForm.getWtntest()); it doesn’t throw any error. But class files are NOT updated.

    I uninstalled eclipse, reinstalled…. but nothing seems to work. I was working on this project using same IDE for the last one month and there was no problem until yesterday. Nothing changed.

    Appreaciate your help.

    Thanks

    Vinny

    Eclipse Version: 3.0.0
    MyEclipse build: EnterpriseWorkbenchInstaller_030702
    Operarting System: Windows 2000
    How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde = 12
    JDK Version: “1.4.2_04”
    Application Server: Orion 2
    Are there any errors in the Eclipse log? NO

    #211341

    Riyad Kalla
    Member

    Vinny,
    What is Window > Preferences> Workbench > Automatically build resources set to?

    #211345

    vinny_george
    Member

    “Perform build automatically on resource modification” is CHECKED

    #211346

    Riyad Kalla
    Member

    But at this point, if I look at the class file, it DOES NOT have the new method.

    How are you “looking” at the class file to determine this?

    refer this new method(serviceDetailsForm.getWtntest()); it doesn’t throw any error. But class files are NOT updated.

    Does the test run? Do you get a runtiem exception of “MethodNotfound” or does it work?

    #211351

    vinny_george
    Member

    >>I open class file using two methods
    1) Browse to WEB-INF->classes and double-click on the class file
    2) Open class file using a Decompiler.

    >> There was no “MethodNotfound” error. Because NONE of the classes inside WEB-INF-> classes were updated. Orion Server you can configure to run from from your WEB-INF->classes folder.

    When I look at properties, Java Build Path -> Default Output Folder is
    AccountOnlineWeb/WebRoot/WEB-INF/classes (which is correct)

    #211360

    Riyad Kalla
    Member

    Vinny,
    Go to the Projects menu, choose “Clean” then select your project and hit OK… does the entire thing get rebuild? Are the classes updated alright?

    Also what decompiler are you using? JD?

    #211499

    vinny_george
    Member

    Riyad

    Did ‘clean’, still doesn’t work. When I save any java files under /src folder, class files under WEB-INF/classes are NOT getting updated.

    I used DJ Java Decompiler.

    #211504

    Riyad Kalla
    Member

    Vinny,
    the mechanism of updating the classes dir when sources change in the /src folder is up to Eclipse to provide, so if that’s not working something is severly wrong…

    Are you sure that your /src folder is setup correctly as a source folder? Can you double check it? Sometimes Eclipse 3.0 forgets settings.

    Can you create a new Java project using a /src and /bin dir, make some changes and see if the bin dir is updated? Can you do the same thing with a new Web Module Project, create a new class and see if the classes dir is updated?

    I cannot reproduce this behavior locally, that’s why I’m asking you to run through these ‘sanity checks’.

    #211509

    vinny_george
    Member

    Riyad,

    Finally figured out the error. A project that was selected under
    Properties -> Java Build path -> Projects
    were missing. Since I was not using that project I deleted it from the workspace. But the reference to the deleted project was there in the build path, under ‘Projects’. Eclipse never threw an error until I created a new web project (as you suggested) and changed the perspective to the new one.

    Now class files are getting updated correctly.

    Thanks a bunch for your help. 🙂

    #211519

    Riyad Kalla
    Member

    Glad its working now, thanks for hanging in there.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Classes not getting updated. [Closed]

You must be logged in to post in the forum log in