Class will only run with full package path - why?

Hi,
I've recently used Ant to package up a jar file with a simple gui application. Though I believe I've done everything right in terms of packaging I find that when I copy jar file to another computer not only do I need to unjar it I also need to use the full package name in order to get it to run. I thought that I should be able to run it by either using: java -jar CheckLogs
or jar -xvf logUtils.jar, and then java CheckLogs.
Instead only this will work:
java net.kenjanuski.utils.CheckLogs
My understanding is that if I put package net.kenjanuski.utils at top of file that I shouldn't have to use the full package name. Am I missing something obvious? By the way Ant did create the proper directory structure if I unpack the jar: net/kenjanuski/utils/...
Thanks for any ideas,
Ken

I'm not going to try to answer the jar question, but as far as package name goes, if your CheckLogs class starts with the statement "package net.kenjanuski.utils;" then the fully qualified name of the class is net.kenjanuski.utils.CheckLogs. The java.exe command uses the fully qualified name of the class. So the only way it will work is "java net.kenjanuski.utils.CheckLogs" just as you found out.
You can run the Jar file if you define the class in a Manifest file. See http://java.sun.com/docs/books/tutorial/jar/basics/run.html

Similar Messages

  • I have a on line office manager that will only run with windows 7 or vista, how can I run it on my iMac?

    I have an online office manager that will only run with windwos 7 or Vista, how can I run it on iMac?

    If they don't have a Mac version and you must have it, you'll have to install Windows in Boot Camp or similar app.

  • ITunes 7 will only run with date in application name. Why????

    Hi, I upgraded to iTunes 7 and could not get it to run. After the license agreement I would get an error -50 message. Somehow, during some messing around, I noticed that the application name had changed from iTunes to iTunes 06-10-04 I don't know how this cane about but iTunes loaded up with no problems.
    Then I took the 06-10-04 out of the name, and again iTunes would not run, the error -50 message appearing. Puting the numbers back into the name solved the issue once more.
    Any ideas???
    Thanks.
    Hugh

    I'm not going to try to answer the jar question, but as far as package name goes, if your CheckLogs class starts with the statement "package net.kenjanuski.utils;" then the fully qualified name of the class is net.kenjanuski.utils.CheckLogs. The java.exe command uses the fully qualified name of the class. So the only way it will work is "java net.kenjanuski.utils.CheckLogs" just as you found out.
    You can run the Jar file if you define the class in a Manifest file. See http://java.sun.com/docs/books/tutorial/jar/basics/run.html

  • IPhone 4s will only ring with default ringtone. Why?

    I have assigned separate ringtones to family members but they when they call my iPhone 4s, it  always rings with the default ringtone. I think I set it up properly but i need some advice of what to do next.

    If you go to Settings > Notifications > for each app you want to be notified turn on Notification Center...see if that doesn't get sound/vibrate for each.

  • I've just updated OS to 10.10.1 and Finder keeps trying to open and then closes every 2 seconds with the message Finder is not Available. If Safari is opened full window it immediately closes and will only work with window smaller than maximum.

    I've just updated OS to 10.10.1 and Finder keeps trying to open and then closes every 2 seconds with the message Finder is not Available. If Safari is opened with the window full screen it immediately closes and will only work with window smaller than maximum. Driving me mad! Any help please!!

    Hi Linc
    Thank you for your response.
    I'm a bit of an amateur so I hope below is the information you've asked for:
    Step 1
    23/11/2014 09:19:14.007 ReportCrash[294]: Saved crash report for Finder[4349] version 10.10.1 (10.10.1) to /Users/AAAA/Library/Logs/DiagnosticReports/Finder_2014-11-23-091914_BBBB-MacBoo k-Pro-2.crash
    23/11/2014 09:19:14.008 ReportCrash[294]: Removing excessive log: file:///Users/AAAA/Library/Logs/DiagnosticReports/Finder_2014-11-23-091840_BBBB -MacBook-Pro-2.crash
    23/11/2014 09:19:14.000 kernel[0]: CODE SIGNING: cs_invalid_page(0x103809000): p=4357[Finder] final status 0x3000a00, denying page sending SIGKILL
    23/11/2014 09:19:14.000 kernel[0]: CODE SIGNING: process 4357[Finder]: rejecting invalid page at address 0x103809000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
    23/11/2014 09:19:14.454 com.apple.xpc.launchd[1]: (com.apple.Finder[4357]) Binary is improperly signed.
    23/11/2014 09:19:14.454 com.apple.xpc.launchd[1]: (com.apple.Finder) Service only ran for 0 seconds. Pushing respawn out by 1 seconds.
    23/11/2014 09:19:15.584 Finder[4359]: assertion failed: 14B25: libxpc.dylib + 97940 [9437C02E-A07B-38C8-91CB-299FAA63083D]: 0x89
    23/11/2014 09:19:15.000 kernel[0]: CODE SIGNING: cs_invalid_page(0x10bfbf000): p=4359[Finder] final status 0x3000a00, denying page sending SIGKILL
    23/11/2014 09:19:15.000 kernel[0]: CODE SIGNING: process 4359[Finder]: rejecting invalid page at address 0x10bfbf000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
    Step 2
    Process:               Finder [4626]
    Path: /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
    Identifier:            com.apple.finder
    Build Info: Finder_FE-932001003000000~1
    Responsible:           Finder [4626]
    PlugIn Path: /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
    PlugIn Identifier:       com.apple.finder
    -0 sec                         CODE SIGNING: cs_invalid_page(0x10c9a5000): p=4626[Finder] final status 0x3000a00, denying page sending SIGKILL
    -0 sec                         CODE SIGNING: process 4626[Finder]: rejecting invalid page at address 0x10c9a5000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
    -2 sec                         CODE SIGNING: cs_invalid_page(0x10c5b3000): p=4624[Finder] final status 0x3000a00, denying page sending SIGKILL
    -2 sec                         CODE SIGNING: process 4624[Finder]: rejecting invalid page at address 0x10c5b3000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
    -3 sec                         CODE SIGNING: cs_invalid_page(0x10f4bd000): p=4622[Finder] final status 0x3000a00, denying page sending SIGKILL
    -3 sec                         CODE SIGNING: process 4622[Finder]: rejecting invalid page at address 0x10f4bd000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
    -5 sec                         CODE SIGNING: cs_invalid_page(0x105ecf000): p=4620[Finder] final status 0x3000a00, denying page sending SIGKILL
    -5 sec                         CODE SIGNING: process 4620[Finder]: rejecting invalid page at address 0x105ecf000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
    -7 sec                         CODE SIGNING: cs_invalid_page(0x1012cd000): p=4617[Finder] final status 0x3000a00, denying page sending SIGKILL
    -7 sec                         CODE SIGNING: process 4617[Finder]: rejecting invalid page at address 0x1012cd000 from offset 0x3f000 in file "" (cs_mtime:0.0 == mtime:0.0) (signed:0 validated:1 tainted:1 wpmapped:0 slid:0)
    --> __TEXT 000000010c966000-000000010ce55000 [ 5052K] r-x/rwx SM=COW /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
        __DATA 000000010ce55000-000000010cf53000 [ 1016K] rw-/rwx SM=COW /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
    0   com.apple.finder                                 0x000000010c9a521f 0x10c966000 + 258591
    10  com.apple.finder                               0x000000010c9977b5 0x10c966000 + 202677
    11  com.apple.finder                               0x000000010c988154 0x10c966000 + 139604
    12  com.apple.finder                               0x000000010c987e15 0x10c966000 + 138773
    13  com.apple.finder                               0x000000010c987d35 0x10c966000 + 138549
    14  com.apple.finder                               0x000000010c987cfd 0x10c966000 + 138493
    28  com.apple.finder                               0x000000010c96b960 0x10c966000 + 22880
    1   com.apple.finder                                 0x000000010c98a69d 0x10c966000 + 149149
    2   com.apple.finder                                 0x000000010c98aba7 0x10c966000 + 150439
    3   com.apple.finder                                 0x000000010c9795d2 0x10c966000 + 79314
    4   com.apple.finder                                 0x000000010c98aa0b 0x10c966000 + 150027
    5   com.apple.finder                                 0x000000010c98a952 0x10c966000 + 149842
    6   com.apple.finder                                 0x000000010c98a78a 0x10c966000 + 149386
    7   com.apple.finder                                 0x000000010c979496 0x10c966000 + 78998
    8   com.apple.finder                                 0x000000010c98a548 0x10c966000 + 148808
    9   com.apple.finder                                 0x000000010c98a410 0x10c966000 + 148496
    10  com.apple.finder                               0x000000010c983df6 0x10c966000 + 122358
           0x10c966000 -        0x10ce54ffb  com.apple.finder (10.10.1 - 10.10.1) <33C3024A-4A16-3485-B2B1-89FA33B9558A> /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
    Many thanks
    David

  • I am trying to run my registered CS6 Design Standard programs for the first time after install. InDesign runs OK, but Illustrator and Photoshop will only run in trail mode. How do I activate those two?

    I can't get my registered versions of CS6 Photoshop and Illustrator to run in full mode. I installed CS6 Design Standard online end of June (an upgrade from CS5.5), on my old MacBook Pro. I didn't run the programs then as I was waiting on arrival of new MacBook Pro. I migrated the programs from my old MacBook to the new, and today tried to run those programs for the first time. InDesign work OK (after an initial hiccup) but Illustrator and Photoshop will only run in trial mode, and won't let me save files. My CS6 Design Standard shows with it's registration in my Adobe Account. All seems in order, but Illustrator and Photoshop won't run in registered mode. Can you please help?

    Demons1 in the future please only migrate your documents and settings.
    Please use the uninstallers to remove your current installation.  They are located in the Applications/Utilities/Adobe Installers folder.  Once the uninstall is complete you will also want to run the CC Cleaner Tool.  You can find more details at Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6 - http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html.
    If you need to download a fresh copy of the installation files for Creative Suite 6 you can do so at Download CS6 products.

  • Specify the full package path

    Well, here is a real beginner question. How can i specify the full package path of SUNs java.io package? And another beginner question, where is this package located on my computer? (relative to my java sdk installion path of course)

    Acctually I have a severe problem with leJOS. Here is my code:
    import java.io.*;
    import josx.rcxcomm.RCXBean;
    public class PCModule
         public static void main( String[] args )
              recv();
         public static void recv()
              RCXBean rcxb = new RCXBean();
              try
                   rcxb.setComPort("USB");
                   while(true)
                        System.out.println( "Test" );
              catch( IOException e )
    }This should compile fine, if lejosc would use the SUN java.io But it intends to use the own implementation of java.io and I really need to find a workaround to this problem because otherwise the code wont compile throwing the error, that the out symbol cannot be resolved.
    Btw. this part of the program should listen to the mindstorms IR-Tower for messages of a RCX-Brig and wirte them to an output stream.
    Isn't there a way to force lejosc to use the java.io package from sun?
    P.S.: If I don't use the System.out-line everything is fine, so lejos is installed correctly and if write a java test app everything is fine, so the SUN Java SDK is installed correctly too.

  • My external 27" AOC display only runs with 1080p

    My external 27" AOC display only runs with 1080p, even though my 27" iMac is capable of 2560x1440 via the attached mini-DisplayPort to DisplayPort cable. How can I get 2560x1440?
    When I run recovery mode, then I get the full 2560x1440 pixels. But when I boot back to 10.9.2, then I can only choose a maximum of 1080p.

    After some hours I found a solution...
    But let me vent a little bit first: My MacBook Air, which I have not yet upgraded to Mavericks, is able to drive the AOC display through DisplayPort at full resolution without a problem.
    Even an older lenovo Notebook with Windows 7 immediatelly used the intended resolution when hooking up the 27" screen. Windows 7 outplaying Mavericks. Oh boy...
    So it seems, that Mavericks introduced some "improvement" that limitd "unknown" displays to 1080p...
    By the way: Clearing PRAM didn't resolve my issue. Neither did holding down the Option key when klicking in the "Scaled" button in the screen resolution area of the system preferences for my screen.
    Anyway: I found out that I can use the plist file for a DELL 27" screen, which google found for me, copy this to /System/Library/Displays/Overrides and then rename the folder and file to match the ID I got back from ioreg.
    Obviously one has to be careful when mixing hardware data in this way. But since a modern screen will simply refuse to be driven with a signal that is out of spec, and since there are not too many different 27" pannels with 2560x1440 out there these days, this felt like a pretty safe thing to do... Your mileage may vary though!
    Unfortunately I don't have a plist editor installed. Thus I can only look at the XML contained in the plist file. With the plist editor from Mac (-> dev tools) it should be possible to edit available resolutions directly (in hex).

  • I just installed Firefox on a new HP 600-1120 with Windows 7 and it is only running in "safe" mode. Why? How do I get it to run in "regular" mode? How does "safe" mode differ?

    I just installed Firefox on a new HP 600-1120 with Windows 7 and it is only running in "safe" mode. Why? How do I get it to run in "regular" mode? How does "safe" mode differ?

    > So now my question is, how can i fix this problem?
    Use the Toshiba recovery disk or the Toshiba HDD recovery option.
    If you dont have the Toshiba Recovery disk try the HDD recovery:
    http://aps2.toshiba-tro.de/kb0/HTD1303440001R01.htm
    This works only if the recovery image files from Toshiba are still on the HDD:
    If you installed the system using another disk as Toshiba recovery disk, this recovery option will not work.

  • My iPod touch 4th gen. Won't charge with a enercell charger that I've used since December. It will only charge with the apple USB cord that came with it. And even the takes it about 6 sec. To realize its charging. Help me fix this?

    My iPod touch 4th gen. Won't charge with a enercell charger that I've used since December. It will only charge with the apple USB cord that came with it. And even the takes it about 6 sec. To realize its charging. Help me fix this?

    Yes, I've been using it for months. And I can charge other devices with it. (my iPhone) but something weird just happened..... I kept on pluging it in the iPod and sometimes it would start to chàrge then sometimes it won't charge. Charges every time with the iPhone though.

  • HT1925 After failed update of itunes yesterday, now will not run with error message "MSVCR80.dll can't be found, APSDaemon.exe not running".  Windows 7.

    After failed update of itunes yesterday, now will not run with error message "MSVCR80.dll not found" APSDaemon.exe will not run.  itunes will not now run.

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support (if this won't uninstall move on to the next item)
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
    Please note:
    Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
    HT1925: Removing and Reinstalling iTunes for Windows XP
    HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    tt2

  • I have a new imac with imovie 11 however my hd everio camcorder will only work with imovie 8 or 9 how do i download imovie 9? all i can find are updates and my mac says i don't need it

    i have a new imac with imovie 11 however my everio hd camcorder will only work with imovie 8 or 9. i tried to download imovie 9 but my mac says i don't need the update. How can i download imovie 8 or 9 complete not the update?

    I really appreciate all your help. Today I spent some time on the problem. First I purchased  any video converter from the ap store and then I connected the camera to the mac with the original usb cable that came with the camera. I turned on the camera and selected backup on pc and the logo came up on my home page. I opened it and after several attempts i found the 3 video files that were on the camera. I then converted them from a tod file to mp4 and then transfered  them to imovie. Now I have to figure out how to send the video to youtube or move it to an external hard drive which I have not been able to do. So far I am not too fond of imovie 11. If you could send me  the download for imovie 6 I then could try that route. When talking to apple support yesterday about the problem they suggested to get Final Cut Express. It's 200 bucks so before i order the install disc i would like to try your suggestion. My email address is [email protected] Again I thank you very much for your help! George

  • My office professional will not run with windows 8.1

    my office professional will not run with windows 8.1 It ran fine on 7 and 8 but not 8.1

      Microsoft Windows 8.1 officially supports all currently supported Microsoft Office versions including Office 2013 / 2010 / 2007 / 2003 , and may be even earlier versions unofficially. I use Microsoft Office Professional Plus on my Windows 8.1 and it runs fine with no issues.   Could you try what has already been suggested by others including Big_Dave and reinstall Microsoft Office with complete reboot/restart  between uninstall/new installation <restart, not shut down and start over>. If this doesn't work, please post again if installation went fine, what exactly is the error code (if any), what is the problem exactly, any screenshots ?

  • Every time I update firefox it will only run updater.exe when I try to restart

    every time I update firefox it will only run updater.exe when I select firefox to run. The only way around this that I have found so far is to do a fresh install of firefox.

    Create a new profile as a test to check if your current profile is causing the problems.
    See "Creating a profile":
    *https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues
    Profile Backup and Restore
    *http://kb.mozillazine.org/Profile_backup
    *https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • My computer will only run CS3....where can i get this from?

    My computer will only run CS3....where can i get this from?

    Simon,
    You may try to buy elsewhere. You may come across offers of new and unopened box sets, and used ones. There is quite a number of rules concerning the legality of taking over Adobe software from others, in some cases requiring a licence transfer.

Maybe you are looking for

  • No data saved in Adobe Forms

    Hi experts, I'm new to Adobe Interactive Forms. I'm trying to get the ISR scenario from the  'ISR cookbook' to work. Untill now that was really easy to do. I definded a scenario, defined my characteristics and developed an Adobe Form. After saving an

  • Ipod video non-fonctionnal

    i bought a 30gb ipod video, and it`s doesn`t work anymore, so i want to buy the new ipod classic, and i want to know if i buy a classic, can i have a discount buy giving my old ipod. I don`t care even if it`s only 20$

  • Inconsistent Data, can't resolve issue

    Hello, I recently found it necessary to rebuild my Aperture Library, and shortly after I located several hundred grey squares with small red boxes on them (these were photos I had previously delted). I selected all of them and used the command-delete

  • How to convert a spot colour to a spot colour.

    I'm curious to know how do i go about converting a spot colour to a spot colour e.g. pms 188 to pms 281? so therefore it changes from 2 colours to 1 colour, I'm using Acrobat x Professional on MAC, I dont have any other software of adobe's just this.

  • Error check activation message

    Hi there, My instal of Adobe Digital Editions was fine on my Windows 7 machine. I downloaded the getting started book and that is fine. But when I download a ACSE file it gives me the Error Check Activation message. I've validated my email several ti