Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2776

Re: Java wont open in command promt

Newsgroups comp.lang.java.help
Date 2013-09-28 07:30 -0700
References <7e773bf1-224a-4619-ae99-766002df5f40@googlegroups.com> <l22tbc$qei$1@dont-email.me> <a429b51d-70b4-4cfa-97fa-cf17ad8fe801@googlegroups.com> <l25edb$kbi$1@dont-email.me>
Message-ID <cc835b98-4444-4cc8-af2e-8720ff9eeb55@googlegroups.com> (permalink)
Subject Re: Java wont open in command promt
From mmbell10 <mmbell101@gmail.com>

Show all headers | View raw


On Friday, September 27, 2013 6:20:30 PM UTC-8, Eric Sosman wrote:
> On 9/27/2013 9:52 PM, mmbell10 wrote:
> 
> > On Thursday, September 26, 2013 7:17:01 PM UTC-8, Eric Sosman wrote:
> 
> >> On 9/26/2013 8:37 PM, mmbell10 wrote:
> 
> >>
> 
> >>> 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
> 
> esosman@comcast-dot-net.invalid

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!

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Java wont open in command promt mmbell10 <mmbell101@gmail.com> - 2013-09-26 17:37 -0700
  Re: Java wont open in command promt Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-09-26 23:17 -0400
    Re: Java wont open in command promt mmbell10 <mmbell101@gmail.com> - 2013-09-27 18:52 -0700
      Re: Java wont open in command promt Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-09-27 22:20 -0400
        Re: Java wont open in command promt mmbell10 <mmbell101@gmail.com> - 2013-09-28 07:30 -0700
  Re: Java wont open in command promt mmbell10 <mmbell101@gmail.com> - 2013-09-27 18:51 -0700
  Re: Java wont open in command promt kharmonvet@gmail.com - 2014-01-22 07:31 -0800

csiph-web