Question: I am trying to export to a runnable JAR of my project that has the following structure:

```
Project
   |
   |---Source folder
   |         |
   |         |
   |     .java files
   |
   |
   |---Image folder
             |
             |
         .png files

```

The `.png` images are read inside the `.java` files using `ImageIO.read(new File("ImageFolder/image.png"));` which works fine when I run the program in Eclipse, but if I export to a runnable JAR, I get the following exception in the stacktrace: 

```
javax.imageio.IIOException: Can't read input file!                                                              
        at javax.imageio.ImageIO.read(Unknown Source) 

```

Here is a screenshot of my project in Eclipse:

[![enter image description here](https://i.stack.imgur.com/303cn.png)](https://i.stack.imgur.com/303cn.png)

How can I include the `cardImages` folder in my JAR so that `new File("cardImages/10C.png")` can be read?

Answer: 
Use [`DateTime()`](http://php.net/manual/en/class.datetime.php) to compare dates to each other. It's cleaner and easier to read as DateTime obejcts are comparable.

I used `DateTime::createFromFormat` since the dates you have from the API aren't going to be in a standard format for PHP and this makes it easier for PHp to handle.

```
$date = \DateTime::createFromFormat('my', $month.$year);
$now  = new \DateTime('midnight');
if ($date > $now) { 
    echo "not expired"; 
} else { 
    echo "expired"; 
}

```
@Praveen George i hope you want to do it like below try this with date():

```
<?php
$searchingDate = '05-17'; // your variable which contain month and year
if($searchingDate == date("m-y")){ // date("m-y") return current month and year in format like('05-17) if both are equal then it match 
    echo "match";
}
else{
    echo "did not match";
} 

```