Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Java tools & IDE's > Проблема при создании jar файла


Автор: Stas123 27.4.2011, 21:51
Пытаюсь создать jar файл в eclipse 3.4.1
Делаю так. File-Export-Java-Jar file-next
отемчаю проект, никаких настроек не меняю, только имя jar файла ввожу.
(стоит галочка Export generated class files and resources, 
Compress the content of the JAR file)
Finish
Ошибка
JAR export finished with warnings. See details for additional information.
  Exported with compile warnings: Simple_GUI/src/S_GUI.java

имя проекта - Simple_GUI
имя класса - S_GUI.java
код

Код

import javax.swing.JFrame;
public class S_GUI extends JFrame
{
  public S_GUI()
  {
    setBounds(100, 100, 300, 200);
  }
  public static void main(String[] args)
  {
      S_GUI mf = new S_GUI();
    mf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    mf.setVisible(true);
  }
}



Если отметить галочками файлы classpath и project, текст ошибки становится таким - 
JAR creation failed. See details for additional information.

Resource is out of sync with the file system: '/Authorization/.project'.

Resource is out of sync with the file system: '/Authorization/.classpath'.

Exported with compile warnings: Simple_GUI/src/S_GUI.java


другие параметры создания jar тоже выдают ошибки.

Так же попробовал объявить main class при постоении jar файла.

JAR export finished with warnings. See details for additional information.

  Exported with compile warnings: Simple_GUI/src/S_GUI.java


Также пытался создать Runnable jar file.
Выбираю Launch configuration и Export destination
ANT скрипт не используется.
Ошибка
JAR export finished with warnings. See details for additional information.

Exported with compile warnings: Simple_GUI/src/S_GUI.java


 Ветки форума по построению jar файлов читал.

Подскажите ,пожалуйста, как же создать этот jar файл.
Если можно ,распишите по шагам.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)