Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Command line execution
Command line execution [message #62156] Mon, 09 May 2005 17:29 Go to next message
Eclipse UserFriend
Originally posted by: timothy.williams.comverse.com

I've built a java program within the IDE. Everything works fine.

Now I want to run the program from the command line so I can
put the program into a script.

From within the directory that my main class resids I run,

java -cp <my libs> main.test

Result:

Exception in thread "main" java.lang.NoClassDefFoundError: test_main

Anyone know what I'm doing wrong so this can run?

thanks

Tim
Re: Command line execution [message #63276 is a reply to message #62156] Thu, 12 May 2005 06:57 Go to previous message
Eclipse UserFriend
Originally posted by: aronbock.hotmail.com

Tim,

This is one of the pitfalls of using an IDE--it handles so much of the
setting-up for us that we're often lost without it. In your commandline
example:

java -cp <my libs> main.test

you're implying that you're trying to run a public static void main() method
in a class called test, which is itself in a package called main. If that
isn't your package/class layout, you may want to refer a link such as
http://www.cs.cornell.edu/courses/cs211/2003fa/Sections/Comm on/S1/applications.html


Regards,

--A

"Tim Williams" <timothy.williams@comverse.com> wrote in message
news:658c45cc434983dc48efe662a4e273c4$1@www.eclipse.org...
> I've built a java program within the IDE. Everything works fine.
>
> Now I want to run the program from the command line so I can
> put the program into a script.
>
> From within the directory that my main class resids I run,
>
> java -cp <my libs> main.test
>
> Result:
>
> Exception in thread "main" java.lang.NoClassDefFoundError: test_main
>
> Anyone know what I'm doing wrong so this can run?
>
> thanks
>
> Tim
>
Previous Topic:Updating plugins without using Update Sites, etc?
Next Topic:Problems with launching Eclipse 3.1M6 on x86_64 Linux Box
Goto Forum:
  


Current Time: Sat Nov 09 00:01:13 GMT 2024

Powered by FUDForum. Page generated in 0.27515 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top