Norm Radder

Rancher
+ Follow
since Aug 10, 2005
Worked mostly with IBM mainframe assembly code. Loved IBM's VM OS.
Eastern Florida
Cows and Likes
Cows
Total received
33
In last 30 days
0
Total given
1
Likes
Total received
302
Received in last 30 days
23
Total given
52
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Norm Radder

Or use the fully qualified name of the class that is in the java.util package.

A poor solution that will lead to confusion.
2 days ago

what could I do to resolve it?


Move the logic code out of the main method into another method in the Scraper classes.  Then have the runScper method call that method to do the desired work.
If you still want the Scraper classes to work standalone, Change the main method to have it create an instance of the class and call the newly created method where the work will be done.

Why is that


A method is not executed unless it is explicitly called.  An exception is when the JVM calls the main method when the class is started with the java command.
3 days ago

it's not running

How do you know? 
There needs to be code in the empty methods at lines 124 and 166.  At least add a print statement to show that the method was executed.

Note: The main method in the Scraper classes will not be called.  You need to explicitly call them if you want the code in the main methods to executed.

3 days ago
I don't know what the problem is.  Here is an example where I renamed the class file by adding XXX so it did not represent what was in the file and it worked:


javap -v AppletCommMainXXX.class
Classfile /D:/JavaDevelopment/Testing/Applet_Tests/ForTest/AppletCommMainXXX.class
  Last modified Oct 9, 2005; size 2386 bytes
  MD5 checksum ad8842a92854a5204a7b22ce8ee7e928
  Compiled from "AppletCommMain.java"
public class Testing.AppletCommMain extends java.applet.Applet implements java.awt.event.ItemListener
  minor version: 3
  major version: 45




Another test with a file that was not a class file:



D:\BatchFiles>cmd.exe /K cd "D:\JavaDevelopment\Testing\Applet_Tests\ForTest"

D:\JavaDevelopment\Testing\Applet_Tests\ForTest>dir
Volume in drive D is Work
Volume Serial Number is 76C0-3722

Directory of D:\JavaDevelopment\Testing\Applet_Tests\ForTest

08/15/2018  05:26 PM    <DIR>          .
08/15/2018  05:26 PM    <DIR>          ..
10/09/2005  11:39 AM             2,386 AppletCommMainXXX.class
08/15/2018  05:26 PM            21,971 JavapConsole.txt
               2 File(s)         24,357 bytes
               2 Dir(s)  15,458,840,576 bytes free

D:\JavaDevelopment\Testing\Applet_Tests\ForTest>javap -v JavapConsole.txt
Error: class not found: JavapConsole.txt                      <<<<<<<<<< NOTE error message

D:\JavaDevelopment\Testing\Applet_Tests\ForTest>dir JavapConsole.txt
Volume in drive D is Work
Volume Serial Number is 76C0-3722

Directory of D:\JavaDevelopment\Testing\Applet_Tests\ForTest

08/15/2018  05:26 PM            21,971 JavapConsole.txt
               1 File(s)         21,971 bytes
               0 Dir(s)  15,458,840,576 bytes free

D:\JavaDevelopment\Testing\Applet_Tests\ForTest>

3 days ago
What is all this after the name of the class file?


Classfile com.devguerrilla.qui
ckstart.cxf.countrylookup.CountryLookupServiceImpl.class



Did you try:
javap -v CountryLookupServiceImpl.class
3 days ago
Can you use the dir command to list all the files in the folder
and then use the javap command that shows the file not found message.

Copy the contents of the command prompt window and paste it here.
3 days ago

the user can see and edit it. 


On Windows you could use the Registry which raises the bar on user changes. 

Encrypting the contents would make it harder for a user to change it.
3 days ago
The object of the test with applet tag and appletviewer is to make sure the paths are good and that the JVM can find the class.
3 days ago

java.lang.ClassNotFoundException: com.test.rec.applet.PrintApplet.class


Did you see the Note at the end of my last post?

Try a giving a class name without the ending .class

Are you sure the .class file is in the correct location for the JVM to be able to find it?
3 days ago

  class not found exception


Can you copy the full contents of the error message and paste it here.  It should show the name of the class that was not found.

Note: A class name does not end with .class.  Filenames end with .class
3 days ago

how do I get the winner after i compare the average computed? 


Often the winner is the one with the highest score.  Given a list of scores, search the list for the highest value.
4 days ago


how do you return an index?

return array[i];   //  return value in array at index i


For the code you show referencing an element in array, the index is i.

So to return the index:
4 days ago

highest and lowest values must be returned as ints?


What about returning the index of the values?   Have we seen the details of the assignment?  The OP posted method signatures.
4 days ago
I disagree.  I see this as a reasonable exercise.
The tricky bit is removing the high and low scores.
4 days ago