私はplay frameworkと働いています。私は配備されたアプリケーションに問題があります。playapps.netは私にはローカルではありません。 はここに彼の私のコード:とlocalYイメージディレクトリを解析する
public static void image(Long idCategorieProject, Long idImage)
{
CategorieProject categorieproject = CategorieProject.findById(idCategorieProject);
List<Categorie> categories = Categorie.all().fetch();
// SMALL IMAGES
List<String>smallImages = null;
try
{
File dirSmall = new File("public/images/projects/"+idCategorieProject+"/small/");
smallImages = new ArrayList();
File[] smallImageFiles = dirSmall.listFiles();
for (int i = 0; i < smallImageFiles.length; i++) {
smallImages.add(smallImageFiles[i].getName());
}
} catch (Exception e) {
System.out.println(e);
}
// FULL IMAGE
List<String>fullImages = null;
try
{
File dirSmall = new File("public/images/projects/"+idCategorieProject+"/full/");
fullImages = new ArrayList();
File[] fullImageFiles = dirSmall.listFiles();
for (int i = 0; i < fullImageFiles.length; i++) {
if (i == idImage)
fullImages.add(fullImageFiles[i].getName());
}
} catch (Exception e) {
System.out.println(e);
}
render(lang, categorieproject, categories, fullImages, smallImages);
}
、私のイメージアレイはnullではないと私はそれらを表示することができますが、デプロイのバージョンでは、配列がnullであると思われます。イメージディレクトリを解析する別のソリューションはありますか?