This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes A multiple part question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "A multiple part question" Watch "A multiple part question" New topic
Author

A multiple part question

Shannon Keough
Greenhorn

Joined: Oct 12, 2001
Posts: 4
I'm a novice when it comes to java and I have a couple of questions
I have written a application for my home computer that I wish to be able to put a shortcut on the desktop that would start the app for me rather than having to go into the text editor & compile and then run the app. Is this what a jar is used for? If so, How do I create /use a jar.
Another thing is that Im connecting to a Access 2000 database and I can only go forward through the records but not backwards. I can't go back to the previous record. Is there a driver or file that I can get that would allow me to move back to the previous record.
I am using JDK 1.3.0_02 version.
Snigdha Solanki
Ranch Hand

Joined: Sep 07, 2000
Posts: 128
1.Do you have windows on your home computer? You can create a .bat file and keep the code which executes your code in it.
java name_of_class_file
Or else you can create an executable jar file(Please refer to Sun's tutorial for that) and put the code to execute the jar file in the .bat file.
java -jar name_of_jar_file
2.You can use ResultSet's previous() method to move the cursor to the previous row. But this will work only if the fetch direction is set properly in the Statement object. The default value is ResultSet.FETCH_FORWARD. Use setFetchDirection() to set it to ResultSet.FETCH_REVERSE or ResultSet.FETCH_UNKNOWN.


Snigdha<br />Sun Certified Programmer for the Java™ 2 Platform
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
You might want to take a look at this quick exploration into creating an executable JAR file.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Shannon Keough
Greenhorn

Joined: Oct 12, 2001
Posts: 4
Thanks for the help.
I have yet to try the method to go back to the previous method but I have created a jar. The notes on creating a jar file were excellent. That's exactly what I needed.
Shannon
 
Don't get me started about those stupid light bulbs.
 
subject: A multiple part question