File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes How to run a class outside JDeveloper IDE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to run a class outside JDeveloper IDE" Watch "How to run a class outside JDeveloper IDE" New topic

How to run a class outside JDeveloper IDE

Bob Fike

Joined: Dec 21, 2011
Posts: 1
I have created a Java Class called pi_hourly_volumes and placed it in a package called noble_pi_projects. I did this in JDeveloper IDE. It runs fine within JDeveloper but when I try to execute the class from a command window on Windows I get:

Exception in thread "main" java.lang.NoClassDefFoundError: noble_pi_projects\pi_hourly_volumes
Could not find the main class: noble_pi_projects\pi_hourly_volumes

I did the following from a command prompt window to get this error:

java noble_pi_projects\pi_hourly_volumes

What am I doing wrong?

Jeff Verdegan

Joined: Jan 03, 2004
Posts: 6109

If the class is not in a package, and the .class file is C:\x\y\Foo.class, then you execute

If the class in in a package, say,, and the .class file is C:\x\y\com\bar\Foo.class, then

Note how the root of the package is inside a classpath directory.

There should be enough there for you to google for more details and examples.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: How to run a class outside JDeveloper IDE