Java Installation Troubles

I want to be able to compile and run some java files. I know I have to download to SDK from java.sun however I did and I'm still unable to compile any java files after I installed this;

Download J2SE Development Kit 5.0 Update 6 with NetBeans IDE 5.0 Bundle

from http://java.sun.com/j2se/1.5.0/download-netbeans-50.html

I'm I missing a software package or something.

Also I know at school where I usually compile all my code if I view the java file there's usually an icon, but my java files on my computer have no icon, meaning its not recognized as a java file right now. Sorry I'm new to java and have no idea whats up.
SchmidtZ28Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SchmidtZ28Author Commented:
Also under my C:\Program Files\Java directory i have jdk1.5.0_06 and jre1.5.0_06, but on the installation guide from school they say I did j2sdk1.5.0_06 or similar folder do I need this software and how do I get it?
suprapto45Commented:
Hi,

It seems that your Java installation is successfully installed. May I know how do you compile your Java classes?

David
suprapto45Commented:
http://java.sun.com/j2se/1.4.2/install-windows.html

Look at point 5 - "Update the PATH variable" to make your javac.exe, java.exe available from any directory

David
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

cincin77Commented:
hi,

first open a command prompt and try:

java -v
javac

does your windows know the path for these commands or it says "No command found".

if you have javac, try:
javac Your_class_name.java

after that you should have a file Your_class_name.class.
assuming you did not use any package statement in your java file,
"java Your_class_name" will run your class' main method.

hope this helps..
SchmidtZ28Author Commented:
Ok I have a sample java file which I know works however I can't get it to run on my laptop;

public class DebugOne1
{
  /* This program prints a greeting*/
  public static void main(String[] args)
      {
      System.out.println("Hello");
  }
}

I run cmd

C:\> E:
E:\> cd 108 Lab\Week1
E:\108 Lab\Week1>path =C:\Program Files\Java\jdk1.5.0_06\bin
E:\108 Lab\Week1>javac DebugOne1.java
E:\108 Lab\Week1>java DebugOne1

Exception in thread "main" java.lang.NoClassDefFoundError: DebugOne1


suprapto45Commented:
Hi

It means that you have successfully installed Java. It has the problem on classpath only. Let me direct you to the right way.

David

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.