This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes practicing programs with cmd & notepad. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "practicing programs with cmd & notepad." Watch "practicing programs with cmd & notepad." New topic
Author

practicing programs with cmd & notepad.

Senthil Kumaran
Ranch Hand

Joined: Aug 24, 2008
Posts: 32
hi, all.
what all should i do to practice programs in my system without using netbeans or eclipse,
i tried with sun site, it has got jdk, kre, jde ee , which one to download & install,
how to make link path to command prompt to compiler,
please somebody helpme,
k karthika
Greenhorn

Joined: Feb 10, 2009
Posts: 7
hi

i think jdk with jre is enough for you now.

http://faq.javaranch.com/java/HowToSetTheClasspath for setting classpath

try to search in for your doubts, that will help you to learn a lot




regards
karthika

"There is one quality that one must possess to win, and that is definiteness of purpose, the knowledge of what one wants and a burning desire to possess it" - Napolean Hill
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3817

Senthil Kumaran wrote:how to make link path to command prompt to compiler


Just need to set the "path" environment variable (on windows) to the bin folder of your JDK installation.
Check the BeginnersFaq, which for all the details.

No need to set the CLASSPATH at the beginning (unless you are using any third party classes to compile your program).

SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38044
    
  22
What you install is called jdk6update12. Don't install jre; jdk includes the jre.
As you have been told, set your system PATH and forget about the CLASSPATH at this stage.
Download a nice text editor designed for programming, eg jEdit, Notepad2, Notepad++, if you are using Windows. Notepad as included with Windows is not very good for programming.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19655
    
  18

Campbell Ritchie wrote:Notepad as included with Windows is not very good for programming anything.

Fixed


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38044
    
  22
Rob Prime wrote:
Campbell Ritchie wrote:Notepad as included with Windows is not very good for programming anything.

Fixed
I was being polite
Senthil Kumaran
Ranch Hand

Joined: Aug 24, 2008
Posts: 32
you didnt reply me yet sir, please say me about compiling with notepad2 using cmd prompt,.,
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38044
    
  22
Patience. It's been less than 10 minutes.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

  • Download the JDK
  • Read the installation instructions
  • Start with Sun's Hello World tutorial


  • Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
    Scala Notes - My blog about Scala
    Campbell Ritchie
    Sheriff

    Joined: Oct 13, 2005
    Posts: 38044
        
      22
    Sorry, I had to download Notepad2 myself before trying it out.
    I presume you have read the Java Tutorial section about the "hello world" application?
    What you do is
  • Open Notepad2
  • Save the file in an appropriate location: create a "Java" folder somewhere, maybe in "my documents"
  • Save the file with an appropriate name, ClassName.java, where ClassName must be the same as the name of the class.
  • Write the Java code in Notepad2, and save again.
  • Open a command prompt and navigate to the folder where your .java file is. If you created a java file in my documents, you just write "cd Java".
  • write "javac ClassName.java"
  • Write "java ClassName"
  • Note where you do say .java and where you don't say .java. Look out for error messages. In the link I gave you, go up one folder (click on where it says "trail" at the top) and look for the "common problems" section.
    Campbell Ritchie
    Sheriff

    Joined: Oct 13, 2005
    Posts: 38044
        
      22
    Rob Prime wrote:
    Campbell Ritchie wrote:Notepad as included with Windows is not very good for programming anything.

    Fixed
    When www.vnunet.com recommended Notepad2 (and the similar Notepad++) as better text editors than Notepad (about 3-4 years ago) somebody wrote in to complain and said Notepad was good because it can support right-to-left writing.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: practicing programs with cmd & notepad.
     
    Similar Threads
    How to share database connection pool across multiple JVM?
    java jar Question
    CHEECKY but i need help FAST please!
    Launch Browser Window
    overloading and overriding doubt!