It's not a secret anymore!*
The moose likes Beginning Java and the fly likes JCreator? 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 "JCreator?" Watch "JCreator?" New topic
Author

JCreator?

Allan Newman
Greenhorn

Joined: Mar 06, 2006
Posts: 10
Do you have to use jCreator when writing java code or can you use notebook? One book that I started reading had me use the notebook and to run it in the command line but that didn't work. If you can use notebook then could someone explain how. Sorry for this very "noobish" question.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

You can use any text editor.
The reason it didn't work is not because of the editor.


[My Blog]
All roads lead to JavaRanch
Vinayak patil
Ranch Hand

Joined: Aug 30, 2005
Posts: 67
To compile java programs from the command prompt CLASSPATH has to be modified to include the java bin directory.

-Vinayak


"I can resist everything except temptation"
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Originally posted by Vinayak patil:
To compile java programs from the command prompt CLASSPATH has to be modified to include the java bin directory.

-Vinayak


No. First, CLASSPATH never has to be modified, and generally shouldn't be, especially for those new to Java. Second, if you did modify it, it points to places for Java to find classes, not for places for the OS to find programs like javac.

The PATH environment variable needs to include JDK_HOME\bin, yes; otherwise you'd have to type "C:\JDK1.5.0_05\bin\javac" insread of just "javac".


[Jess in Action][AskingGoodQuestions]
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Hi Allan, welcome to JavaRanch!

For Windows, see this Hello World example. In particular, note that when you save your Java source file in NotePad, the file type should be plain text (.txt) and the file name should be enclosed in quotes to include the .java extension.

If you have specific problems with this, or are running an OS other than Windows, let us know.

For convenience, you can update the PATH variable (see step 5 of these installation instructions for Windows), but at this point you should not need to use the CLASSPATH variable at all.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Vinayak patil
Ranch Hand

Joined: Aug 30, 2005
Posts: 67
To compile java programs from the command prompt CLASSPATH has to be modified to include the java bin directory.

-Vinayak


My mistake. Not careful enough while typing. Will avoid in future. Thanks Ernest for pointing it out.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Allan Newman:
If you can use notebook then could someone explain how.


That would be much easier if you told us what problems you encountered...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Allan Newman
Greenhorn

Joined: Mar 06, 2006
Posts: 10
well...it currently says javac is not recognized as an internal or external command, operable program or batch file.

i didn't want to post again, because it says what to do if you get that response so i searched for the compiler but couldn't find it so i am downloading java again and trying again.
Allan Newman
Greenhorn

Joined: Mar 06, 2006
Posts: 10
could anyone tell me what the java compiler is labeled as or looks like, because i can't find it
Allan Newman
Greenhorn

Joined: Mar 06, 2006
Posts: 10
alright sorry for all the posts...

whoohoo i got it to work, well not really. it now reads

error: cannot read: Salution.java
Rusty Shackleford
Ranch Hand

Joined: Jan 03, 2006
Posts: 490
With your classpath set correctly, all you need to do is make sure your command prompt is pointing to the floder in which your .java files resides.

If your filei s in projects/program1 for instance the command prompt should look like this:

C:\projects\program1>javac Salution.java

Everything before the > can be changed by using CD command, or going into command prompt properties and adding the path on the Start in line

You may be tempted to put your files in the bin folder of your java install but do not do this. Keep your .java files in a seperate folder. Otherwise things will get messy. Create a folder and name it projects or whatever and then add seperate folders inside that to store your programs.


"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
Allan Newman
Greenhorn

Joined: Mar 06, 2006
Posts: 10
Alright i got it to work.
Thank you for all the help.

Also thanks for the tip not to put it in the java folder, otherwise i would have.

I also have a question what percentage of people use notebook, jcreator, netbeans, and other software.

One more question, is it posible to create a web page all on java? and if possible is there one out there on the internet that shows it?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JCreator?
 
Similar Threads
New MacBook Pro!
'import' question
Best IDE to certification ?
won't let me input integer values
Good text editor