Find the .class file compiled by Eclipse
your java file location should be: org/odata4j/tomcat/ExampleProducerFactory.java
then you can on command line do: javac org/odata4j/tomcat/ExampleProducerFactory.java
which will create the compiled class file: org/odata4j/tomcat/ExampleProducerFactory.class
put that in a folder WEB-INF/classes/org/odata4j/tomcat/ExampleProducerFactory.class
but better yet, create "Dynamic Web Project" in eclipse, which will take care of everything for you (just use defaults). the end result will be a .war
file which you can create by the menu option: file->export
such a .war
file can be deployed in any web container such as tomcat. look for an autodeploy directory within your tomcat or use the tomcat managment console to deploy it.
I find my classes files in Project -> Properties -> Java Build Path at field Default output folder. To me the default was 'project-name/target/classes'.
When you save your .java
file, Eclipse will compile it into a .class
file if there are not compiler errors. You can usually find this file in the bin
subdirectory of your project. In particular, it will be in bin/org/odata4j/tomcat
because you have declared your class to belong to the org.odata4j.tomcat
package. Feel free to copy this file anywhere you wish.
Note: You should only use org.odata4j
in your package name if you own the odata4j.org
domain. Otherwise, you should choose your own package name.