• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

I cant open my .class files

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Always! Wait. Never. Shut up. Look at this tiny ad.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic