• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JCreator?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use any text editor.
The reason it didn't work is not because of the editor.
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To compile java programs from the command prompt CLASSPATH has to be modified to include the java bin directory.

-Vinayak
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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".
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Vinayak patil
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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...
 
Allan Newman
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
could anyone tell me what the java compiler is labeled as or looks like, because i can't find it
 
Allan Newman
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
alright sorry for all the posts...

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

error: cannot read: Salution.java
 
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Allan Newman
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
reply
    Bookmark Topic Watch Topic
  • New Topic