Cannot access image in jar
I have created a jar file in which I fill in the client classes, one of which loads an image as below:
try
System.out.println("before loading the image is ...");
url = new URL(getClass().getResource("../images/Leo.bmp"), "Leo.bmp");
System.out.println("The url is ...=" url);
image = ImageIO.read(url);
System.out.println("the image is ...=" image);
catch (Exception e) { /handled in paintComponent()/System.out.println("image loading unsuccessful..."); }
The client works fine, that is, it loads the image fine, only when I run the program in eclipse. But when I create a jar file and try to run it, it throws the exception and doesn't load the image.
The jar file entries are:
- cs package which has the class files and the source files
- images folder which has the Leo.bmp image
- META-INF which MANIFEST.MF
- .classpath
- .project
So the problem that everything works fine, but the only problem is that my JPanel class cannot load the image.
blinkaj wrote:
I have created a jar file in which I fill in the client classes, one of which loads an image as below:
try
System.out.println("before loading the image is ...");
url = new URL(getClass().getResource("../images/Leo.bmp"), "Leo.bmp");
System.out.println("The url is ...=" url);
image = ImageIO.read(url);
System.out.println("the image is ...=" image);
catch (Exception e) { /handled in paintComponent()/System.out.println("image loading unsuccessful..."); }What a freakin' mess. How can you read that rubbish? When posting code for others to examine, please
1) use the standard forms of indenting and bracketing code, and don't have two or more code statements per line.
2) post it inside code tags so the formatting and indentation is preserved. To do that, select the code and click the CODE button.
try
System.out.println("before loading the image is ...");
url = new URL(getClass().getResource("../images/Leo.bmp"), "Leo.bmp");
System.out.println("The url is ...=" url);
image = ImageIO.read(url);
System.out.println("the image is ...=" image);
catch (Exception e)
/handled in paintComponent()
/System.out.println("image loading unsuccessful...");
}Now that I can clearly see the code:
1) Don't swallow exceptions(3). Either throw them or at the very least report them.
2) getClass().getResource() will return a valid URL, or null. If it is valid, the extra 'wrapper' you have for creating a URL is unnecessary, and if it is null, adding the
new URL(null, "Leo.bmp")is pointless.
3) Hey. Wait a second! That code should not even compile!
import java.net.*;
class TestCompile {
public static void main(String[] args) {
URL url;
try
System.out.println("before loading the image is ...");
url = new URL(getClass().getResource("../images/Leo.bmp"), "Leo.bmp");
System.out.println("The url is ...=" url);
image = ImageIO.read(url);
System.out.println("the image is ...=" image);
catch (Exception e)
/handled in paintComponent()
/System.out.println("image loading unsuccessful...");
Running tool: Java Compile
/media/disk/projects/numbered/all/TestCompile.java:10: ')' expected
System.out.println("The url is ...=" url);
^
/media/disk/projects/numbered/all/TestCompile.java:10: illegal start of expression
System.out.println("The url is ...=" url);
^
/media/disk/projects/numbered/all/TestCompile.java:13: ')' expected
System.out.println("the image is ...=" image);
^
/media/disk/projects/numbered/all/TestCompile.java:13: illegal start of expression
System.out.println("the image is ...=" image);
^
/media/disk/projects/numbered/all/TestCompile.java:17: illegal start of expression
/handled in paintComponent()
^
/media/disk/projects/numbered/all/TestCompile.java:17: ';' expected
/handled in paintComponent()
^
/media/disk/projects/numbered/all/TestCompile.java:17: ';' expected
/handled in paintComponent()
^
7 errors
Why are you wasting our time by putting some 'approximate representation' of the code you are using?
Further, your use of the '..' prefix is probably causing problems. Instead try..
url = getClass().getResource("/images/Leo.bmp");
Similar Messages
-
Cant access image, in jar, from applet
I have seen this question posted in various places but have not had any luck solvin my problem. Im using the Java Plugin 1.3
Here is my html :
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="700" height="200" align="baseline"
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
<PARAM NAME="code" VALUE="com.hlboyd.ImageSequenceTimer">
<PARAM NAME="archive" VALUE="ImageSequenceTimerImages.jar,ImageSequenceTimer.jar">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
No Java 2 SDK, Standard Edition v 1.3 support for APPLET!!
</OBJECT>
My applet class is stored in one of the jars.
It is found and runs fine, until it trys to load an image that is found in the other jar.
The images are at the top level in their jar.
The image name is T1.gif.
InputStream in=getClass().getResourceAsStream("T1.gif");
URL url=getClass().getResource("T1.gif");
Both these methods return null.
Can anyone suggest why these methods are returning null?
Many thanks
HeatherI consolidated the jars - so that now the images and
java class files are in the same jar.
The getResouce() method still returns null.
I am really stuck - I simply cant get the applet to
see the images.
How are you attempting to get the images? If you're using Class.getResource(), then as was mentioned above, make sure the class file that has the Class.getResource() code in it, is in the same jar as the images. Then make sure you're referencing the images correctly.
For example:
Given that in the class:
mypackage.ImageLoader
you have the code:
ImageLoader.class.getResource(someVal);
If you want to load an image from the same jar called logo.gif in the same package (i.e. shows up as /mypackage/logo.gif), then someVal should be "logo.gif".
If the image is in a different directory/package then someVal should look like "/somepackage/logo.gif".
Basically, the relative path (someVal) starts from the package that the code (and class) is in. If the image is in a different package, you must start the someVal with a "/" and go from there.
I got the same thing to work this way. -
Installed Camera Raw update, still cannot access images from Canon G15
The download statement said it was upgraded but, when I tried opening the RAW files, there was still nothing accessible.
Buy Lightroom (much cheaper alternative to Photoshop) - does all your 'Photo-related' tasks. Full version of LightRoom 4 is $149/- - http://www.adobe.com/products/photoshop-lightroom.html
LightRoom 4 supports ACR (Adobe Camera Raw) 7. Once processed with Lightroom, if you still need, you could take the photo in JPG or TIFF format into Photoshop CS5 for further processing.
Another option is to use Canon Raw Codec that would've come with your camera's box to process the RAW images and then take them into Photoshop. -
This does not happen in other browsers and it happens on a variety of computers I have access to and would seem to be a common problem but I can find no identical cases in my searches of
Firefox , Facebook or windows help or Google search. My home machine is only a P2 with WINXPCORP but works fine and I have done all updates but still have this continuing problem every time I try to use Firefox
to access Facebook chat but it does not happen with IE or chrome
The response to clicking on chat button or friend chat is a black screen with small center square box with blue title bar that says
'' VIEW IMAGE FULL SCREEN - (42) FACEBOOK X""
center of box is ""! "" mark in yellow triangle and wording
"" CANNOT LOAD IMAGES ''' OK
clicking on OK returns to facebook page but no chat opens.
Some times |VERY RARLEY if as the page loades you click on
chat button with 1/2 second of it appearing chat will open.Hi,
Please also see [https://support.mozilla.org/en-US/kb/Problems%20using%20Facebook%20in%20Firefox this.] -
How to access images in a jar file
Hello,
I am currently developping a swing application that uses icons (gif files) and I have zipped all my classes and images in a single .jar file.
When I try to access those files it doesn't work ... it seems that I am not using the right way ...
Could anyone explain me how to achieve this ?
thanks in advanceI get the Images from jar file to set ImageIcon for my components like this:
ImagesLocator.getImage("imageName.gif");
anu
//ImagesLocator.java
import java.net.URL;
import java.awt.*;
import javax.swing.*;
* Load images from correct place (directory or JAR file) into GUI.
public class ImagesLocator
* Load image from correct place (directory or JAR file).
* @param imageName name of image to be loaded (with no path)
* @return loaded image
public static ImageIcon getImage(String imageName)
ClassLoader cl = ImagesLocator.class.getClassLoader();
ImageIcon i = new ImageIcon(cl.getResource(imageName));
return i; -
Problem with Photoshop Express IOS 8.02 - I recently installed IOS 8.02 on my iPad Air and Photoshop Express cannot access my full library of images. Also, when opening the app, I'm not given the option of selecting "Open from Adobe Revel", "Take a Picture" or "Open from Camera Roll".......I am taken directly to a small selection of images. The only images that show up are the saved photos previously adjusted through Photoshop Express. I also updated my iPhone 5s with IOS 8.02 and Photoshop Express works perfectly on the iPhone with all images in my library visible.
What could be the problem?Yes, the Old Master file has a folder for each year where I find all photos from that specific year. I am attaching a screen shot of the file.
In the meantime i have managed to download all photos (it did not download any video files though in mpg, avi, 3gp, m4v,mp4 and mov format) to a new iphoto library. Unfortunately the photos are quite mixed and often doubled up. I ma considering to purchase iphoto library which checks all duplicates in iphoto. this will save me a lot of time. What do you think? -
Dynamicaly loading an image (runtime) Cannot access a property or method
Hope someone can help with this. I have a group that when a function is called creates a new var that is of type image. I set the propertys of the image in script and then use the add child method to add it to the group. When I do I get TypeError: Error #1009: Cannot access a property or method of a null object reference.
public function loadImage():void
var im:Image = new Image();
im.percentHeight = 100;
im.percentWidth = 100;
im.source = s;
contentFrame.addChild(im);
Can someone please tell me what I'm doing wrong?
Thanks
Robmewk is right additionally you will probably get an error with the addChild statement as with groups the correct function is addElement, the following source is basically the same as mewks does it but the img is declared outside of the functions.
private var img:Image=new Image()
private function getImage(): void
img.addEventListener(Event.COMPLETE,loadImage);
img.load(s); // s is the name of the image i.e.(assets/images/myphoto.jpg)
public function loadImage(e:Event):void
img.percentWidth = 100;
img.percentHeight = 100;
imggroup.addElement(img); -
When i login with microsoft account cannot access with administrative share c$
i have a problem when i login to windows with microsoft account cannot access any network computer with administrative sharing c$,d$ with windows 8.1
but when i login with local account can access
and some people tell me create key in regedit t fix it
after enter user name and password show this error
and i apply your instruction and not fix until now
note:
my Machine windows 8.1 if another machine in network windows 7 can access a hidden share if machine in network windows 8.1 show this message in image 2
but if i login with local user can i access all machine hidden share network windows 7 and 8.1yes this computer i want to access name poland2-work and have two users
first :administrator
second : poland 2 -
SharePoint Designer 2013 cannot access workflows in Office 365 Site
I have an Office 365 SharePoint site with a number of workflows that I have created on my machine with SPD 2013. After a number of weeks I was unable to access the workflows from my machine through SPD (while still being able to access pages, site assets
etc.), getting the following error: (Am restricted from submitting images)
"Server-side activities have been updated. You need to restart SharePoint Designer to use the updated version of activities"
Restarting SPD doesn't help, after clicking OK I get the "SharePoint Designer cannot display the item" screen, prompting me to refresh.
When I do refresh, I get the following:
"Windows Workflow Foundation, part of .Net Framework 3.0, must be installed to use this feature"
This is happening on my machine, Windows 7 64 Bit, SPD 2013 64 Bit, but on a colleague's machine, Win 7 64 Bit, SPD 2013 64 Bit I can access the workflows.
I get the same error if I try to create a new Workflow on my machine but I can create it on my colleague's machine.
I downloaded SPD 2013 on a 32 bit laptop I have access to, in which I can create a workflow. One existing workflow can be accessed, updated etc. with no issue, one opens to a prompt to "Insert a stage" and one tells me that it "Failed to load
the workflow definition for the workflow", then the "SharePoint Designer cannot display the item" screen. All of these workflows can be accessed from my colleague's machine.
Here are the actions that I have taken to date on my own machine:
Cleared the caches multiple times
Checked for updates
Installed .Net Framework 4.5
Re-installed .Net Framework 4.0 (which contains 3.0)
Uninstalled and re-installed SPD 2013
Due to issues with a workflow on the site I am in contact with MS Support who are aware of this issue, they sent me a link to a hot fix that was already installed but they have no concrete idea of what might be going on.
I was convinced that it was an issue on my machine, but I don't know what the issues that I have seen on the 32 bit SPD on the new laptop mean.
I have been searching the internet for a fix with no success, I would appreciate any help.
Thanks
MickHi,
According to your post, my understanding is that SharePoint Designer 2013 cannot access workflows in Office 365 Site.
There was an issue recently when a service release was implemented that incremented the version number in the HTML header on some SharePoint online sites to '16' when SPD was expecting '15'.
I suggest to install internet explore 10 and install a patch for IE10. Then test with "open with windows explore" then opened in SPD from sharepoint online.
In addition, I suggest that in SPD go to Account > Switch Account and type in the credentials of the site you are trying to open (it defaults to your Microsoft Login).
If the issue persists, to troubleshoot this issue, you can uninstall all versions of SharePoint Designer on workstation, clear cache and then reinstalling the latest SharePoint Designer. For the detailed information, you can refer to the
article: http://support.microsoft.com/kb/2794961
Here are two similar threads for you to take a look at:
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/15fd1436-3166-4e43-8b22-cdb480091548/cant-open-sharepoint-online-site-in-sharepoint-designer-2013
http://community.office365.com/en-us/forums/154/t/149314.aspx?PageIndex=2
By the way, you can also post the question in Office 365 forum and more experts will assist you.
Office 365 forums
:http://community.office365.com/en-us/forums/default.aspx
More information:
SharePoint
Designer 2013: Server-side activities have been updated:
http://www.andreasthumfart.com/2013/08/sharepoint-designer-2013-server-side-activities-have-been-updated/
Best Regards,
Linda Li
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Cannot access file from JApplet
I have used the swingall.jar file with my JApplet for any
version of IE. It gives one error
i.e
Cannot access file c:\prog\project
I want to create a directory within c:\prog and also i want
to write some files there. Pls help me.try this my friend!
1. Compile the applet
2. Create a JAR file
3. Generate Keys
4. Sign the JAR file
5. Export the Public Key Certificate
6. Import the Certificate as a Trusted Certificate
7. Create the policy file
8. Run the applet
Susan
Susan bundles the applet executable in a JAR file, signs the JAR file, and exports the public key certificate.
1. Compile the Applet
In her working directory, Susan uses the javac command to compile the SignedAppletDemo.java class. The output from the javac command is the SignedAppletDemo.class.
javac SignedAppletDemo.java
2. Make a JAR File
Susan then makes the compiled SignedAppletDemo.class file into a JAR file. The -cvf option to the jar command creates a new archive (c), using verbose mode (v), and specifies the archive file name (f). The archive file name is SignedApplet.jar.
jar cvf SignedApplet.jar SignedAppletDemo.class
3. Generate Keys
Susan creates a keystore database named susanstore that has an entry for a newly generated public and private key pair with the public key in a certificate. A JAR file is signed with the private key of the creator of the JAR file and the signature is verified by the recipient of the JAR file with the public key in the pair. The certificate is a statement from the owner of the private key that the public key in the pair has a particular value so the person using the public key can be assured the public key is authentic. Public and private keys must already exist in the keystore database before jarsigner can be used to sign or verify the signature on a JAR file.
In her working directory, Susan creates a keystore database and generates the keys:
keytool -genkey -alias signFiles -keystore susanstore -keypass kpi135 -dname "cn=jones" -storepass ab987c
This keytool -genkey command invocation generates a key pair that is identified by the alias signFiles. Subsequent keytool command invocations use this alias and the key password (-keypass kpi135) to access the private key in the generated pair.
The generated key pair is stored in a keystore database called susanstore (-keystore susanstore) in the current directory, and accessed with the susanstore password (-storepass ab987c).
The -dname "cn=jones" option specifies an X.500 Distinguished Name with a commonName (cn) value. X.500 Distinguished Names identify entities for X.509 certificates.
You can view all keytool options and parameters by typing:
keytool -help
4. Sign the JAR File
JAR Signer is a command line tool for signing and verifying the signature on JAR files. In her working directory, Susan uses jarsigner to make a signed copy of the SignedApplet.jar file.
jarsigner -keystore susanstore -storepass ab987c -keypass kpi135 -signedjar SSignedApplet.jar SignedApplet.jar signFiles
The -storepass ab987c and -keystore susanstore options specify the keystore database and password where the private key for signing the JAR file is stored. The -keypass kpi135 option is the password to the private key, SSignedApplet.jar is the name of the signed JAR file, and signFiles is the alias to the private key. jarsigner extracts the certificate from the keystore whose entry is signFiles and attaches it to the generated signature of the signed JAR file.
5. Export the Public Key Certificate
The public key certificate is sent with the JAR file to the whoever is going to use the applet. That person uses the certificate to authenticate the signature on the JAR file. To send a certificate, you have to first export it.
The -storepass ab987c and -keystore susanstore options specify the keystore database and password where the private key for signing the JAR file is stored. The -keypass kpi135 option is the password to the private key, SSignedApplet.jar is the name of the signed JAR file, and signFiles is the alias to the private key. jarsigner extracts the certificate from the keystore whose entry is signFiles and attaches it to the generated signature of the signed JAR file.
5: Export the Public Key Certificate
The public key certificate is sent with the JAR file to the whoever is going to use the applet. That person uses the certificate to authenticate the signature on the JAR file. To send a certificate, you have to first export it.
In her working directory, Susan uses keytool to copy the certificate from susanstore to a file named SusanJones.cer as follows:
keytool -export -keystore susanstore -storepass ab987c -alias signFiles -file SusanJones.cer
Ray
Ray receives the JAR file from Susan, imports the certificate, creates a policy file granting the applet access, and runs the applet.
6. Import Certificate as a Trusted Certificate
Ray has received SSignedApplet.jar and SusanJones.cer from Susan. He puts them in his home directory. Ray must now create a keystore database (raystore) and import the certificate into it. Ray uses keytool in his home directory /home/ray to import the certificate:
keytool -import -alias susan -file SusanJones.cer -keystore raystore -storepass abcdefgh
7. Create the Policy File
The policy file grants the SSignedApplet.jar file signed by the alias susan permission to create newfile (and no other file) in the user's home directory.
Ray creates the policy file in his home directory using either policytool or an ASCII editor.
keystore "/home/ray/raystore";
// A sample policy file that lets a JavaTM program
// create newfile in user's home directory
// Satya N Dodda
grant SignedBy "susan"
permission java.security.AllPermission;
8. Run the Applet in Applet Viewer
Applet Viewer connects to the HTML documents and resources specified in the call to appletviewer, and displays the applet in its own window. To run the example, Ray copies the signed JAR file and HTML file to /home/aURL/public_html and invokes Applet viewer from his home directory as follows:
Html code :
</body>
</html>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="600" height="400" align="middle"
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,1,2">
<PARAM NAME="code" VALUE="SignedAppletDemo.class">
<PARAM NAME="archive" VALUE="SSignedApplet.jar">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
</OBJECT>
</body>
</html>
appletviewer -J-Djava.security.policy=Write.jp
http://aURL.com/SignedApplet.html
Note: Type everything on one line and put a space after Write.jp
The -J-Djava.security.policy=Write.jp option tells Applet Viewer to run the applet referenced in the SignedApplet.html file with the Write.jp policy file.
Note: The Policy file can be stored on a server and specified in the appletviewer invocation as a URL.
9. Run the Applet in Browser
Download JRE 1.3 from Javasoft
save this to write.jp
keystore "/home/ray/raystore";
// A sample policy file that lets a JavaTM program
// create newfile in user's home directory
// Satya N Dodda
grant {
permission java.security.AllPermission;
save this to signedAppletDemo.java
* File: @(#)SignedAppletDemo.java 1.1
* Comment: Signed Applet Demo
* @(#)author: Satya Dodda
* @(#)version: 1.1
* @(#)date: 98/10/01
import java.applet.Applet;
import java.awt.Graphics;
import java.io.*;
import java.awt.Color;
* A simple Signed Applet Demo
public class SignedAppletDemo extends Applet {
public String test() {
setBackground(Color.white);
System.out.println(System.getProperty("user.home"));
String fileName = System.getProperty("user.home") +
System.getProperty("file.separator") +
"newfile";
String msg = "This message was written by a signed applet!!!\n";
String s ;
try {
FileWriter fos = new FileWriter(fileName);
fos.write(msg, 0, msg.length());
fos.close();
s = new String("Successfully created file :" + fileName);
} catch (Exception e) {
System.out.println("Exception e = " + e);
e.printStackTrace();
s = new String("Unable to create file : " + fileName);
return s;
public void paint(Graphics g) {
g.setColor(Color.blue);
g.drawString("Signed Applet Demo", 120, 50);
g.setColor(Color.magenta);
g.drawString(test(), 50, 100); -
Cannot delete images from LR 5
First, my setup:
LR 5.3
New 2013 iMac with 3T fusion drive
OS X Mavericks
I migrated all of my apps, files, etc from a 2007 iMac, following Apple's procedure. To take advantage of the speed of the fusion drive, I moved my image files from a La Cie external drive to the iMac's fusion drive. (Yes, I am backed up, triply backed up with both external backup drives and cloud backup.) There were a few hiccups, but I straightened them out and now can access every one of my images, process, etc.
But...since the migration and importation to the iMac internal fusion drive, I cannot delete images. When I'm sorting, I use the X key to mark images for deletion. Then, when I use the standard cmd-delete key combination, I get the standard window offering me the option of just removing the image from the catalog or deleting it from the disk. When I select the latter (since I don't want rejected images clogging my hard drive), a new window appears: The file named "___" could not be moved to the trash folder."
The problem occurs only since the migration and moving of the images to the new drive.
I have tried numerous fixes suggest in various forums—create a new folder, then delete it to create a channel for LR; check permissions; repair permissions; run various commands through terminal. It's maddening because I sometimes reject a few hundred images at a time, and there's simply no reason to retain them on my drive. Any help will be much appreciated and rewarded with a dram of virtual single-malt scotch.
DYou're right, Suzanne, I had...or so I thought. I had checked at too high a level in the folder hierarchy. When I drilled down, I found the last two levels of folders didn't even have me listed as an owner. Odd. What I found, to my delight, was that I could change permissions on the master image folder, then instruct that those changes be applied to all folders within the master folder. Solved the whole problem.
So Suzanne, Geoff, even though neither of you directly provided the solution, your answers got me to check a couple of things that turned up the problem and the solution. So thanks!
D -
ASA 5505 Static hosts cannot access outside
I'm replacing an old PIX with a second hand ASA firewall.
I have configured the ASA in a very similar manner to how the PIX was set up but I'm having trouble with some hosts on the inside accessing the Internet. Any inside hosts which use DHCP work fine. Any inside hosts with a static IP (and configured on the ASA with a "static" rule) cannot access the Internet. For example, in the config below the server daviker-dialler cannot access the Internet.
I've spent a few days working on this now and have started from scratch several times but I'm not getting anywhere.
Apologies for all the X's everywhere, didn't like to post anything sensitive on the Internet. If I've obscured something pertinent let me know.
Any advice would be greatly appreciated! Thanks.
: Saved
ASA Version 7.2(3)
hostname fw-1
domain-name XXXX
enable password XXXX encrypted
names
name 92.X.X.61 bb-office
name 92.X.X.128 gl-office
name 10.0.0.117 daviker-dialler_in
name 77.X.X.117 daviker-dialler_out
name 10.0.0.112 data-2_in
name 77.X.X.112 data-2_out
name 10.0.0.81 corp-1_in
name 77.X.X.81 corp-1_out
name 10.0.0.111 data-1_in
name 77.X.X.210 user_75
interface Vlan1
nameif inside
security-level 100
ip address 10.0.0.1 255.255.255.0
interface Vlan2
nameif outside
security-level 0
ip address 77.X.X.66 255.255.255.192
interface Ethernet0/0
switchport access vlan 2
interface Ethernet0/1
interface Ethernet0/2
interface Ethernet0/3
interface Ethernet0/4
interface Ethernet0/5
interface Ethernet0/6
interface Ethernet0/7
passwd XXXX encrypted
ftp mode passive
dns server-group DefaultDNS
domain-name XXXX
access-list inbound extended permit tcp host bb-office host daviker-dialler_out eq 5900
access-list inbound extended permit tcp host bb-office host daviker-dialler_out eq 4040
access-list inbound extended permit tcp host bb-office host daviker-dialler_out eq 9876
access-list inbound extended permit tcp host bb-office host daviker-dialler_out eq sip
access-list inbound extended permit tcp host bb-office host daviker-dialler_out eq www
access-list inbound extended permit tcp host bb-office host daviker-dialler_out eq https
access-list inbound extended permit udp host bb-office host daviker-dialler_out eq sip
access-list inbound extended permit tcp host bb-office host daviker-dialler_out eq 1433
access-list inbound extended permit udp host bb-office host daviker-dialler_out eq netbios-ns
access-list inbound extended permit udp host bb-office host daviker-dialler_out eq netbios-dgm
access-list inbound extended permit tcp host bb-office host daviker-dialler_out eq netbios-ssn
access-list inbound extended permit tcp host bb-office host daviker-dialler_out eq 445
access-list inbound extended permit tcp host gl-office host daviker-dialler_out eq 4040
access-list inbound extended permit tcp host gl-office host daviker-dialler_out eq 9876
access-list inbound extended permit tcp host gl-office host daviker-dialler_out eq sip
access-list inbound extended permit tcp host gl-office host daviker-dialler_out eq www
access-list inbound extended permit tcp host gl-office host daviker-dialler_out eq https
access-list inbound extended permit udp host gl-office host daviker-dialler_out eq sip
access-list inbound extended permit tcp host gl-office host daviker-dialler_out eq 1433
access-list inbound extended permit udp host gl-office host daviker-dialler_out eq netbios-ns
access-list inbound extended permit udp host gl-office host daviker-dialler_out eq netbios-dgm
access-list inbound extended permit tcp host gl-office host daviker-dialler_out eq netbios-ssn
access-list inbound extended permit tcp host gl-office host daviker-dialler_out eq 445
access-list inbound extended permit tcp host gl-office host daviker-dialler_out eq 5900
access-list inbound extended permit tcp any host data-2_out eq ssh
access-list inbound extended permit tcp any host corp-1_out eq ssh
access-list inbound extended permit tcp any host corp-1_out eq www
access-list inbound extended permit tcp any host corp-1_out eq pop3
access-list inbound extended permit tcp any host corp-1_out eq imap4
access-list inbound extended permit tcp any host corp-1_out eq smtp
access-list inbound extended permit tcp any host corp-1_out eq 995
access-list inbound extended permit tcp any host corp-1_out eq 465
access-list inbound extended permit tcp any host corp-1_out eq 993
access-list inbound extended permit tcp any host corp-1_out eq 8008
access-list inbound extended permit udp 77.X.X.64 255.255.255.192 host 77.X.X.113 eq netbios-ns
access-list inbound extended permit udp 77.X.X.64 255.255.255.192 host 77.X.X.113 eq netbios-dgm
access-list inbound extended permit tcp 77.X.X.64 255.255.255.192 host 77.X.X.113 eq netbios-ssn
access-list inbound extended permit tcp 77.X.X.64 255.255.255.192 host 77.X.X.113 eq 445
access-list inbound extended permit udp any host 77.X.X.113 eq netbios-ns
access-list inbound extended permit udp any host 77.X.X.113 eq netbios-dgm
access-list inbound extended permit tcp any host 77.X.X.113 eq netbios-ssn
access-list inbound extended permit tcp any host 77.X.X.113 eq 445
access-list inbound extended permit tcp host bb-office host data-2_out eq 5901
access-list inbound extended permit tcp host bb-office host data-2_out eq 3690
access-list inbound extended permit tcp host bb-office host data-2_out eq www
access-list inbound extended permit tcp host bb-office host daviker-dialler_out eq 3389
access-list inbound extended permit tcp host 2.X.X.18 host data-2_out eq 3306
access-list inbound extended permit tcp any host data-2_out eq 3306
access-list inbound extended permit tcp host 212.X.X.7 host daviker-dialler_out eq 5900
access-list inbound extended permit tcp host bb-office host data-2_out eq 3306
access-list inbound extended permit tcp host user_75 host daviker-dialler_out eq 1433
access-list inbound extended permit tcp host user_75 host daviker-dialler_out eq 5900
access-list inbound extended permit tcp host user_75 host data-2_out eq 3690
access-list inbound extended permit tcp host user_75 host data-2_out eq www
access-list inbound extended permit tcp host user_75 host data-2_out eq 3306
pager lines 24
logging asdm informational
mtu inside 1500
mtu outside 1500
icmp unreachable rate-limit 1 burst-size 1
asdm image disk0:/asdm-523.bin
no asdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0
static (inside,outside) daviker-dialler_out daviker-dialler_in netmask 255.255.255.255
static (inside,outside) corp-1_out corp-1_in netmask 255.255.255.255
static (inside,outside) data-2_out data-2_in netmask 255.255.255.255
static (inside,outside) 77.X.X.113 data-1_in netmask 255.255.255.255
access-group inbound in interface outside
route outside 0.0.0.0 0.0.0.0 77.X.X.65 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout uauth 0:05:00 absolute
aaa authentication ssh console LOCAL
aaa authentication telnet console LOCAL
aaa authorization command LOCAL
http server enable
http 10.0.0.0 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
telnet 0.0.0.0 0.0.0.0 inside
telnet timeout 5
ssh 0.0.0.0 0.0.0.0 inside
ssh timeout 5
console timeout 0
dhcpd dns 77.X.X.91 8.8.8.8
dhcpd domain cagltd.net
dhcpd auto_config outside
dhcpd address 10.0.0.20-10.0.0.40 inside
dhcpd enable inside
class-map inspection_default
match default-inspection-traffic
policy-map type inspect dns preset_dns_map
parameters
message-length maximum 512
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
inspect ftp
inspect h323 h225
inspect h323 ras
inspect rsh
inspect rtsp
inspect esmtp
inspect sqlnet
inspect skinny
inspect sunrpc
inspect xdmcp
inspect sip
inspect netbios
inspect tftp
service-policy global_policy global
username matt password XXXX encrypted
prompt hostname context
Cryptochecksum:00af76f23831b8c828fc6677c9069072
: endHi Jouni,
Thanks for the info.
I didn't have icmp traffic allowed, so I knew ping wouldn't be working. I was testing using http.
I have enabled icmp and dhcp clients can ping outside. Static nat clients can't ping outside. Static clients also cannot use outbound http.
As suggested, I have run some packet traces.
From a static nat client on the ASA:
fw-1# packet-tracer input inside tcp 10.0.0.81 80 173.203.209.67 80
Phase: 1
Type: ACCESS-LIST
Subtype:
Result: ALLOW
Config:
Implicit Rule
Additional Information:
MAC Access list
Phase: 2
Type: FLOW-LOOKUP
Subtype:
Result: ALLOW
Config:
Additional Information:
Found no matching flow, creating a new flow
Phase: 3
Type: ROUTE-LOOKUP
Subtype: input
Result: ALLOW
Config:
Additional Information:
in 0.0.0.0 0.0.0.0 outside
Phase: 4
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 5
Type: NAT
Subtype:
Result: ALLOW
Config:
static (inside,outside) corp-1_out corp-1_in netmask 255.255.255.255
match ip inside host corp-1_in outside any
static translation to corp-1_out
translate_hits = 668, untranslate_hits = 2
Additional Information:
Static translate corp-1_in/0 to corp-1_out/0 using netmask 255.255.255.255
Phase: 6
Type: NAT
Subtype: host-limits
Result: ALLOW
Config:
static (inside,outside) corp-1_out corp-1_in netmask 255.255.255.255
match ip inside host corp-1_in outside any
static translation to corp-1_out
translate_hits = 668, untranslate_hits = 2
Additional Information:
Phase: 7
Type: HOST-LIMIT
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 8
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 9
Type: FLOW-CREATION
Subtype:
Result: ALLOW
Config:
Additional Information:
New flow created with id 1759, packet dispatched to next module
Phase: 10
Type: ROUTE-LOOKUP
Subtype: output and adjacency
Result: ALLOW
Config:
Additional Information:
found next-hop 77.X.X.65 using egress ifc outside
adjacency Active
next-hop mac address 0017.0f13.5000 hits 1
Result:
input-interface: inside
input-status: up
input-line-status: up
output-interface: outside
output-status: up
output-line-status: up
Action: allow
This looks fine to me, but as I say, an outbound tcp port 80 connection from the actual machine on 10.0.0.81 fails.
Here is a similar trace from a dhcp client to the same destination:
fw-1# packet-tracer input inside tcp 10.0.0.20 80 173.203.209.67 80
Phase: 1
Type: FLOW-LOOKUP
Subtype:
Result: ALLOW
Config:
Additional Information:
Found no matching flow, creating a new flow
Phase: 2
Type: ROUTE-LOOKUP
Subtype: input
Result: ALLOW
Config:
Additional Information:
in 0.0.0.0 0.0.0.0 outside
Phase: 3
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 4
Type: NAT
Subtype:
Result: ALLOW
Config:
nat (inside) 1 0.0.0.0 0.0.0.0
match ip inside any outside any
dynamic translation to pool 1 (77.74.111.66 [Interface PAT])
translate_hits = 990, untranslate_hits = 226
Additional Information:
Dynamic translate 10.0.0.20/80 to 77.74.111.66/1 using netmask 255.255.255.255
Phase: 5
Type: NAT
Subtype: host-limits
Result: ALLOW
Config:
nat (inside) 1 0.0.0.0 0.0.0.0
match ip inside any inside any
dynamic translation to pool 1 (No matching global)
translate_hits = 0, untranslate_hits = 0
Additional Information:
Phase: 6
Type: HOST-LIMIT
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 7
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 8
Type: FLOW-CREATION
Subtype:
Result: ALLOW
Config:
Additional Information:
New flow created with id 1771, packet dispatched to next module
Phase: 9
Type: ROUTE-LOOKUP
Subtype: output and adjacency
Result: ALLOW
Config:
Additional Information:
found next-hop 77.X.X.65 using egress ifc outside
adjacency Active
next-hop mac address 0017.0f13.5000 hits 5
Result:
input-interface: inside
input-status: up
input-line-status: up
output-interface: outside
output-status: up
output-line-status: up
Action: allow
I can see the difference in the NAT translation section. A real outbound tcp port 80 connection from the actual machine on 10.0.0.20 works fine.
Finally, for the sake of comparison, I ran a similar packet trace using a static nat IP on the old PIX firewall:
old-fw-1# packet-tracer input inside tcp 10.0.0.117 80 173.203.209.67 80
Phase: 1
Type: ACCESS-LIST
Subtype:
Result: ALLOW
Config:
Implicit Rule
Additional Information:
MAC Access list
Phase: 2
Type: FLOW-LOOKUP
Subtype:
Result: ALLOW
Config:
Additional Information:
Found no matching flow, creating a new flow
Phase: 3
Type: ROUTE-LOOKUP
Subtype: input
Result: ALLOW
Config:
Additional Information:
in 0.0.0.0 0.0.0.0 outside
Phase: 4
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 5
Type: INSPECT
Subtype: np-inspect
Result: ALLOW
Config:
class-map inspection_default
match default-inspection-traffic
policy-map global_policy
class inspection_default
inspect http
service-policy global_policy global
Additional Information:
Phase: 6
Type: NAT
Subtype:
Result: ALLOW
Config:
static (inside,outside) daviker-dialler_out daviker-dialler_in netmask 255.255.255.255
nat-control
match ip inside host daviker-dialler_in outside any
static translation to daviker-dialler_out
translate_hits = 17132, untranslate_hits = 1277850
Additional Information:
Static translate daviker-dialler_in/0 to daviker-dialler_out/0 using netmask 255.255.255.255
Phase: 7
Type: NAT
Subtype: host-limits
Result: ALLOW
Config:
static (inside,outside) daviker-dialler_out daviker-dialler_in netmask 255.255.255.255
nat-control
match ip inside host daviker-dialler_in outside any
static translation to daviker-dialler_out
translate_hits = 17132, untranslate_hits = 1277850
Additional Information:
Phase: 8
Type: IP-OPTIONS
Subtype:
Result: ALLOW
Config:
Additional Information:
Phase: 9
Type: FLOW-CREATION
Subtype:
Result: ALLOW
Config:
Additional Information:
New flow created with id 1006075, packet dispatched to next module
Phase: 10
Type: ROUTE-LOOKUP
Subtype: output and adjacency
Result: ALLOW
Config:
Additional Information:
found next-hop 78.X.X.69 using egress ifc outside
adjacency Active
next-hop mac address 0017.0f13.5000 hits 572133
Result:
input-interface: inside
input-status: up
input-line-status: up
output-interface: outside
output-status: up
output-line-status: up
Action: allow
Outbound traffic from static nat hosts on the old PIX firewall works fine. One glaring difference is that the PIX is inspecting http traffic, but surely this is a red herring. Another difference is that the old and new firewalls have different gateways / default routes & different outside IP addresses. As the new ASA firewall (and its dhcp hosts) can talk to the outside world quite happily I don't think this is relevant.
I wondered whether it might be down to the difference in the inside (255.255.255.0) and outside (255.255.255.192) subnets. The set up is the same on the PIX, but I wondered whether some other line of config might be required on the ASA to handle it. I adjusted the subnet of the inside interface on the ASA to match the outside one (both 255.255.255.192) but it didn't make any difference.
So I'm puzzled! -
Error #1009: Cannot access a property or method
Here's the context of the problem, in which I will try to include as much information as possible while keeping the explanation brief.
I am trying to make a portfolio website (architectural design + concept art). Flash / programing are not my focus and this is my first go at learning the software. Due to the nature of the content and my (lack) of ability in AS3, I want the the coding to be really simple and still let the site look good. The way the site is currently structured:
1) Basic menu buttons that navigate to sections of the site (brings up a new page).
2) Example, clicking on <Graphics> takes you to a new page and a sub-menu animates in (simple motion tween for the buttons to cascade down). This animation is a movie clip placed on the main timeline.
3) On the screen is also a slideshow for all the images within <Graphics>. Instead of multiple small slideshows, I combined them all into one, so as to avoid complications with add / remove from stage. There are prev / next buttons that keep images within their sub section (ie 1->2->3->1). The sub-menu buttons are suppose to link to the start of each sub section, much like chapters on a DVD. (The slideshow is a movieclip sub-nested in the menu movieclip).
Main menu buttons work.
Sub-menu animation works.
Slideshow works.
Can't get the sub-menu buttons to access the slideshow chapters.
I have created and solved about half a dozen errors, and each time I fix something, it just causes another point to break. I've gone around in circles for days, and not sure which was is up anymore. So, while the slideshow works independently of the rest of the content, and I think I have the parent referencing correct, the problem I am currently facing is thus:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at 03graphics_fla::MainTimeline/frame1()
I've browsed some other threads, and I think I know what the problem is. Since the sub-menu is animated, the buttons do not appear on frame 1 of the nested timeline, while the actionscript is on frame 1 of the main timeline - thus the code doesn't exist yet when I click the button.
Is this indeed the problem? If so, how do I go about fixing it?
Additionally, does the structure makes sense on how my site is organized? Is there an easier / cleaner way to code it?
(This thing is completely ghetto-rigged, I just need it to function - it's like my own little Millenium Falcon...)
Cheers,
AndyTry following this posting, which is just a posting or two away from your own in the forum...
http://forums.adobe.com/thread/748542?tstart=0 -
I have been working on a book and have 418 photos already in my book. All of a sudden I cannot access the book module and clicking on the multiple view, spread view, or single view does not take me back to the book I have been working on. I can no longer see my book although I still see the collection with 418 photos under collections. What I do see is a blank template for a new book and I can't find the unfinished book I started with 418 photos. It is like the new empty template is somehow covering it up. How do I get back to the book I have been working on?
Is it possible you mistakenly clicked on a [Clear Layout] button?
But a great hint is- Always click on the [Create a Saved Book] button, early in your new book design.
Then you have a permanent link to the book in the Collections panel. (In addition to the standard collection of your selected images)
Note: a Book Collection shows an icon that looks like a book.
Every time you come back to edit the book, open the Book Module by clicking on the white arrow that appears on the end of your Book Collection title. (The title as saved)
Re-opening a book without using the "Saved Book" option can have unpredictable results.
A "Book" Collection is like a "Smart Collection" because anything you do to the book design, change pages, change images, etc, is automatically updated in the Saved Book collection. -
I am trying to move a file from a folder to another folder.
here is my code:
//storage of the all files
string[] folderContentNames = Directory.GetFiles(@"C:\Users\Jonah\Desktop\Test Pictures");
private void historyPictureBox_Click(object sender, EventArgs e)
destinationFile = @"C:\Users\Jonah\Desktop\Test Test";
File.Move(folderContentNames[1], destinationFile);
updateListBoxFileName();
updateImageBox();
each time I hit the bolded underlined part I get that error message.
if you need anything else just ask.
Thanks in advance,
Thor OrbHi Thor,
If you want to move a file from a folder to another folder, I think you could get the sourcePath and TargetPath. The code below shows a simple demo:
string[] folders = Directory.GetFiles(@"D:\Test\VSC#\01\WindowsFormsApp\WindowsFormsApp\Test");
string desFile =Path.Combine( @"D:\Test\VSC#\01\WindowsFormsApp\WindowsFormsApp\Test - Copy\"+Path.GetFileName(folders[1]));
File.Move(folders[1], desFile);
In addition, the link below might be useful to you:
# How to: Copy, Delete, and Move Files and Folders (C# Programming Guide)
>> The process cannot access the file because it is being used by another process
The message seemed that the file was opened in other process. Did you operate the file with other code?
I think you could check if the files and the folders were opened, and review your codes if they were used in other places.
If you have any further questions, please feel free to post in this forum.
Best Regards,
Edward
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.
Ya, Thanks I figured about the path and destation. yes I am using the file in another area, the file is an image jpg and I am displaying it in a picture box. Now I have been doing a little research I see a command called Dispose() and this is suppose to
release the handle on the image, but I can seem to figure out have to use it correctly.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Collections;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
namespace Scanned_Picture_Ogranizer
public partial class Form1 : Form
//storage of the all files
string[] folderContentNames = Directory.GetFiles(@"C:\Users\Jonah\Desktop\Scan Project Testing\Test Pictures", "*.jpg");
//List<string> folderContentList = folderContentNames.ToList();
private List<string> folderContentList = new List<string>();
Bitmap currentImage;
Bitmap placeHolder;
public Form1()
InitializeComponent();
convertingArrayToList();
startUpData();
string sourceFile = @"C:\Users\Jonah\OneDrive\My Programming Projects\Scanned Picture Organizer Project\Test Pictures";
string destinationFile = "";
private void moveButton_Click(object sender, EventArgs e)
private void startUpData()
//placeHolder = new Bitmap(folderContentList[0]);
//currentImage = (Bitmap)placeHolder.Clone();
// Image loadImage = new Bitmap(pictureClones[0]);
// currentFilePictureBox.Image = loadImage;
int numberOfFilesLeft = folderContentNames.Length;
foreach (string name in folderContentNames)
fileNamesListBox.Items.Add(name);
fileNameTextBox.Text = folderContentNames[0];
numberOfFilesLeftTextBox.Text = numberOfFilesLeft.ToString();
///loadImage.Dispose();
//FileStream currentImage = new FileStream(folderContentList[0], FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
private void convertingArrayToList()
foreach (string listName in folderContentNames)
folderContentList.Add(listName);
private void selectingImageFromListBox()
private void updateImageBox()
Bitmap currentImage = new Bitmap(folderContentList[0]);
currentFilePictureBox.Image = currentImage;
currentImage.Dispose();
private void updateListBoxFileName()
fileNamesListBox.Items.RemoveAt(0);
fileNameTextBox.Text = folderContentList[0];
// numberOfFilesLeftTextBox.Text = numberOfFilesLeft.ToString();
private void historyPictureBox_Click(object sender, EventArgs e)
destinationFile = @"C:\Users\Jonah\Desktop\Scan Project Testing\Test Test\";
File.Move(folderContentList[0], destinationFile + System.IO.Path.GetFileName(folderContentList[0]));
folderContentList.RemoveAt(0);
updateImageBox();
updateListBoxFileName();
when I first start the program the first picture displays, but when I trigger historyPictureBox_Click(), it does that error again. Another things is that I already looked at that link and it didn't help.
I just super confused, I would like your help on this.
Thanks,
Thor Orb
Maybe you are looking for
-
Multiple users for Pages?
if you have several user profiles on a computer, can the downloaded pages be used for everyone or do you need to buy multiple versions?
-
Inconsistency BSEG, BSIS, BSAS
Hi, likeable consultants! In transactions reports: FBL3N and FS10N I have differents accounts balances display. analyzing BSEG Table, I have 15 line itens, and BSIS and BSAS have 18 line itens. I request a solution to adjust these 3 line itens to bal
-
Chinese word download to excel
How to download a Chinese character into excel thoru=gh GUI_DOWNLOAD> I have passed the parametr CODE PAGE as '8400'.But still some kunk character is coming.how to do this? Thanks in Advance.
-
Tax procedure for VAT calculation on Base amount + WHT amount
Hi All, Needed your inputs on definition of tax procedure, to calculate VAT tax where base amount + withholding tax amount are tax base components. E.g. in AR line item: Revenue: 950 (FB70 ->Editing options: calculate taxes on net amount check
-
Cookies set to "Never" but Safari now accepts all cookies anyway
In looking closely at cookies accepted "only from sites I visit" I noticed that it actually includes a lot of third-party cookies, so I keep Preferences set to Never unless I'm accessing a site that must accept them (for example, New York Times). Ho