Aaron O'Brien

Ranch Hand
+ Follow
since May 24, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aaron O'Brien

Ok, I've figured it out. Just thought I'd share this with anyone who was interested.

When referencing files other than class files in the jar, you need to use the following line of code in the application:

Make sure to import the java.net package...



Then specify url when getting the image. getResource() gets the image in the JAR file.

Once you create your MANIFEST and specify the Main-Class, you would then jar the application. I used :



c - indicates that you want to create a JAR file.

f - indicates that you want the output to go to a file rather than to stdout.

m - Used to include information in the MANIFEST.txt I created in the default manifest created by the jar utility. This is why we specify the Main-Class.

Now when you create the jar, you can move that single file anywhere you want. Multiple files are no longer needed. The JAR utility automatically compresses the files by default (but this can be turned off with the 0 parameter).

Hope you find this to be useful...and as fun as I did!
13 years ago
Hi everyone,

I have an application that I am trying to jar so it would be executable when double clicked. The application contains 2 images. I have created a Manifest.txt file that contains one line:

Main-Class: MyMainClassName

Then I execute the following in the command line:

jar cfm MyApp.jar Manifest.txt *.*

The jar file is created and when you double click the file, everything seems to work correctly. The splash screen opens and a short moment later you can see the GUI. However, when you move the MyApp.jar file to another location on the same computer (or on another computer) the splash screen does not appear when the application is started. The GUI does start.

I checked to make sure the JPEG files are in the JAR file by executing the following in the command line:

jar tf MyApp.jar

and the images are listed in the JAR file. So I must be missing something here whether it is in code or in the Manifest file. Any sugestions would be appreciated.

Thanks for your time!
13 years ago
Hi everyone,

I was just wondering what the forum preference was as to what book to use for this certification.

I was looking at two books:

Scwcd Exam Study Kit: Java Web Component Developer Certification
by Hanumant Deshmukh

or

Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam (SCWCD) by Bryan Basham, Kathy Sierra, Bert Bates

I like the reviews and the fact that the Head First book was developed by actual exam developers.

Also, does anyone have any information on whether the SCWCD certification has been updated for Java 5.0?

Thanks for your help!
Hi Andrew,

Therefore the projects in the certification books will cover most of the same issues as the real assignment, while being remaining different enough that it is not possible for someone to copy and paste the provided code into their assignment.



Yeah, I figured that the assignments whould not be identical. I was just trying to get an idea to see how well the assignment in the book would prepare someone before starting the actual certification assignment.

I just ordered my book from Amazon and it will be here in a few days. I am looking forward to starting this book!

Thanks for your help!
Excellent! That makes things a little easier...

Did you use this book for the certification? I've read that it has a sample project you can follow. If you did use this book, how did you find the sample project compared to the actual assignment?
Yeah, I just realized that you were basically being asked questions about your own program...

Max's book...Is this the same book I mentioned earlier or is this a seperate book/author you are referring to. I just want to make sure we are referring to the same book.

Thanks for the quick reply!
Hi,

I am starting to prepare for the SCJD certification and I noticed the book by The Sun Certified Java Developer Exam with J2SE 1.4 by Mehran Habibi and friends at the BunkHouse. Has anyone used this book and is it enough to prepare you for the assignment and/or the essay?

Any comments or suggestions would be greatly appreciated! Thank you.
Hi there,

I am just starting to prepare for the SCJD certification. I was just taking a walk throught the BunkHouse for a book and I saw SCJD Exam With J2SE 1.4 by Mehran Habibi and friends. Has anyone used this book and how did they find it? Is it enough to prepare you for the assignment and the essay?

Thanks for any info you can provide!
But you will have to be familiar with classes in the API as stated in the Exam Objectives (Section 4: Language Fundamentals). It would be a good idea to be familiar with the classes and methods because you are tested on the classes and interfaces mentioned in the exam objectives. Be sure to check out the Java API just to be on the safe side.

I hope this helps!
Hi there,
If you go to The Bunk House (Here), you can see several books and their ratings. A book I am reading now is A Programmer's Guide to Java Certification by Khalid Mughal. It is very good so far and I have seen the author hanging around and answering questions here at the ranch. Another is Head First Java by Kathy Sierra and Bert Bates. They are always answering questions here too. You can also check out the mock exam list here and the books I've mentioned contain mock exam questions. (At least the book I am reading does, not sure about the other one)
Hope this helps. Take Care.
Yeah, you're right.
You are getting the compile error because you are calling a method in the println that doesn't have a return type. All you have to do is put a return type in the test() method signature and return the appropriate type. You will then be able to see the flow of the program. My output from the code below is
10
total
complete
public class Class_1 {
static int total = 10;
public static void main (String args []) {
System.out.println(total);
Class_1 cls=new Class_1();
System.out.println(cls.test());
}
public String test(){
System.out.println("total");
return "complete";
}
}
Take care.
I guess I wasn't thinking about this topic the way Marlene and Dan have mentioned. I agree with the both of you and I too think that studying will help you to be a better programmer and to understand vital concepts...it must really come down to the amount of time you put into coding whether it is your own project or as part of your job. But the scenarios you mentioned don't really answer the question of whether or not the exam process is the problem itself or do you think that this issue will always be around? There are some very smart people around who would not need to code to pass the certification...Is this actually a flaw in the certification process if those theory certified people understand all of the topics necessary for the certification? This is what I am not sure about.
Feel free to add a comment!
Perhaps you are correct Sal,
I guess it all depends on how you define a programmer. But, the exam is used to show that you have certain level of knowledge concerning the Java Programming language. I would say that SCJP shows that you are a programmer but there are many more steps to complete once you are certified. If you don't keep learning, you can't consider yourself to be a programmer especially if you are out of date with current technologies.