[Last Call] Learn how to a build a cloud-first strategyRegister Now


Java Installation Troubles

Posted on 2006-04-23
Medium Priority
Last Modified: 2013-11-23
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.
Question by:SchmidtZ28
  • 4
  • 2

Author Comment

ID: 16521064
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?
LVL 16

Expert Comment

ID: 16521468

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

LVL 16

Expert Comment

ID: 16521472

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Expert Comment

ID: 16523543

first open a command prompt and try:

java -v

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..

Author Comment

ID: 16526270
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)

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

LVL 16

Expert Comment

ID: 16532585

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

LVL 16

Accepted Solution

suprapto45 earned 2000 total points
ID: 16532600

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month17 days, 16 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question