Why command run "Java classname" do not work after successful compiling?

Hi Gurus,
I am working a Java pacakage (ncsa.hdf.jhv) in Windows 2000. After I have successfully compiled the package, then I try to run teh code by using command "Java JHV". It turns out saying that:
Exception in thread "main" java.lang.NoClassDefFoundError: JHV (Wrong name: ncsa/hdf/jhv/JHV)
Please help with this by reply or emial me direct to [email protected]
Thansk,
Chris

When a class is part of a package, its full qualified class name is package.classname. When you enter "java JHV" java is finding a file named JHV.class but inside that file it finds the fully qualified name to be ncsa.hdf.jhv.JHV so you get the wrong name error. If your code is like:
package ncsa.hdf.jhv;
public class JHV {Then the command to execute JHV is:
java ncsa.hdf.jhv.JHV
You must have a directory path ncsa/hdf/jhv/ and the file JHV.class must be in the jhv directory. Finally, the ncsa directory must be in a directory in the system Classpath.

Similar Messages

  • Some Java applets do not work after silent installation, solved by toggling "Enable Java content in the browser" - Why?

    We have about 1,800 workstations running Windows 7 (both 32-bit and 64-bit) running various versions of the Java JRE from 6 update 32 through 7 update 51.  Most are on 6 update 45.  We would like to standardize on Java 7 update 51 (32-bit) and get everyone updated to that version for security reasons.
    For the past two weeks, we have been having trouble with our installation pre-pilot.  What we are seeing is that our procedure successfully closes any open Internet Explorer windows and Java-related processes, uninstalls all old versions of the Java JRE, and then claims to have successfully installed Java 7 update 51.  The Java Control panel works.  We can even take Internet Explorer to Verify Java Version or Java Tester - What Version of Java Are You Running? and confirm that the Java applets on those sites are loading (though the latter only works after adding the site to the exceptions site list); however, when testers try to access our Kronos Workforce Central 6.3.10 system, the Java applets used by that system do not load.
    We have tried the following things, none of which worked:
    Clear Internet Explorer browser cache and cookies.
    Clear the local Java cache.
    Reboot the computer.
    Reset Internet Explorer settings, including personal settings.
    The one thing which does work is going into the Java Control Panel, going to the Security tab, unchecking "Enable Java content in the browser", pressing Apply, pressing OK on the pop-up window, checking the "Enable Java content in the browser" box again, pressing OK, pressing OK on the pop-up window, and then restarting Internet Explorer.  It is only after this point that all Java applets, including the ones used by Kronos Workforce Central 6.3.10, work.
    What I need to know is how I can automate the procedure of reinitializing the "Enable Java content in the browser" checkbox after installation or am I doing something wrong or missing a step in the automated installation that is causing this to happen?
    We are using Microsoft SCCM 2007 R3 to accomplish this upgrade, and everything is being run on the client machine using the SYSTEM account.  First, the PowerShell script "javaclean.ps1" is run, with part of the command-line process changing the PowerShell script execution policy to Bypass.  This script handles the closing of Java-dependent applications and Java processes and uninstalls old Java versions.
    javaclean.ps1:
    #Find all Java products excluding the auto updater which actually gets uninstalled when the main install is removed.
    write-host "Searching for all installed Java versions" -ForegroundColor Yellow
    [array]$javas=Get-WmiObject -query "select * from win32_Product where (Name like 'Java %' or Name like 'Java(TM)%' or Name like 'J2SE%') and Name <> 'Java Auto Updater'"
    if ($javas.count -gt 0)
        write-host "Java is already Installed" -ForegroundColor Yellow
        #Get all the Java processes and kill them. If java is running and the processes aren't killed then this script will invoke a sudden reboot.
        [array]$processes=Get-Process -Name "Java*" #-erroraction silentlycontinue
        $processes += Get-Process -Name "iexplore" #-erroraction silentlycontinue
        $processes += Get-Process -Name "firefox" #-erroraction silentlycontinue
        $processes += Get-Process -Name "chrome" #-erroraction silentlycontinue
        $processes += Get-Process -Name "jqs" #-erroraction silentlycontinue
        $processes += Get-Process -Name "jusched" #-erroraction silentlycontinue
        $processes += Get-Process -Name "jp2launcher" #-erroraction silentlycontinue
        if ($processes.Count -gt 0)
            foreach ($myprocess in $processes)
                $myprocess.kill()
        #Loop through the installed Java products.
        foreach($java in $javas){
            write-host "Uninstalling "$java.name -ForegroundColor Yellow
            $java.Uninstall()
    After this script is complete, SCCM calls a the VBS script "install.vbs" to perform the actual installation of Java JRE 7 update 51.
    install.vbs
    '* Script: Install JRE 7 routine
    '* Date:   3/14/14
    '* Author: [REDACTED]
    '* Rev:    1.0
    '* Notes: 
    '/// Common
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objWshShell = CreateObject("WScript.Shell")
    ' Get system architecture
    Dim colSys : Set colSys = GetObject("WinMGMTS://").ExecQuery("SELECT AddressWidth FROM Win32_Processor",, 48)
    Dim objSys
    For Each objSys In colSys
        If objSys.AddressWidth = 64 Then bolIs64Bit = True
    Next
    ' Get operating system
    Dim colOS : Set colOS = GetObject("WinMGMTS://").ExecQuery ("Select * from Win32_OperatingSystem",,48)
    Dim objOS
    For Each objOS In colOS
        If Left(objOS.caption, 20) = "Microsoft Windows 8 " Then
            bolIsWin8 = True
            WScript.Echo "win8"
        End If
        If Left(objOS.caption, 22) = "Microsoft Windows 8.1 " Then
            bolIsWin81 = True
            WScript.Echo "win81"
        End    If
    Next
    ' Set 32 bit program files directory
    If bolIs64Bit = True Then
        strPFILES = "Program Files (x86)"
        strSYSDIR = "SysWOW64"
        Else strPFILES = "Program Files"
        strSYSDIR = "System32"
    End If       
    ' Set windows directory
    strWIN = objWshShell.ExpandEnvironmentStrings("%windir%")
    ' Set the current directory
    strCurrentDir = objFSO.GetParentFolderName(Wscript.ScriptFullName)
    ' Set computer name
    strCompName = objWshShell.ExpandEnvironmentStrings("%computername%")
    '/// Main script
        '/// Install via .msi & capture exit code
        'intExitCode = objWshShell.Run("msiexec.exe /i """ & strCurrentDir & "\package.msi""" & " TRANSFORMS=""" & strCurrentDir & _
        '    "\transform.mst"" ALLUSERS=1 Reboot=ReallySuppress /qn", 8, True)
        'wscript.quit(intExitCode)
        '****RUN COMMANDS HERE****
        ' Create folder structure if it doesn't exist already   
        strFullPath = "c:\Windows\Sun\Java\Deployment" '
        ' How many levels are there in the path?
        nLevel = 0
        strParentPath = strFullPath
        Do Until strParentPath = ""
            strParentPath = objFSO.GetParentFolderName(strParentPath)
            nLevel = nLevel + 1
        Loop
        For iLevel = 1 To nLevel
            ' Figure out path for directory at level iLevel
            strParentPath = strFullPath
            For j = 1 To nLevel - iLevel
                strParentPath = objFSO.GetParentFolderName(strParentPath)
              Next
        ' Does this directory exist? If not, create it.
            If objFSO.FolderExists(strParentPath) = False Then
                Set newFolder = objFSO.CreateFolder(strParentPath)
            End If
        Next
        ' Kill running processes
        objWshShell.Run "taskkill /F /IM iexplore.exe", 8, True
        objWshShell.Run "taskkill /F /IM firefox.exe", 8, True
        objWshShell.Run "taskkill /F /IM chrome.exe", 8, True
        objWshShell.Run "taskkill /F /IM javaw.exe", 8, True
        objWshShell.Run "taskkill /F /IM java.exe", 8, True
        objWshShell.Run "taskkill /F /IM jqs.exe", 8, True
        objWshShell.Run "taskkill /F /IM jusched.exe", 8, True
        ' Copy deployment files
        objFSO.CopyFile strCurrentDir & "\deployment.config", "c:\Windows\Sun\Java\Deployment\", True
        objFSO.CopyFile strCurrentDir & "\deployment.properties", "c:\Windows\Sun\Java\Deployment\", True
        ' Disable UAC
    '    If bolIsWin8 Or bolIsWin81 = True Then
    '        objWshShell.Run "reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v PromptOnSecureDesktop /t REG_DWORD /d 0 /f", 8, True
    '        objWshShell.Run "reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f", 8, True
    '        objWshShell.Run "reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f", 8, True
    '    End If
        ' Install application
        intExitCode = objWshShell.Run("msiexec.exe /i """ & strCurrentDir & "\jre1.7.0_51.msi"" IEXPLORER=1 AUTOUPDATECHECK=0 JAVAUPDATE=0 JU=0 WEB_JAVA=1 ALLUSERS=1 Reboot=ReallySuppress /qn", 8, True)
        ' Enable UAC
    '    If bolIsWin8 Or bolIsWin81 = True Then
    '        objWshShell.Run "reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v PromptOnSecureDesktop /t REG_DWORD /d 1 /f", 8, True
    '        objWshShell.Run "reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f", 8, True
    '        objWshShell.Run "reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 5 /f", 8, True
    '    End If   
        wscript.quit(intExitCode)
        '/// Install via .exe on network
        'objWshShell.Run """" & strCurrentDir & "\Setup.exe"" -s -sms -f1""" & strCurrentDir & _
        '    "\setup.iss"" -f2""" & strWIN & "\Temp\Install-app.txt""", 8, True
        ' Need to turn off the open file security warning first
        Set objEnv = objWshShell.Environment("PROCESS")
        objEnv("SEE_MASK_NOZONECHECKS") = 1
    '    intExitCode = objWshShell.Run("""" & strCurrentDir & "\jre-7u45-windows-i586.exe"" /s /v""/norestart " & _
    '        "TRANSFORMS=""" & strCurrentDir & "\Tribe-jre7.mst""""", 8, True)
    '    WScript.Quit(intExitCode)
        '****RUN COMMANDS HERE****
        ' Then turn it back on
        objEnv.Remove("SEE_MASK_NOZONECHECKS")
    '/// Additional functions
    Help on this issue would be much appreciated!

    It turns out that this is actually a problem with Kronos Workforce Central.  We had the "site.java.plugin.CLSID.familyVersion" setting in that application set to "clsid:CAFEEFAC-0016-0000-FFFF-ABCDEFFEDCBA", which is the Java CLSID for Java 6.  After updating this value to "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" (the Java universal CLSID), this problem did not occur upon the automatic upgrade of Java.
    We have both Java 6 and Java 7 in our environment, and did during our Kronos implementation, so I don't know why we were using the Java 6 CLSID in the first place.
    Case closed!

  • Java script will not work after creating new page

    I am using dreamweaver cs3 and have a java script to rotate a banner in a template.  This script has worked fine in the past when I created pages in Dreamwever.  Now the  script works fine only when I test it in a template but when I try to upload to my ISP the script will no longer work.  At first I thought it was the ISP made changes but the person who sits next to me running the same version of Dreamweaver can create a page and the java works.  The java is placed in a template, tested by viewing in a brower and it works, however once I try to create a new page using the template the scriipt will not work.  To get around this I have the person sitting next to me save my template and then I can create pages.  Also if I save the template with my pc and it updates the pages created by the template the java will no longer work.
    This is very frustrating as I cannot create or modify my template on this pc.  What would prevent this from working?

    OK - now we are on to something ..... the script on the template only contains:
    function randomImages(){
      if(counter == (imgs.length)){
        counter = 0;
    MM_swapImage('rotator', '', imgs[counter++]);
      setTimeout('randomImages()', delay);
    However when I create a new page from the template with this javascript in it the code changes to:
    function randomImages(){
      if(counter == (imgs.length)){
        counter = 0;
    MM_swapImage('rotator', '', imgs[counter++]imgs[i]);
    function randomImages(){
      if(counter == (imgs.length)){
        counter = 0;
    MM_swapImage('rotator', '', imgs[counter++]);
      setTimeout('randomImages()', delay);

  • Why does my new tab button not work after istalling an update and restarting my computer?

    Tab button does not work...

    I also had this problem, and solved it by uninstalling the Avery Toolbar extension

  • Why is my iphone 4 suddenly not working after being forced to "restore to iTunes" and automatic update to iOs7. Phone has been restored, reset and recovered. Will not activate to server. I need a new phone Apple!!

    I heard about all the problems with the new iOs 7 update but also heard Apple would force me to do it. I tried to update but didn't have enough space. Had to delete ALOT of my apps and still not enough space. Phone was working perfectly fine and message pops up that "I will not have any service until I restore to iTunes. I plug into laptop to restore and it forces me to update to iOs7. Takes 3 hours. It updates but phone doesn't restore. Have tried all the troubleshooting tips:reset to factory settings, recover etc. Got a new SIM card because it said I don't have one but I do. Apple support wouldn't help me because I was out of warranty, and said I would have to pay. Went to the Apple store and they couldn't fix it and said "it's a hardware issue" that will cost me $170.00+.  I FIRMLY BELIEVE THAT THE NEW iO7 FRIED MY PHONE'S HARDWARE. The phone is on the HELLO stage and keeps searching but will not activate to server- it's temporarily unavailable. Have tried multiple times.I have a 3 year contract with Rogers and the phone is less than 2 years old. Apple needs to take responsibility for crashing my phone. I NEED A FREE NEW PHONE!!!

    Restore it to factory settings, then set it up from your back up. Did this last year when I got my new iPod, and it worked. I have no idea why syncing OTA can sometimes glitch, but hopefully this will help.

  • Why does camera on iphone4 still not work after buying more storage?

    Iphone 4: I bought 5 gb more cloud storage but still  cant usr camera due to not enogh storage: how do I fix it?

    You bought more iCloud storage but you really need more storage on your iPhone itself. You will have to delete or offload some content on your iPhone.

  • Cisco ISE guest portal redirect not working after successful authentiation and URL redirect.

    Hi to all,
    I am having difficulties with an ISE deployment which I am scratching my head over and can't fathom out why this isn't working.
    I have an ISE 3315 doing a captive webportal for my guest users who are on an SSID.  The users are successfully redirected by the WLC to the following URL:https://x.x.x.x:8443/guestportal/Login.action?portalname=XXX_Guest_Portal
    Now when the user passes through the user authentication splash screen they get redirected to https://x.x.x.x:8443/guestportal/guest/redir.html and recieve the following error:
    Error: Resource not found.
    Resource: /guestportal/
    Does anyone have any ideas why the portal is doing this?
    Thanks
    Paul

    Hello,
    As you are not able to  get the guest portal, then you need to assure the following things:-
    1) Ensure that the  two  Cisco av-pairs that are configured on the  authorization profile should  exactly match the example below. (Note: Do  not replace the "IP" with the  actual Cisco ISE IP address.)
    –url-redirect=https://ip:8443/guestportal/gateway?...lue&action=cpp
    –url-redirect-acl=ACL-WEBAUTH-REDIRECT (ensure that this ACL is also  defined on the access switch)
    2) Ensure that the URL redirection portion of the ACL have been  applied  to the session by entering the show epm session ip   command on the switch. (Where the session IP is the IP address  that is  passed to the client machine by the DHCP server.)
    Admission feature : DOT1X
    AAA Policies : #ACSACL#-IP-Limitedaccess-4cb2976e
    URL Redirect ACL : ACL-WEBAUTH-REDIRECT
    URL Redirect :
    https://node250.cisco.com:8443/guestportal/gateway?sessionId=0A000A72
    0000A45A2444BFC2&action=cpp
    3) Ensure that the preposture assessment DACL that is enforced from  the  Cisco ISE authorization profile contains the following command  lines:
    remark Allow DHCP
    permit udp any eq bootpc any eq bootps
    remark Allow DNS
    permit udp any any eq domain
    remark ping
    permit icmp any any
    permit tcp any host 80.0.80.2 eq 443 --> This is for URL redirect
    permit tcp any host 80.0.80.2 eq www --> Provides access to internet
    permit tcp any host 80.0.80.2 eq 8443 --> This is for guest portal
    port
    permit tcp any host 80.0.80.2 eq 8905 --> This is for posture
    communication between NAC agent and ISE (Swiss ports)
    permit udp any host 80.0.80.2 eq 8905 --> This is for posture
    communication between NAC agent and ISE (Swiss ports)
    permit udp any host 80.0.80.2 eq 8906 --> This is for posture
    communication between NAC agent and ISE (Swiss ports)
    deny ip any any
    Note:- Ensure that the above URL Redirect has the proper Cisco ISE FQDN.
    4) Ensure that the ACL with the name "ACL-WEBAUTH_REDIRECT" exists on  the switch as follows:
    ip access-list extended ACL-WEBAUTH-REDIRECT
    deny ip any host 80.0.80.2
    permit ip any any
    5) Ensure that the http and https servers are running on the switch:
    ip http server
    ip http secure-server
    6) Ensure that, if the client machine employs any kind of personal  firewall, it is disabled.
    7) Ensure that the client machine browser is not configured to use any  proxies.
    8) Verify connectivity between the client machine and the Cisco ISE IP  address.
    9) If Cisco ISE is deployed in a distributed environment, make sure  that  the client machines are aware of the Policy Service ISE node FQDN.
    10) Ensure that the Cisco ISE FQDN is resolved and reachable from the  client machine.
    11) Or you need to do re-image again.

  • Why is my apple ID password not working on ipad2 after updating to iOS6?

    Why is my apple ID password not working after upgrading to iOS6?

    Who knows?
    Settings>iTunes and App Stores>Tap your ID and sign out. Reboot your iPad.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    Go back to the settings and sign back in again and see of it works now.
    If it doesn't work, post back with some information that might help us help you. Describe what you are doing in some detail and it might let us better understand why this is happening.

  • CD/DVD drive does not work after Win 8 intsallation

    from a month i've updated my windows into windows 8, everything is working great but the DVD-RW .
    When i put empty cd and try to open it, it gives me error while opening saying:
    "windows was unable to complete the format"
    So is that a software or a hardware problem?!
    waiting for the help !

    Does this mean that your CD/DVD drive does not work anymore and is not recognized by system?
    If yes, then I would recommend checking this Toshiba document which I found on the knowledge base portal webpage:
    +Why does my CD/DVD Drive not work after upgrading to Windows 8?+
    http://aps2.toshiba-tro.de/kb0/FAQ2B03F10002R01.htm
    You will need to uninstall the Toshiba programs:
    TOSHIBA Recovery Media Creator
    TOSHIBA Disc Creator

  • Java script is not working in custom tabular form

    hai all,
    i have changed my built in tabular form to custom tabular form.my java script is coding working fine in built in tabular form . But in my custom tabular form java script is not working ,since it is created as standard report(Display As).
    pls help me.
    with thanks and regards
    sivakumar.G

    Is the appostrophe function test(pthis) *'* present in your javascript code...
    If not can you post the same in apex.oracle.com and give the credential so that I can the why its not wroking
    Regards,
    Shijesh

  • Why is the scroll function not working after accessing the voice feature in settings?

    Why is the scroll function not working after accessing the voice feature in settings?

    For some prerecorded audio files the Transpose slider will not work reliably. I found no clear pattern, when it does and when not.
    If all fails, create a loop from the audio file. Select the region in the track and use the command "File: Add region to Loop library".
    Set the current key and tempo, name the loop, and save the loop.
    Now add it from the loop browser to a new track and delete your old track. The search field in the Loop browser will help you to find the loop quickly.
    You will be able to transpose the sample as described above, like a regular loop.
    For example - a audio file turned into a loop and transposed:

  • Why will my java.jar file not open

    Why will my java.jar file not open

    This is the iPod touch forum. Do you have a question concerning an iPod touch? The iPod touch does not run Java.
    If you have a new Mac you have to download the Java program to run Java on a Mac. It no longer comes with the iOS.

  • Why iPhone 6 Plus sound microphone not working, but in the case of sound recordings in conversation mode work?

    Why iPhone 6 Plus sound microphone not working, but in the case of sound recordings in conversation mode work?

    Sighhhh, wasted so much time yesterday and today going around Sony centre and then carphone warehouse. They told me to come back after Easter.
    I came home, banged the phone against the wall and it worked.
    Turned out that mic was working on loud speaker and when using headphones so I thought that the secondary mic is working and the main one (placed with the speakers) isn't. So I banged that part against the wall slightly (in plastic case to prevent scratches) then put the phone underwater, waited for it to dry and now it's working. Idk how well and if it's of perfect quality again but people can hear me well.

  • Why is my Apple ID not working after I've reset it, Why is my Apple ID not working after I've reset it

    Why is my Apple ID not working after I've reset it? After I change it the password icon pops up and I type the new password in and it says it's wrong? What's happening

    Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    Wait for the Apple logo to Appear...
    Usually takes about 15 - 20 Seconds... ( But can take Longer...)
    Release the Buttons...

  • Why is Time machine backup not working after Mavericks upgrade?

    Why is Time machine backup not working after Mavericks upgrade?

    I had the same problem due to the Fire Wire port.  Apple tested it told me it is OK!, I tried a new cable, and have tested both ports on my back up device.  I find it strange that as soon as I installed Mavericks.  The drive does work using USB.  It could be a coincidence, I don't absolutely know at this point, my back up drive ports could stop working, but I doubt it!

Maybe you are looking for