Old Mainframe Programmer has java question....

I've looked at other formum suggestions however, I'm still having problems. What should I try specifically? I notice trying to use
classpath in autoexec.bat file under win98 doesn't work. Therefore, I
set classpath in my manifest file. Is this practical?
1.
javac CdCorp.java
(compiles no errors)
2.
Execution of manifest file
c:\jpgm\src\classes>jar cfm comp.jar comp.mf classes \jpgm\htm\.htm \jpgm\images\*.jpg
note: all class files and jar file are stored under classes directory.
3.
c:\jpgm\src\classes>Appletviewer index.htm
started applet not initialized
NoClassDefFoundError: CdCorp (wrong name: src/classes/CdCorp)
Environment:
Content of manifest file: comp.mf
Manifest Version: 1.0
Main-Class: CdCorp
Name: src/classes
Class-Path: c:\jpgm\src\classes\comp.jar
Structure of java Program: CdCorp.java
package src.classes;
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import java.net.*;
import java.util.*;
public class CdCorp extends Applet implements Runnable
//instance variable
boolean stopFlag;
Image img[] = new Image[MAXIMAGES];
int i=0;
int choice = 0;
int tracked;
int state;
int curX=250, curY=340;
int mouseX = 0;
int mouseY = 0;
int pos = 0;
int sw1=0;
MediaTracker tracker;
static final int MAXIMAGES = 20;
static final int MAXITEMS = 20;
String msg= " Providing Information Technology Solutions " +
String msgm = "";
String name[] = new String[MAXIMAGES];
String url[] = new String[MAXITEMS];
String target[] = new String[MAXITEMS];
String urlPrefix, urlSuffix;
Start of Html logic index.htm
<html>
<applet codebase="classes" code="CdCorp" archive="comp.jar" width=800 height=600>
<param name="img" value="cdmenbk+cdmenbk2+cdlogo+cdlogo1+cdhp1+cdhouston+cdcitynight+
cdmencmpny+cdmenservice+cdmenexpert+cdmenjpost+cdmenmisc">
<param name="urlPrefix" value="http://comp-data.home.att.net">
<param name="urlList" value="cdindex+cdoffice+cdcontacts+cdleaders+cdteam+cdcorpsummary+
cdjobposting+cdinf-main+cdspp+cdnm-main+cdsai+careers+cdnews+cdhelp+cdpart+
cdcorpov">
<param name="targetList" value=""_self+self+self+self+self+self+self+self+self+_self+
self+self+self+self+self+self">
<param name="urlSuffix" value=".htm">
</applet>

The manifest classpath refers to other resources that your code needs, not to your classes themselves.
http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html
It doesn't make sense to have a classpath in a jar file that starts with c:\ anyway.
I think your problem is that you're not referring to the full package name to the class file in your HTML applet tag. You need "src.classes.CdCorp", I believe. Also I thnk that CODEBASE and ARCHIVE attributes were mutually exclusive, though I could be wrong.
The package name "src.classes" is terrible. "src" is traditionally the name of a directory holding source code. "classes" is traditionally the name of a directory holding compiled classes. Any project would involve both, so they add no info and only confuse people to use in a package.
Package names should identify your company and the meaning or purpose or name of the project that created the code.
Please read "The Elements of Java Style" for more info.
http://www.amazon.com/exec/obidos/tg/detail/-/0521777682

Similar Messages

  • Hi,I have recently replaced by hard drive with a ssd. My old hard drive has all my iTunes stuff.i would like to install only iTunes programme on the ssd with all the content on the old hard drive. How do I do it?

    Hi,I have recently replaced by hard drive with a ssd. My old hard drive has all my iTunes stuff.i would like to install only iTunes programme on the ssd with all the content on the old hard drive. How do I do it?

    Install iTunes.
    Once install, hold SHIFT and launch iTunes.
    When prompted, point iTunes to the correct location for the iTunesLibrary.itl file which should be in the iTunes folder under <user>/Music on the old drive.

  • Do you know any web pages that has java problem-solving questions??

    hi i just wanna practice my problem solving skills.......
    buy i ve already solved all the questions that i have......................
    so i m looking for new questions,,,looking for new problems..
    do you know any web site that provides java
    questions for students.......?

    better than u
    hellbetter than whom you dickhead.
    stay away from forums.

  • What kind of Java questions can I ask?

    Here's a change:
    I want to interview some good java people. I have lots of Java questions in mind which I could ask them, however fellow JavaGuru's
    I would like some potential questions from you which I could ask someone who claims he/she is a good java programmer??
    I am asking because I want to be as fair as possible to the applicant and not ask them questions which I think are tough etc...

    Touchy subject.
    The language is not as important, as understanding programming concepts.
    So fine, when the programmer's horizont involves some abstraction levels.
    If a programmer can write an UML class diagram for a linked list.
    If a programmer knows a design pattern Singleton.
    If a programmer can write his/her own single linked list class with sorted insertion.
    Language concepts:
    - Why:
    import java.util.*;
    Map map = new HashMap();
    - Answer:
    Hiding the choice of implementation (HashMap) by using the more general
    interface Map.
    Don't expect much on an interview though. The situation might not be
    adequate to distinghuish between the good and the bad apples.
    Talking code is a good starting point, code of your making unfortunately.
    A good programmer will hesitate to show really useful code.
    A bad programmer might have stolen his/her code.
    The problem you might have, that you are in search of an expert, not
    having the expertise in-house. In that case you might get a better
    picture, talking about which IDE would be opportune, whether he/she
    has experience with the source version system CVS, what would his/her
    ideas be about coming projects.
    That would establish a common line of communication.

  • Iv'e synced and backed up my ipod onto my old laptop which has now broken, how can i sync and back it up on a new computer without everything being lost?

    Ive synced and backed up my iPod onto my old laptop which has now broken, how can i sync and bakc it up onto a new computer without everything being wiped?

    you will have to plug it into your new computer and connect it to itunes, then hit the backup button it should start backing up. THERE YOU GO! HOPE IT HELPED! please hit the "this solved my question" button

  • Due to NAS issues, when I started a new time machine backup it did not have the old backups available. My question is do I need to delete them or will time machine automatically reclaim the space?  Only one Sparse Bundle, same name.

    Due to NAS issues, when I started a new time machine backup it did not have the old backups available. My question is do I need to delete them or will time machine automatically reclaim the space?  There is only one sparse bundle but when I enter time machine I don't see my historic backups.  I use a synology DS212 for my time machine.  Started a new backup which is 218gb but it says 618 gb is occupied  therefore it looks like 2 or 3 backups are still on the disk. Before my NAS issues the last backup was in 2014.  As you can see there is a second sparse bundle from 2012.  Not sure what that is.

    This is an old message now, but what happened to me similarly was:
    I had a major computer crash and through complicated pathways ended up reinstalling (Mavericks) as a new user (long story).
    At least I had good Time Machine backups on an NAS drive (Synology DS212j), or so I thought - when I started Time Machine up again, the old backup file was gone, replaced by a new one using my "new computer" name. The old file was gone both by directly mounting the NAS drive and by clicking "Enter Time Machine".
    It's like I had {OldShareName}.sparsebundle and then it was replaced by {NewShareName}.sparsebundle, all of the old info vanished.
    (I have spent a week finding old files elsewhere and have completed a satisfactory self-restore. It pays to "archive" [my own variation of] as well as "back-up".)
    My belief is that if this were a wired-netword-drive, e.g. plugged right into my iMac with a USB cable, then the old file would have remained.
    But this is an NAS drive, connected directly to my Airport wireless router, and I don't know the significance of the fact that it stores its Time Machine backups as "sparsebundle" files rather than simply as plain(er) files.
    As usual when things get complicated with computers (not just Apple computers) there was never a warning message. Something like "YOU'RE ABOUT TO DELETE A TIME MACHINE BACK-UP FILE!!!" would have made my life a lot simpler.
    BTW, I did try a "restore from Time Machine" option the first thing I had my "new computer" (old hardware, 2009 iMac) up and running, using Migration Assistant, and it ran for many hours and then failed in the wee hours - what that has to do with anything I'm not sure.
    I'm not sure that I have a question about this other than "why do these things happen to me?", but it's a warning. Apart from that I've been very happy with the stability and reliability (but not the cost or set-up complexity) of NAS vs. directly-cabled external drives.
    Charles

  • My system disk icon has a question mark in it and does not open now

    my system disk icon has a question mark in it and does not open now
    and my devices name is gone when i click on FINDER, my favourites is there with the following listed under it-
    ALL MY FILES
    AIRDROP
    APPLICATIONS
    DESKTOP
    DOCUMENTS and under documents was the DEVICES word with my Macintosh under it, this is missing... what have i done

    Somehow you've managed to delete it.
    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2. Download it from the App Store to reinstall It's on your Purchases List* there.
    For older versions that have been installed from Disk you'll need these additional steps:
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    2c: on 10.7 or later they're at
    /private/var/db/receipts
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    *Sometimes iPhoto is not visible on the Purchases List. it may be hidden. See this article for details on how to unhide it.
    http://support.apple.com/kb/HT4928
    One question often asked: Will I lose my Photos if I reinstall?
    iPhoto the application and the iPhoto Library are two different parts of the iPhoto programme. So, reinstalling the app should not affect the Library. BUT you should always have a back up before doing this kind of work. Always.

  • I am searching for a programmer in java

    I am searching for a programmer in java, to create one class that does the following things:
    1.- Obtain a jpg image from a data base
    2.- Transform from rgb to hls.
    3.- To make a histogram of H and S (Tonality and Saturation)
    4.- Fom the collected data of the histograms, apply the hashing and it�s numeric data, save as an attribute from the image in the BD
    contact to [email protected]
    as soon as possible
    Mexico

    I am searching for a programmer in javaDude, you just found a whole bunch of 'em!
    , to create
    one class that does the following things:
    1.- Obtain a jpg image from a data base
    2.- Transform from rgb to hls.
    3.- To make a histogram of H and S (Tonality and
    Saturation)
    4.- Fom the collected data of the histograms, apply
    the hashing and it�s numeric data, save as an
    attribute from the image in the BD
    contact to [email protected]
    as soon as possible
    Don't ask people to reply by private email. Most Forum regulars believe solving problems should be a public, transparent process during which a first try at an answer can and should be corrected if someone more knowledgeable notices that it is incomplete or incorrect. Also, they get some of their reward for being respondents from being seen to be competent and knowledgeable by their peers (not to mention the possibility of collecting some of those precious Duke Dollars.
    MexicoThe whole country?!?
    Seriously...
    Before asking a technical question by email, or in a newsgroup, or on a website chat board, do the following:
    * Try to find an answer by searching the Web.
    * Try to find an answer by reading the manual.
    * Try to find an answer by reading a FAQ.
    * Try to find an answer by inspection or experimentation.
    * Try to find an answer by asking a skilled friend.
    * If you are a programmer, try to find an answer by reading the source code.
    When you ask your question, display the fact that you have done these things first; this will help establish that you're not being a lazy sponge and wasting people's time. Better yet, display what you have learned from doing these things. We like answering questions for people who have demonstrated that they can learn from the answers.
    --- From How To Ask Questions The Smart Way by Eric Steven Raymond

  • Interesting Java Questions. Need answers Pls

    Hi All,
    I have come accross few java question, could any one please provide best answers please?
    1. Why the wait() method is there in the Object class? Not in the Threads?
    2. Why JDBC has all interfaces & not classes?
    3. Which type of collection do u prefer to make the incoming objects in sort order?
    4. Why the hasCode() method should be implemented if we are overiding the equals(0 method?
    Please provide me best answers ASAP.
    Girish.K

    do u prefer tohttp://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal - in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • I have a packardbell laptop with photoshop elements 8 installed from new. I have used it on several occasions but I cannot get it to run now.  When I open a photo using elements the Adobe box pops up saying that the programme has unexpectedley quit? can a

    I have a packardbell laptop with photoshop elements 8 installed from new. I have used it on several occasions but I cannot get it to run now.  When I open a photo using elements the Adobe box pops up saying that the programme has unexpectedley quit? can anyone help me please as I have several photos to edit before the end of this month. Many thanks for any help

    The "restore disk" is built into the Mac. See About Recovery.
    Need more specifics about what error messages you got while installing Adobe Flash.
    However, you can almost avoid Flash altogether by setting YouTube to play the HTML5 version instead.
    Click the Try something new! link at the bottom of the YouTube page.
    I don't know about the sound issue. Might be hardware as you think. Try other headphones to check.

  • Hi!My 6 month old MBP 13" has suddenly stop charging.Mac is working,but not charging

    Hi!My 6 month old MBP 13" has suddenly stop charging.Mac is working,but not charging

    Troubleshooting MagSafe adapters  http://support.apple.com/kb/ts1713
    If you need to pursue further you can do it on-line,  start here
    https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • I have an iMac about a year old. It has OSX 10.8.3 with iMovie 9.0.8. Is there a way to get iMovie to store and use iMovie Events on an external drive? Raw video is eating up my 1TB internal drive.

    I have an iMac about a year old. It has OSX 10.8.3 with iMovie 9.0.8. Is there a way to get iMovie to store and use iMovie Events on an external drive? Raw video is eating up my 1TB internal drive.

    Yes, you can import to an external drive by choosing it from the Import Screen.
    Once an Event or Project is in iMovie, it is best to move it to the external using iMovie, so the Project does not lose links to the Event.
    For full instructions on how to do this, see this link.
    https://discussions.apple.com/docs/DOC-4141

  • I have Elements 6.0 on a an old machine which has now failed (motherboard issue).  How do I re-install it from the old hard drive onto a new machine?

    Can anyone help me to re-install elements 6?  I have it sat on the hard drive of an old machine which has a motherboard failure.  I have the serial no, and I have a hard drive caddy.  What do I do?

    Sorry I don’t know of any download links for PSE6. It may be worth thinking of upgrading to the latest version PSE13. It now has 64 bit support so you should see improved performance if your new machine has more than 4gb of memory (RAM)
    The interface is different to PSE6 although most of the tools you are familiar with will work the same.
    Why don’t you download the trial version from the link below and use it free for 30 days. If you are happy with it you can purchase from Adobe or any retailer or on-line store. No further installation is required; you simply enter your serial number to make the trial permanent. It’s a good way of ensuring a successful installation before making a commitment to purchase.
    http://www.adobe.com/cfusion/tdrc/index.cfm?product=photoshop_elements&loc=en

  • My old hard-drive has corrupted and i have lost my library. i lost my back up too. I have restored all my purchased stuff but had 5000 songs uploaded from my CD collection. Is there anyway of transferring the CD tracks from my ipod or ipod to my iMac?

    My old hard-drive has corrupted and i have lost my library. i lost my back up too. I have restored all my purchased stuff but had 5000 songs uploaded from my CD collection. Is there anyway of transferring the CD tracks from my ipod or ipod to my iMac? Or do I have to manually upload the CDs again?

    Hi,
    See if this doc helps https://discussions.apple.com/docs/DOC-3991
    Jim

  • I have an Ipod that is about a year old which was connected to an old computer that has crashed.  I just downloaded itunes on a new computer, hoping to download my music from my ipod, but it won't let me.  Any ideas how to sync them?

    I have an Ipod that is about a year old which was connected to an old computer that has crashed.  I just downloaded itunes on a new computer, hoping to download my music from my ipod, but it won't let me.  Any ideas how to sync them?

    Engadget has a guide for this.
    http://www.engadget.com/2009/11/25/how-to-get-music-videos-and-photos-off-your-i pod-iphone/

Maybe you are looking for