Accessing program resources from classpath

Hi, I'm having trouble with a program I've downloaded, where they attempt to load a picture into a java.net.URL object.
URL imgURL = ClassLoader.getSystemResource(imageFileName);
        if (imgURL == null) {
            String msg = "Could not locate " + imageFileName + ". Make sure that JSystemTrader directory is in the classpath.";
            throw new JSystemTraderException(msg);
        return imgURL;I'm not sure whether using the ClassLoader to do this is a good or bad idea (it seems weird to make users update their classpath just to run the program)?
Anyway, I'm running vista, and edited my classpath environment variable to store the location of the folder to look in, but keep getting null returned as the imgURL. I have no idea where the ClassLoader is looking, and why it can't find my folder.
The resource it's looking for is: resources\image.jpg
This is in: C:\JSystemTrader\resource\image.jpg
My classpath variable is: C:\JSystemTrader\
Can anyone see what might be going on here?

What folder did you have to add to the classpath in Eclipse?
Also, you can right click on your project root (or really any folder in your project) and choose Build Path -> Configure Buildpath -- Once there you can add that folder to the "Source" tab as a source folder, or in the Libraries as a "Class Folder". That way you do not have to add it to the Run dialog if you are operating with more than one main class.
Karl

Similar Messages

  • OIA 11.1.1.3 - Unable to import Access Policies, Resources from OIM 11g

    Hi,
    I have successfully integrated OIA on tomcat with OIM on weblogic. Also all the Roles and Users of OIM have been imported into OIA.
    Can anyone of you suggest me what needs to configured on OIM to have the Access Policies, Resources and entitlements to be imported into OIA.
    PS : I have noted some changes to be carried out with OIM Form designer in the Design Console as per the Preferred method. Unfortunately, I am unable to go ahead in configuring the following as the Properties described do not show up to me.
    The user guide says -
    For each Resource, the following properties need to be added to some identified feed for accounts, policies, and entitlements imports:
    AccountName - Identifies the unique account in the target system
    ITResource - Identifies the unique IT Resource field for the target system
    Entitlement - Identifies the account attribute designated for privileges
    Please help with this issue.
    Thank you,
    Bhaskar

    Thanks for the reply EvgeniyA, but this is a new environment which has not been released to the users yet. So this cannot be because of SERVERTHREADS and AGTSVRCONNECTIONS. Also the older version worked fine without all those settings defined in essbase.cfg. Anyways even if we consider that this was because of those parameters, I have defined those in the essbase.cfg and still not luck. Still get the same errors. Any other thoughts anyone?
    Thanks,
    Ted.

  • Treo 750 can't access programs list from start or windows button

    Hi first time question. I have treo 750 and just recently can't access any programs from windows or start button. Can't even access memory to delete unnecessary files. What to do?
    thanks Mike
    Post relates to: Treo 750 (AT&T)

    Is this a memory problem you are running into? Have you tried a soft reset?
    Post relates to: Palm Z22

  • Access resource from other application using JAAS

    i use JAAS for autenticate and autorizate in my web application, but i need access a resource from the other application , but this application don�t use JAAS.
    How can i acces this resource from other application?
    i know need send the parameters JSESSIONID, but , always redirecto the login page.
    thank you for your help

    your signon url is consists of the following url http://server.domain.com:port/site/signon.html
    Can you ping server.domain.com from your client?
    If you can ping it, then make sure your port is added as a rule in the firewall of the server.
    Also make sure that the proxy setting of the client have an exception to server.domain.com.
    If you cannot ping it, make sure the server and the client are conneted to the same network and make sure the hosts file on the client reflects the ipaddress and the hostname of the server.
    Hakan

  • Can't access internal network from VPN using PIX 506E

    Hello,
    I seem to be having an issue with my PIX configuration. I can ping the VPN client from the the internal network, but can cannot access any resources from the vpn client. My running configuration is as follows:
    Building configuration...
    : Saved
    PIX Version 6.3(5)
    interface ethernet0 auto
    interface ethernet1 auto
    nameif ethernet0 outside security0
    nameif ethernet1 inside security100
    enable password N/JZnmeC2l5j3YTN encrypted
    passwd 2KFQnbNIdI.2KYOU encrypted
    hostname SwantonFw2
    domain-name *****.com
    fixup protocol dns maximum-length 512
    fixup protocol ftp 21
    fixup protocol h323 h225 1720
    fixup protocol h323 ras 1718-1719
    fixup protocol http 80
    fixup protocol rsh 514
    fixup protocol rtsp 554
    fixup protocol sip 5060
    fixup protocol sip udp 5060
    fixup protocol skinny 2000
    fixup protocol smtp 25
    fixup protocol sqlnet 1521
    fixup protocol tftp 69
    names
    access-list outside_access_in permit icmp any any
    access-list allow_ping permit icmp any any echo-reply
    access-list allow_ping permit icmp any any unreachable
    access-list allow_ping permit icmp any any time-exceeded
    access-list INSIDE-IN permit tcp interface inside interface outside
    access-list INSIDE-IN permit udp any any eq domain
    access-list INSIDE-IN permit tcp any any eq www
    access-list INSIDE-IN permit tcp any any eq ftp
    access-list INSIDE-IN permit icmp any any echo
    access-list INSIDE-IN permit tcp any any eq https
    access-list inside_outbound_nat0_acl permit ip 192.168.0.0 255.255.255.0 192.168.240.0 255.255.255.0
    access-list swanton_splitTunnelAcl permit ip any any
    access-list outside_cryptomap_dyn_20 permit ip any 192.168.240.0 255.255.255.0
    no pager
    mtu outside 1500
    mtu inside 1500
    ip address outside 192.168.1.150 255.255.255.0
    ip address inside 192.168.0.35 255.255.255.0
    ip audit info action alarm
    ip audit attack action alarm
    ip local pool VPN_Pool 192.168.240.1-192.168.240.254
    pdm location 0.0.0.0 255.255.255.0 outside
    pdm location 192.168.1.26 255.255.255.255 outside
    pdm location 192.168.240.0 255.255.255.0 outside
    pdm logging informational 100
    pdm history enable
    arp timeout 14400
    global (outside) 1 interface
    nat (inside) 0 access-list inside_outbound_nat0_acl
    nat (inside) 1 192.168.0.0 255.255.255.0 0 0
    access-group outside_access_in in interface outside
    access-group INSIDE-IN in interface inside
    route outside 0.0.0.0 0.0.0.0 192.168.1.1 1
    timeout xlate 0:05:00
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
    timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
    timeout sip-disconnect 0:02:00 sip-invite 0:03:00
    timeout uauth 0:05:00 absolute
    aaa-server TACACS+ protocol tacacs+
    aaa-server TACACS+ max-failed-attempts 3
    aaa-server TACACS+ deadtime 10
    aaa-server RADIUS protocol radius
    aaa-server RADIUS max-failed-attempts 3
    aaa-server RADIUS deadtime 10
    aaa-server LOCAL protocol local
    http server enable
    http 192.168.0.0 255.255.255.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server community public
    no snmp-server enable traps
    floodguard enable
    sysopt connection permit-ipsec
    crypto ipsec transform-set ESP-DES-MD5 esp-des esp-md5-hmac
    crypto ipsec transform-set ESP-DES-SHA esp-des esp-sha-hmac
    crypto dynamic-map outside_dyn_map 20 match address outside_cryptomap_dyn_20
    crypto dynamic-map outside_dyn_map 20 set transform-set ESP-DES-MD5
    crypto map outside_map 65535 ipsec-isakmp dynamic outside_dyn_map
    crypto map outside_map client authentication LOCAL
    crypto map outside_map interface outside
    isakmp enable outside
    isakmp identity address
    isakmp policy 20 authentication pre-share
    isakmp policy 20 encryption des
    isakmp policy 20 hash md5
    isakmp policy 20 group 2
    isakmp policy 20 lifetime 86400
    vpngroup swanton address-pool VPN_Pool
    vpngroup swanton dns-server 192.168.1.1
    vpngroup swanton split-tunnel swanton_splitTunnelAcl
    vpngroup swanton idle-time 1800
    vpngroup swanton password ********
    telnet timeout 5
    ssh timeout 5
    console timeout 0
    dhcpd address 192.168.0.36-192.168.0.254 inside
    dhcpd dns 8.8.8.8 8.8.4.4
    dhcpd lease 3600
    dhcpd ping_timeout 750
    dhcpd auto_config outside
    dhcpd enable inside
    username scott password hwDnqhIenLiwIr9B encrypted privilege 15
    username norm password ET3skotcnISwb3MV encrypted privilege 2
    username tarmbrecht password Zre8euXN6HxXaSdE encrypted privilege 2
    username jlillevik password 9JMTvNZm3dLhQM/W encrypted privilege 2
    username ruralogic password 49ikl05C8VE6k1jG encrypted privilege 15
    username bzeiter password 1XjpdpkwnSENzfQ0 encrypted privilege 2
    username mwalla password l5frk9obrNMGOiOD encrypted privilege 2
    username heavyfab1 password 6.yy0ys7BifWsa9k encrypted privilege 2
    username heavyfab3 password 6.yy0ys7BifWsa9k encrypted privilege 2
    username heavyfab2 password 6.yy0ys7BifWsa9k encrypted privilege 2
    username djet password wj13fSF4BPQzUzB8 encrypted privilege 2
    username cmorgan password y/NeUfNKehh/Vzj6 encrypted privilege 2
    username cmayfield password Pe/felGx7VQ3I7ls encrypted privilege 2
    username jeffg password zQEQceRITRrO4wJa encrypted privilege 2
    terminal width 80
    Cryptochecksum:9005f35a85fa5fe31dab579bbb1428c8
    : end
    [OK]
    Any help will be greatly appreciated

    Bj,
    Are you trying to access network resources behind the inside interface?
    ip address inside 192.168.0.35 255.255.255.0
    If so, please make the following changes:
    1- access-list SWANTON_VPN_SPLIT permit ip 192.168.0.0 255.255.255.0 192.168.240.0 255.255.255.0
    2- no vpngroup swanton split-tunnel swanton_splitTunnelAcl
            vpngroup swanton split-tunnel SWANTON_VPN_SPLIT
    3- no access-list outside_cryptomap_dyn_20 permit ip any 192.168.240.0 255.255.255.0
    4- isakmp nat-traversal 30
    Let me know how it goes.
    Portu.
    Please rate any helpful posts   

  • Upgrade from 6.1.2 to 6.1.3 "you do not have permission to access this resource"

    trying to upgrade from 6.1.2 to 6.1.3 on my iPhone 5 but gives me the msgs "you do not have permission to access ths resource"? I don't have any programs running in background and even trying to restore to factory, still won't allow me!!!

    First thing to try is to reset your device. Press and hold the Home and Sleep buttons simultaneously ignoring the red slider should one appear until the Apple logo appears. Let go of the buttons and let the device restart. See if that fixes your problem.
    This is always a good firstvstep to try. After your iPhone restarts try to update again over the air.

  • Accessing Sql Server from AS400 Java program

    Hi everybody,
    I am trying to access Sql Server from an AS400 Java program. I have tried various Sql Server JDBC drivers including the Microsoft one but no luck yet. When i try to compile my Java program (with driver file in the classpath) it gives some errors on the driver jar file and also it throws out lots of unreadable text characters. This gave me a feeling that probably its a character coding issue with the jar file, so i tried ftp the file in binary mode as well as copying through the Operations Navigator. But still compilation is giving the same kind of errors.
    Do I need to have some special JDBC Drivers compiled for AS400 specifically. My understanding was that Java is platform independent so any JDBC Type 4 driver will work.
    We are running Java 1.3 on the AS400. Any help on this issue would be great.
    Thanks
    Inder

    Thanks for the help. I am writing a Java program after a long time that's why was making that mistake. Now the program gets compiled correctly but on running the program i am getting the following error message:
    java 001-0070: Exception JVAB544 not expected
    /myjava/test/msbase.jar: 001-0050 Syntax error on Line 1: token ')' not expected
    /myjava/test/msutil.jar: 001-0050 Syntax error on Line 1: token ')' not expected
    /myjava/test/mssqlserver.jar: 001-0050 Syntax error on Line 1: token ')' not expected
    I have no idea what is this error about. Though the same driver files don't give any error when running on a Windows machine.
    Thanks

  • How to Access Maintenance View from a program

    Hi Experts,
    I have created a maintenance view for a table. i want to insert data's into the table through the maintenance view. I don't know how to access the view, how to insert data into the Maintenance view. Please suggest me how to access the view from the program.
    with regards,
    James...
    Valuable answers will be rewarded...

    Hi,
    What is the need to search for a program.
    Use transaction SM30 or SE16 to create or maintain entries in the table.
    e.g. if the Maintenance view is created on table A, then Goto transaction SM30 or SE16 and give the table name as A and proceed. This will automatically take u to the maintenance view on tha table A.
    Regards,
    Himanshu

  • Since installing Photoshop CC I can't access Camera Raw from the program Bridge.

    Since installing Photoshop CC I can't access Camera Raw from the program Bridge.  When I try, I get a message that says, "Camera Raw editing is not enabled. Camera Raw editing requires that a qualifying product has been launched at least once to enable this feature."  Is Photoshop CC a qualifying product?  It has been opened a number of times, but it doesn't solve this problem.

    I am having this exact same problem and just upgraded to Windows 7...many people are saying to update the Plug In for Camera Raw to 4.6, but that is not working for me to see it in Bridge or Camera Raw.

  • Access SAP Tables from Java Program

    Hi All,
    We have a requirement to integrate attendance portal(which is done in java) with SAP.
    Our problem is how to access SAP tables from a Java program?
    Database is Sybase.
    Please suggest us a good solution.
    Thanks in advance...

    Did you go through Sap Help?
    Calling BAPIs from Java - BAPI User Guide CA-BFA) - SAP Library
    Regards,
    Philip.

  • HT4623 I just updated my iPad 3 but myI just updated my iPad 3 but myiPhone 5 keep giving me a error message.  I don't have permission to access the requested resource, from iPhone and via my Apple Mac??????

    I just updated my iPad 3 but myI just updated my iPad 3 but myiPhone 5 keep giving me a error message.  I don't have permission to access the requested resource, from iPhone and via my Apple Mac??????

    If you think this is a bug, you can report it here:
    Apple - Mac OS X - Feedback

  • MacBook Pro is operating more and more slowly in opening and closing, opening and closing programs and accessing and closing from mobile broadband.  Is there a solution to this problem?

    MacBook Pro is operating more and more slowly in opening and closing, opening and closing programs and accessing and closing from mobile broadband.  Is there a solution to this problem?

    Did you try rebooting?

  • How to access system calls from java program?

    i am having a doubt regarding accessing system calls from a Java program like accessing unix system calls from a c program.

    Runtime.getRuntime().exec("line command here");
    example:
    Runtime.getRuntime().exec("ls -la");

  • Looking for resource: accessing session info from JPS portlets

    Hi! The Portal Developer's Guide 10g Release 10.1.4, section 7.2.5 shows how to access session information from PDK portlets. I'm looking for information (tutorials, books) on how to do this from JPS portlets in the Oracle Portal environment.
    Thx!

    If u are using JSPProvider, then for getting the Session variable, peruse the below points:
    JSPProvider p=(JSPProvider)pageContext.getAttribute("JSPProvider");
    Session ses=p.getSession();

  • Accessing I-Photo from other programs

    Can not access I-Photo from WORD, I-Movie, etc. since installing I-Photo 09. It will show that I-Photo is available but never produces any photos, just continues to say "Loading" Have to drag photos to screen or other location, then drag to desired location. Have considered re-installing.

    Welcome to the Apple Discussions.
    Run Software Update and make sure you have all the iLife support updates installed. If you have then download and re-install the iLife 9.0.3 update from here
    http://support.apple.com/downloads/iLifeSupport_9_03
    and repair permissions.
    Regards
    TD

Maybe you are looking for

  • All Rows in to a Single Column?

    Hi,      I am Using Oracle 11g Database Release 1,I am try to get the Primary Column for a Table in My Database Normally We get the Output as Header Column1 Column2 Column3 But I need the Output as Header Column1,Column2,Column3 Please Advice Thank U

  • When printing internet site converted to *.tif file, want printed as document

    When I go to print a webpage or an email message, it gets converted to a TIF file and then I must save it in My Documents, then open it print it with the photo printing wizard. This never used to happen, nor does it happen when I use Explorer. How do

  • Problems importing photo

    When I try to import a photo from my iPhone, iPhot now wants to know where to save it. I can see all my old photos, but can't import any new ones. What's my problem and the solution?

  • Adobe pixel bender toolkit 2.5

    Im trying to update my CS5 and the application manger say i need adobe pixel bender toolkit 2.5 for  Adobe Flas Pro The application mange can't/won't update it so I'm trying to do i manually but can't  find it annywear Anny ideers on where to get it

  • Illustrator Cursors

    Group, I went in to Illustrator CS4 today to do some work and for some reason my brush, eraser, pencil, etc. cursors are not displaying correctly.  For example when I select a brush normally I get a circle (as the brush size) for my cursor.  Now I am