Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java executable Jar File

I am trying to make an executable jar file from eclipse (using MySQL as database).

How can can I make the executable jar file?

I made one but it shows some warning and not works. I am getting a long warning list. Here is the warning:


 JAR export finished with warnings. See details for additional information.
  Exported with compile warnings: AngalTask/src/org/isf/accounting/gui/PatientBillEdit.java
  Exported with compile warnings: AngalTask/src/org/isf/accounting/gui/BillBrowser.java
  Exported with compile warnings: AngalTask/src/org/isf/admission/gui/AdmissionBrowserOld.java
  Exported with compile warnings: AngalTask/src/org/isf/admission/gui/AdmittedPatientBrowser.java
  Exported with compile warnings: AngalTask/src/org/isf/admission/gui/AdmissionBrowser.java
  Exported with compile warnings: AngalTask/src/org/isf/disease/gui/DiseaseEdit.java
  Exported with compile warnings: AngalTask/src/org/isf/disease/gui/DiseaseBrowser.java
  Exported with compile warnings: AngalTask/src/org/isf/exa/gui/ExamBrowser.java
  Exported with compile warnings: AngalTask/src/org/isf/exa/gui/ExamEdit.java
  Exported with compile warnings: AngalTask/src/org/isf/help/gui/AboutWindow.java
  Exported with compile warnings: AngalTask/src/org/isf/lab/gui/LabNew.java
  Exported with compile warnings: AngalTask/src/org/isf/lab/gui/LabBrowser.java
  Exported with compile warnings: AngalTask/src/org/isf/lab/gui/LabEditExtended.java
  Exported with compile warnings: AngalTask/src/org/isf/lab/gui/LabPrintFrame.java
  Exported with compile warnings: AngalTask/src/org/isf/lab/gui/LabEdit.java
  Exported with compile warnings: AngalTask/src/org/isf/lab/manager/Results.java
  Exported with compile warnings: AngalTask/src/org/isf/medicals/gui/MedicalBrowser.java
  Exported with compile warnings: AngalTask/src/org/isf/medicals/gui/MedicalEdit.java
  Exported with compile warnings: AngalTask/src/org/isf/medicalstock/gui/MovStockBrowser.java
  Exported with compile warnings: AngalTask/src/org/isf/medicalstock/gui/MovStockInserting.java
  Exported with compile warnings: AngalTask/src/org/isf/medicalstockward/gui/WardPharmacy.java
  Exported with compile warnings: AngalTask/src/org/isf/medicalstockward/gui/WardPharmacyEdit.java
  Exported with compile warnings: AngalTask/src/org/isf/menu/gui/UserEdit.java
  Exported with compile warnings: AngalTask/src/org/isf/menu/gui/Menu.java
  Exported with compile warnings: AngalTask/src/org/isf/menu/gui/MainMenu.java
  Exported with compile warnings: AngalTask/src/org/isf/menu/gui/Login.java
  Exported with compile warnings: AngalTask/src/org/isf/menu/gui/UserBrowsing.java
  Exported with compile warnings: AngalTask/src/org/isf/menu/gui/SubMenu.java
  Exported with compile warnings: AngalTask/src/org/isf/menu/gui/SplashWindow3.java
  Exported with compile warnings: AngalTask/src/org/isf/opd/gui/OpdEdit.java
  Exported with compile warnings: AngalTask/src/org/isf/opd/gui/OpdBrowser.java
  Exported with compile warnings: AngalTask/src/org/isf/opd/gui/OpdEditExtended.java
  Exported with compile warnings: AngalTask/src/org/isf/operation/gui/OperationEdit.java
  Exported with compile warnings: AngalTask/src/org/isf/operation/gui/OperationBrowser.java
  Exported with compile warnings: AngalTask/src/org/isf/patient/gui/PatientInsertExtended.java
  Exported with compile warnings: AngalTask/src/org/isf/patvac/gui/PatVacEdit.java
  Exported with compile warnings: AngalTask/src/org/isf/patvac/gui/PatVacBrowser.java
  Exported with compile warnings: AngalTask/src/org/isf/priceslist/gui/PricesBrowser.java
  Exported with compile warnings: AngalTask/src/org/isf/serviceprinting/print/MedicalStockSelection.java
  Exported with compile warnings: AngalTask/src/org/isf/serviceprinting/print/MedicalPrintSelection.java
  Exported with compile warnings: AngalTask/src/org/isf/stat/reportlauncher/gui/ReportLauncher.java
  Exported with compile warnings: AngalTask/src/org/isf/therapy/gui/TherapyEdit.java
  Exported with compile warnings: AngalTask/src/org/isf/therapy/gui/TherapyEntryForm.java
  Exported with compile warnings: AngalTask/src/org/isf/utils/jobjects/JAgenda.java
  Exported with compile warnings: AngalTask/src/org/isf/utils/jobjects/ShadowBorder.java
  Exported with compile warnings: AngalTask/src/org/isf/utils/jobjects/FixedFrame.java
  Exported with compile warnings: AngalTask/src/org/isf/utils/time/TimeComboBox.java
  Exported with compile warnings: AngalTask/src/org/isf/vaccine/gui/VaccineBrowser.java
  Exported with compile warnings: AngalTask/src/org/isf/vaccine/gui/VaccineEdit.java
  Exported with compile warnings: AngalTask/src/org/isf/video/gui/VideoDevicesPanel.java
like image 842
sohel14_cse_ju Avatar asked Apr 23 '12 11:04

sohel14_cse_ju


People also ask

What is difference between runnable JAR file & EXE file?

difference between jar file & Executable jar? jar file are like dead body,exe file are like living men. Jar file is the combination of compiled java classes. Executable jar file is also be combination of compiled java classes with Main class.

Where is the Java executable file?

You need to find the Java executable file (java.exe file) on your computer hard drive. It is often located in the "Program Files\Java" or "Program Files (x86)\Java" folder, within a possible subfolder below the Java folder. Once you find the file, select it and click OK.


2 Answers

"it shows some warning and not works" Keep in mind that we won't be able to help you much if you don't provide details on what error you encounter : http://imgur.com/jacoj

Eclipse may warn you that your executable jar file has been created with warnings. It just means that your classes have warnings (yellow !). It doesnt mean at all that the produced jar file won't work.

like image 156
Estragon Avatar answered Oct 31 '22 22:10

Estragon


  1. Right click on the project which you need to export as jar
  2. Select the option 'Export' from the list
  3. From the new pop up, select 'Runnable jar file'
  4. Click 'next' button
  5. In the next window give a name for your jar and the launch configuration (the class with main method)
  6. Select the appropriate option for the required libraries and click finish button
like image 2
Shamli Avatar answered Oct 31 '22 23:10

Shamli