イメージをプロジェクト フォルダーに保存する必要があります。これはWebアプリケーションです。画像を保存したいフォルダの絶対パスを見つける方法がわかりません。空のフォルダーを作成してその絶対パスを取得しようとすると、Eclipse パスが取得されます。
誰でも問題を解決するのを手伝ってもらえますか?
画像を保存しようとしているコードは次のとおりです。
public void saveCustomsLabel(byte[] array, Obj1, String str) throws userException {
byte[] array2 = null;
try {
imageInByte = array;
OutputStream bos = new ByteArrayOutputStream();
InputStream bis = new ByteArrayInputStream(imageInByte);
BufferedImage bImageFromConvert = ImageIO.read(bis);
File path = new File("Templates/Images/Image.bmp")
ImageIO.write(bImageFromConvert, "bmp", path);