Java Classes not compiling on an imported ZK project

asked 2016-02-15 22:52:18 +0800

Princenuk gravatar image Princenuk
29 5

updated 2016-02-17 15:23:25 +0800

The ZK project works fine on another computer, however when exported and imported on a different PC with eclipse, zk and tomcat, The application runs but any changes made to the java files do not show when the project is re-run.

There was an " hierarchy inconsistent" in one of the java classes and I tried fixing that by switching to alternate JRE in build path, however the applications stops running entirely and throws a : HTTP Status 500 - java.lang.ClassNotFoundException: package.class error.

Even if I do get the application up and running the main issue is the java classes do not compile while the zul files do.

Hey Chill and Darksu,

Thanks I tried those steps but the application just runs the previous version. I can comment out major sections of the code and It still runs as it always did again nothing I do to the java files affect it except I delete a class.

The code works fine on another PC all and any changes made are immediately reflected on that computer when the project is run I was wondering maybe its a difference in settings or how the project was exported?

Thanks again

Update: While some of the suggestions like using Jetty were awesome, I think the issue came down to exporting a project from an older eclipse to a newer one for some reason that fixed it.

Thanks everyone.

delete flag offensive retag edit


Is there a way to reply to a reply without having to re edit the question?

Princenuk ( 2016-02-16 16:52:39 +0800 )edit

it could be a setting about publishing automatically to tomcat on build(I use netbeans so I can't help there). Can you try out jetty because there you only need to recompile and restart jetty to see the changes directly.

chillworld ( 2016-02-16 19:13:14 +0800 )edit

The best is to update your question as the order of answers can change with votes witch reflect on future readers of the topic.

chillworld ( 2016-02-16 19:14:14 +0800 )edit

Your other question is deleted so I can't see it anymore. Impossible for me to follow up

chillworld ( 2016-02-26 17:49:41 +0800 )edit

I don't know why It was , I think I un-deleted please help when you can. Thanks.

Princenuk ( 2016-02-26 18:27:59 +0800 )edit

4 Answers

Sort by ยป oldest newest most voted

answered 2016-02-16 07:45:53 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9

For tomcat, you need to stop tomcat, recompile your sources and publish the project to before you run the tomcat again.

But for dev environment you could switch to Jetty.(lighter and faster)
And after all your changes you can run Tomcat to check if all changes are also correct in Tomcat.

Greetz Chill.

link publish delete flag offensive edit

answered 2016-02-16 23:14:28 +0800

Darksu gravatar image Darksu
1991 1 4

Hello Princenuk,

I found a very interesting post that is related with your issue.


Please take a look and let me know.

Best Regards,


link publish delete flag offensive edit

answered 2016-02-16 10:44:00 +0800

Darksu gravatar image Darksu
1991 1 4

Hello Princenuk,

In addition you could also set Eclipse to Build the project automatically, then restart tomcat.



link publish delete flag offensive edit

answered 2016-02-17 14:52:52 +0800

gganassin gravatar image gganassin flag of Luxembourg
540 6

updated 2016-02-17 14:53:08 +0800


Sometimes it is handy to check what Eclipse is physically deploying on Tomcat: you can dig into hidden Eclipse's workspace folders OR you can :

1 - undeploy the webapp from Tomcat

2 - clean Tomcat

3 - on the Server view, doble click you Tomcat configuration

4 - on the opened editor, find "deploy folder" and specify the directory you like. Save it and close.

5 - redeploy the webapp and start Tomcat

Finally you can check what is going on as deployment by checking the directory you specified: if you see no WEB-INF/classes it means you are not building the project.


link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2016-02-15 22:52:18 +0800

Seen: 33 times

Last updated: Feb 17 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More