Running Java through Command Prompt?

March 16, 2011 at 05:13:25
Specs: Windows XP
I am having trouble with running java through Comand Prompt. The classpaths are definitely correct, since the HelloWorld runs ok. But when I try to run another program, I get the error:

java.lang.NoClassDefFoundError: Plot <wrong name: myjava/Plot>
at java.lang.ClassLoader.defineClass1<Native Method>
at java.lang.ClassLoader.defineClassCond<Unknown Source>
at java.lang.ClassLoader.defineClass<Unknown Source>
at java.Security.SecureClassLoader.defineClass<Unknown Source>
at java.url.URLClassLoader.defineClass<Unknown Source>
at java.url.URLClassLoader.access$000<Unknown Source>
at java.url.URLClassLoader$1.run<Unknown Source>
at java.Security.AccessController.doPrivileged<Native Method>
at java.url.URLClassLoader.findClass<Unknown Source>
at java.lang.ClassLoader.loadClass<Unknown Source>
at sun.misc.Launcher$AppClassLoader.loadClass<Unknown Source>
at java.lang.ClassLoader.loadClass<Unknown Source>

I have no idea what to do next.


See More: Running Java through Command Prompt?

Report •


#1
March 16, 2011 at 06:34:40
I have no idea what to do next.
The same thing anyone in IT does when they get stumped: Google.

How To Ask Questions The Smart Way


Report •

#2
March 16, 2011 at 06:37:46
lol, I've done that already, I didn't find anything that worked so far

Report •

#3
March 16, 2011 at 13:48:19
@Razor2.3 your URL doesn't seem to work the way you intended it. Perhaps it should be this?

@stst what is the command line you used?


Report •

Related Solutions

#4
March 16, 2011 at 13:52:27
What do you get when you use the original link? It works fine for me, but I'm in the US.

How To Ask Questions The Smart Way


Report •

#5
March 21, 2011 at 17:49:25
I get the Google home page, which is not quite what you intended. Your URL link goes to:

http://www.google.com/#q=java.lang....

which tells the browser to go to www.google.com/ and then look for an anchor named q=... inside the page.


Report •

#6
March 22, 2011 at 05:28:42
That's how Google used to work, but then things changed when they went with their Instant Search. (aka WE MUST SHOW OFF OUR CACHING!) It's something for me to keep in mind; normally I just submit a query to Google, and chop off everything after the "q=" part. Otherwise, I'd end up with a link like this.

Is Instant Search not enabled where you are?

How To Ask Questions The Smart Way


Report •

#7
March 25, 2011 at 05:26:35
Instant Search is enabled. But I still don't understand what that has to do with your your URL. What I'm saying is that when you present a link to

http://www.google.com/#q=SearchTerm

(which is what you're doing)

then the browser just requests "/" from www.google.com. Google is not even given a chance to know that you're looking for "#q=SearchTerm". The request is terminated at the hash sign. Anything appearing after the hash is used internally by the browser only.

Perhaps you're actually typing something else, like a question mark "?" into the text box but computing.net is changing that into "#"?


Report •


Ask Question