Discussion:
Java wont open in command promt
(too old to reply)
mmbell10
2013-09-27 00:37:28 UTC
Permalink
My java.exe not run in the command promt!

I'm positive that I'm updated to the latest 64 bit java

I'm trying to make a modded Minecraft server that uses a batch file running from java, but it wont work because wont even run through cmd!

Any help is welcome!
Thank you!
Eric Sosman
2013-09-27 03:17:01 UTC
Permalink
Post by mmbell10
My java.exe not run in the command promt!
Neither does mine -- not until I type "java" plus additional
command-line arguments and then press Enter. Try doing that,
and then tell us

EXACTLY what you typed
EXACTLY what happened next
EXACTLY what messages appeared (ALL of them)

"Not run" all by itself isn't enough information to support
a diagnosis.
--
Eric Sosman
***@comcast-dot-net.invalid
mmbell10
2013-09-28 01:52:13 UTC
Permalink
Post by Eric Sosman
Post by mmbell10
My java.exe not run in the command promt!
Neither does mine -- not until I type "java" plus additional
command-line arguments and then press Enter. Try doing that,
and then tell us
EXACTLY what you typed
EXACTLY what happened next
EXACTLY what messages appeared (ALL of them)
"Not run" all by itself isn't enough information to support
a diagnosis.
--
Eric Sosman
I just opened the command promt and typed in java and hit enter. it came up with a list of stuff the im going to assume is the java program. then i typed java.exe and it did the same thing. but then when i tried clicking on the actual java.exe in my program files, the cmd promt opened really quicly and then shut down. what commands should i type? im fairly new at this stuff.. sorry.
My main problem is that when i try to make my batch file for my modded minecraft server, it just opens the cmd promt and the closes it quickly. Still not sure what to do? Thanks for the response though!
Eric Sosman
2013-09-28 02:20:30 UTC
Permalink
Post by mmbell10
Post by Eric Sosman
Post by mmbell10
My java.exe not run in the command promt!
Neither does mine -- not until I type "java" plus additional
command-line arguments and then press Enter. Try doing that,
and then tell us
EXACTLY what you typed
EXACTLY what happened next
EXACTLY what messages appeared (ALL of them)
"Not run" all by itself isn't enough information to support
a diagnosis.
I just opened the command promt and typed in java and hit enter. it came up with a list of stuff the im going to assume is the java program. then i typed java.exe and it did the same thing. but then when i tried clicking on the actual java.exe in my program files, the cmd promt opened really quicly and then shut down. what commands should i type? im fairly new at this stuff.. sorry.
My main problem is that when i try to make my batch file for my modded minecraft server, it just opens the cmd promt and the closes it quickly. Still not sure what to do? Thanks for the response though!
The "java" command launches the Java Virtual Machine, but
you must also tell the JVM what you want it to do: What class
should it load and execute? The JVM cannot read your mind to
learn which of the thousands (literally!) of class files on
your machine is the one you happen to be interested in! This
information (and other stuff, mostly optional) comes from the
command-line arguments, for example

java com.mmbell.minemod.MainClass

... to load the MainClass class of the com.mmbell.minemod
package and call its `public static void main(String[])' method.
Even this won't work if the JVM can't find the right package
directories or can't find the MainClass.class file. See

<http://en.wikipedia.org/wiki/Classpath_%28Java%29>

... for a brief explanation. (Recommendation: Don't use
the CLASSPATH environment variable; it's more trouble than
it's worth.)

There's also a mechanism for loading classes from an archive
called a "jar file;" from the very little you've disclosed I
can't tell whether you need this or not.

Just typing "java" starts the JVM, but when it sees you
haven't told it what to do it displays a help message and quits.
When you click on the executable file in Windows, a command
window opens, the JVM starts, the JVM writes its help message
and exits, and then Windows says "Aha: *That's* finished, now
I can erase the command window nobody's using any more" so you
don't even see the help message unless your vision is uncommonly
good. When you run unadorned "java" from your batch file, once
again the JVM starts, sees it has nothing to do, writes its
help message (somewhere), and exits.
--
Eric Sosman
***@comcast-dot-net.invalid
mmbell10
2013-09-28 14:30:36 UTC
Permalink
Post by Eric Sosman
Post by mmbell10
Post by Eric Sosman
Post by mmbell10
My java.exe not run in the command promt!
Neither does mine -- not until I type "java" plus additional
command-line arguments and then press Enter. Try doing that,
and then tell us
EXACTLY what you typed
EXACTLY what happened next
EXACTLY what messages appeared (ALL of them)
"Not run" all by itself isn't enough information to support
a diagnosis.
I just opened the command promt and typed in java and hit enter. it came up with a list of stuff the im going to assume is the java program. then i typed java.exe and it did the same thing. but then when i tried clicking on the actual java.exe in my program files, the cmd promt opened really quicly and then shut down. what commands should i type? im fairly new at this stuff.. sorry.
My main problem is that when i try to make my batch file for my modded minecraft server, it just opens the cmd promt and the closes it quickly. Still not sure what to do? Thanks for the response though!
The "java" command launches the Java Virtual Machine, but
you must also tell the JVM what you want it to do: What class
should it load and execute? The JVM cannot read your mind to
learn which of the thousands (literally!) of class files on
your machine is the one you happen to be interested in! This
information (and other stuff, mostly optional) comes from the
command-line arguments, for example
java com.mmbell.minemod.MainClass
... to load the MainClass class of the com.mmbell.minemod
package and call its `public static void main(String[])' method.
Even this won't work if the JVM can't find the right package
directories or can't find the MainClass.class file. See
<http://en.wikipedia.org/wiki/Classpath_%28Java%29>
... for a brief explanation. (Recommendation: Don't use
the CLASSPATH environment variable; it's more trouble than
it's worth.)
There's also a mechanism for loading classes from an archive
called a "jar file;" from the very little you've disclosed I
can't tell whether you need this or not.
Just typing "java" starts the JVM, but when it sees you
haven't told it what to do it displays a help message and quits.
When you click on the executable file in Windows, a command
window opens, the JVM starts, the JVM writes its help message
and exits, and then Windows says "Aha: *That's* finished, now
I can erase the command window nobody's using any more" so you
don't even see the help message unless your vision is uncommonly
good. When you run unadorned "java" from your batch file, once
again the JVM starts, sees it has nothing to do, writes its
help message (somewhere), and exits.
--
Eric Sosman
thank you for all the help. I fixed it using a diagnostic command and then realizing the my browser was 32 and 64 bit so thanks for the help!
mmbell10
2013-09-28 01:51:19 UTC
Permalink
Post by mmbell10
My java.exe not run in the command promt!
I'm positive that I'm updated to the latest 64 bit java
I'm trying to make a modded Minecraft server that uses a batch file running from java, but it wont work because wont even run through cmd!
Any help is welcome!
Thank you!
I just opened the command promt and typed in java and hit enter. it came up with a list of stuff the im going to assume is the java program. then i typed java.exe and it did the same thing. but then when i tried clicking on the actual java.exe in my program files, the cmd promt opened really quicly and then shut down. what commands should i type? im fairly new at this stuff.. sorry.
My main problem is that when i try to make my batch file for my modded minecraft server, it just opens the cmd promt and the closes it quickly. Still not sure what to do? Thanks for the response though!
k***@gmail.com
2014-01-22 15:31:49 UTC
Permalink
Post by mmbell10
My java.exe not run in the command promt!
I'm positive that I'm updated to the latest 64 bit java
I'm trying to make a modded Minecraft server that uses a batch file running from java, but it wont work because wont even run through cmd!
Any help is welcome!
Thank you!
I had the same problem at one time until I downloaded the Elevated Command Prompt. Try doing that and see if it helps. It did for me.
Loading...