• Post Reply Bookmark Topic Watch Topic
  • New Topic

I cant open my .class files  RSS feed

 
Collin Sullivan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know absolutely nothing about programming but I am facinated by it so I decided to give it a try. Pretty hard stuff to figure out on your own though.

I downloaded the jdk and finally got something compiled but when I went to open the .class file the compiler created it didnt know what to open it with. I cant find java virtual machine anywhere while browsing the list either.

What now?
 
Patrick van Zandbeek
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aha! You are horribly confused. Brings back memories of my first effort at programming (though java didn't exist back then, so you're lucky).


What the compiler (javac) does is create bytecode which can be read by the jvm. You asked how to open the program, but assuming you made a working source code file with a proper main then you can run the program with the (java) command. so:

javac MyHelloWorld.java <-- you already did that
java MyHelloWorld <-- now try this

in that order.

Anyway, a good idea is to read over this here faq

It gives you some basic starting points.

Good luck
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, welcome to the ranch! This should be a good place to work out some of your questions.

Apologies to the regulars, I've been repeating myself around here lately. See if THIS helps. Let me know if any of it was good or bad for you.
[ August 26, 2005: Message edited by: Stan James ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!