aspose file tools*
The moose likes Beginning Java and the fly likes Basic Questions :D Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Basic Questions :D" Watch "Basic Questions :D" New topic
Author

Basic Questions :D

Fyle
Greenhorn

Joined: Apr 19, 2005
Posts: 25
I am very excited because today, I managed to achieve something great for a bloody programming greenhorn: I coded my first, own Hello World! program using Swing. It was a self-test problem in my book, and it was within the graphical supplement chapter. All it asked was to write a simple program that would output the string "Hello World!" in a window. It turned out to be harder than I thought, because I first added the Java class-path to the "java", "javac" etc. tools into the Windows environment variables line. The command prompt kept throwing errors at me for some reason, even when I was dead sure I had done it right, (the environment variable thing).

{I will go OT here just for a moment to clear some things up. You know how the different paths in that environment variable "path" line in the Windows environment variables setting are separated by semicolon? Does the LAST item in the list require a semicolon behind it in order for it to be a valid entry to the line? I was getting errors from the command prompt and figured it would be because I had a type in the pathline I had entered. In the end, I just added a semicolon after the last item in the list and it worked. I'm not sure if it needs one there or not. Thanks!)

I've chosen UltraEdit32 as my text-editor of choice. I also have TextPad installed, but I prefer UltraEdit32 for no good reason. I guess it's more advanced and has a nicer feel to it. I like all the awesome functionality in UltraEdit32, like auto-indent, syntax highlighting, and all the other fun stuff. I'm sure TextPad has some or even most of these features as well, but I somehow just like the feel of UltraEdit32 better. I haven't had much time to compare them, anyway. If you have any comments on the two editors, you're very welcome to tell me all about either of them or both

I had the problem of not knowing hot to permanently turn on text-wrap in UE32, but I just solved that. Now I have two more very important questions. One is, how do I use Java Documentation? I saw this, http://faq.javaranch.com/view?JavaApiDocs, and still need help. I'm just not sure how to use this thing. I downloaded "jdk-1_5_0-doc.zip" and unpacked it in my C:\Program Files\Java\jdk1.5.0_03 folder. Now there's a bunch of folders in there and an index.html file. Hmmmm.. so do I just bookmark the index.html in my browser and use that? Also, I read something about doclets... what would those be?

Something that is at least as crucial, if not more so, is the following: I managed to configure the environment variable so I can easily use the java and javac commands for compiling and running my source-code. That's great, but something else is reaaaally bugging me. My default directory for my source code files is C:\JAVA. The command prompt, (using WINKEY + R, "cmd") starts up in a different location. So every time I want to either compile or run my source code, I have to manually navigate to C:\JAVA. Is there any way to get around that? I don't want to be typing "cd C:\JAVA" every single time I want to compile/run my code.


Thank you very much! Things are shaping up nicely so far and I'm having a lot of fun with Java


I break through the boundaries of the color-spectrum of "green", into unforeseen depths of greenhornia. Bare with me :/
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
In answer to your first question, it is alot easier to search through the API documentation in winhelp or htmlhelp format, you can download that from here. If you meant to ask how should you document your own programs then you need to look at How to Write Doc Comments for the Javadoc Tool.
In answer to your second question, you can specify where to compile from on the command line e.g.

I advise you not to use swear words in your posts in future as you may well be
Dave Lenton
Ranch Hand

Joined: Jan 20, 2005
Posts: 1241
Originally posted by Ismar Iljazovic:
Something that is at least as crucial, if not more so, is the following: I managed to configure the environment variable so I can easily use the java and javac commands for compiling and running my source-code. That's great, but something else is reaaaally bugging me. My default directory for my source code files is C:\JAVA. The command prompt, (using WINKEY + R, "cmd") starts up in a different location. So every time I want to either compile or run my source code, I have to manually navigate to C:\JAVA. Is there any way to get around that? I don't want to be typing "cd C:\JAVA" every single time I want to compile/run my code.


If you are using windows, you can get the command prompt to start up in the directory of your choice by:

* Right clicking somewhere and selecting New->Shortcut
* In the location field, type "cmd"
* Right click on the icon created and select the properties menu
* One of the fields is called Start in. Type "c:\java" in here.

Now when you double click on this icon, you'll get the command prompt starting in your java directory.

There's probably a better/quicker way to do it, but I can't think of one off of the top of my head.....


There will be glitches in my transition from being a saloon bar sage to a world statesman. - Tony Banks
Fyle
Greenhorn

Joined: Apr 19, 2005
Posts: 25
I will try your suggestions. Thanks a lot guys.

Is there any way I can "subscribe" to threads in this forum? This forum is oddly "simple". No advanced features anywhere. Maybe that's why I can't find this option

Thanks for your help
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
By "subscribe to the forum" do you mean that you want to recieve email notifications? If you start a new post, there is a check box at the very bottom of the page that you can select to recieve email notifications. Unfortunately, that's all there is along these lines. Personally, I'd like to be able to recieve emails about other threads as well...maybe someone can suggest this to the admins

Layne


Java API Documentation
The Java Tutorial
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
how do I use Java Documentation?


Personally, I learned about Java and the classes in the APIs by reading Core Java by Cay Horstmann and Gary Cornell. Once I learned what classes were available, I could use the API docs you mentioned in order to refersh my memory on the methods that are available. I also occassionaly just browse the docs to learn about any classes that I don't know about. This probably isn't the most efficient way most of the time since there are many good tutorials available to get you started with the basics. In particular, you should take a look at Sun's Java Tutorial. It is a great place to get started with the basics. Then once you have the general idea about what certain classes do, you can use the API docs (the ones that you downloaded) when you need to look up specific information.

Layne
Fyle
Greenhorn

Joined: Apr 19, 2005
Posts: 25
This is the book I use for my introductory Computer Science course with Java: http://vig.prenhall.com:8081/catalog/academic/product/0,1144,0131492020,00.html

It's a great book. I'm reading it now, and then I have to do some problems from it. Comes with chapter-independent graphical supplements as well, which are based on Swing.
I successfully set up my UltraEdit32 last night, and now I'm eager to see if what I did actually works .

As for the forum... this forum is a great resource, and quite a friendly place, I just wish it was more advanced on the technical side. I don't know if most of the features are simply disabled or if this forum-script is simply that low on features, but I'd like to see something similar to vBulletin in action here, with advanced options. Just my 2 cents
Fyle
Greenhorn

Joined: Apr 19, 2005
Posts: 25
One thing I wish I could do is post images on this forum. Since I can't, please see this post to answer my biggest question right now: http://www.dslreports.com/forum/remark,13578201

It's about configuring UltraEdit32 to compile and run Java code. For some reason, it's refusing to work, despite my having followed a bunch of guides on how to set it up correctly.

Help help help... :/

TIA
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
This isn't really a Java question since the problem is with your editor. You should contact the UltraEdit developers or find a message board or mailing list that caters to that editor specifically.

Sorry that I can't be much help than this, but I have never used that particular editor before.

Layne
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Does the LAST item in the [PATH] list require a semicolon behind it in order for it to be a valid entry to the line?

I don't have a final semicolon in my PATH or CLASSPATH (Win2k)

I've chosen UltraEdit32 as my text-editor of choice. I also have TextPad installed, but I prefer UltraEdit32 for no good reason. ... I haven't had much time to compare them, anyway. If you have any comments on the two editors, you're very welcome to tell me all about either of them or both

I used UE32 a few years ago and really liked it a lot. I've been using TextPad more recently though. They are/were pretty similar.

I downloaded "jdk-1_5_0-doc.zip" and unpacked it in my C:\Program Files\Java\jdk1.5.0_03 folder. Now there's a bunch of folders in there and an index.html file. Hmmmm.. so do I just bookmark the index.html in my browser and use that?

Yes.

Also, I read something about doclets... what would those be?

They are used to create javadocs. You don't need to worry about them usually, especially not if you just want to read/study the docs.

So every time I want to either compile or run my source code, I have to manually navigate to C:\JAVA. Is there any way to get around that?

I use the shortcut method described above.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Originally posted by Ismar Iljazovic:
Is there any way I can "subscribe" to threads in this forum? This forum is oddly "simple". No advanced features anywhere. Maybe that's why I can't find this option


Originally posted by Layne Lund:
Unfortunately, that's all there is along these lines. Personally, I'd like to be able to recieve emails about other threads as well...maybe someone can suggest this to the admins


Originally posted by Ismar Iljazovic:
As for the forum... this forum is a great resource, and quite a friendly place, I just wish it was more advanced on the technical side. I don't know if most of the features are simply disabled or if this forum-script is simply that low on features, but I'd like to see something similar to vBulletin in action here, with advanced options. Just my 2 cents


Discussions about the forum (site) belong in the JavaRanch forum (further down the main page). I could save you a little time by telling you that the email thing has been brought up multiple times. The software we are currently using does not support anything more along that line than what Layne mentioned. We've considered changing software, but it isn't as easy as it sounds. Details in the JavaRanch forum.

You can display an image if you know the url to that image. Note the "Image" button under the textarea when you type your reply (along with the "code" button and the "bold" and "italics" buttons.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Originally posted by Ismar Iljazovic:
It's about configuring UltraEdit32 to compile and run Java code. For some reason, it's refusing to work, despite my having followed a bunch of guides on how to set it up correctly.

We have a forum specifically for "IDEs and other tools" a little further down the index page. Someone there may have more current experience with UE32 than I do.
Fyle
Greenhorn

Joined: Apr 19, 2005
Posts: 25
I resolved the UE32 issue successfully with the help of a member over at IDM's own forum for UE32

I was so happy when I finally got it solved. I can now compile and run code directly from within UE32. Makes thing a lot easier. I see everything in UE32's output window, rather than having to look at a command-prompt window... and one beautiful thing is that UE32 has an option that will let you double-click any of the lines of the output window, and if the compiler has found an error in your code, this double-clicking will make UE32 jump directly to the location in your code where the compiler thinks your error is! Brilliant!

As for discussing javaranch.com, thanks for letting me know there's a place on here specifically for that. I will take a look and post in there about the site .

And thanks everybody for trying to help. It' much appreciated!

On a sidenote, here's the best, (FREE!!}, forum-script I have ever come across: http://www.simplemachines.org/. If JavaRanch.com migrated to that, I would be the happiest camper ever
See it action at this wonderful, fresh site that I recently joined and donated to: http://www.donationcoder.com
Fyle
Greenhorn

Joined: Apr 19, 2005
Posts: 25
Originally posted by Marilyn de Queiroz:

We have a forum specifically for "IDEs and other tools" a little further down the index page. Someone there may have more current experience with UE32 than I do.


I completely forgot... here's the thread-link of where/how I resolved my UE32 issue: http://www.ultraedit.com/index.php?name=Forums&file=viewtopic&p=4950

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Basic Questions :D