Use Java Project in another project

Asked

Viewed 1,006 times

1

I have a web java project (a kind of framework) and I want to use it in my main project(the application), but I don’t want to generate a .jar. I want to use it directly within my project so that when I need to make some changes I don’t need to all did compile a .jar. I added the project in Properties > java build path > Projects I can use the other project classes normally, but when running the project in the browser I get the error:

java.lang.ClassNotFoundException: com.jmsys.client.component.botao.BotaoConfirmar

How can I do that ?

  • Use Maven, it’s easier. If you already use Maven put the following dependency. <dependency> <groupid>${project.groupid}</groupid> <artifactId>name of your project</artifactId> <version> version of your project </version> </dependency>

  • Right, I created the project without using mavem, it is possible to use it after the project created ?

  • it is possible. But make a backup before. follows links

  • http://answall.com/questions/53706/como-converter-um-projeto-java-em-eclipse-para-um-projeto-maven

  • http://maven3tutorial.blogspot.com.br/2011/06/converta-projeto-web-do-eclipse-para.html#. V30ncmgridu

  • 1

    Thanks Marcelo, this will help me tbm.

  • @Jetersonmirandagomes, can you tell me how you use the class of the other project?

Show 2 more comments

1 answer

1


I believe we are missing compile the classes. If you are using Eclipse go to the menu and select: Project > Clean. In the box that will open select Clean Projects Selected Below, check the projects you are working on and click OK. Then post the changes to the server. You must resolve.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.