Jars included to the project

Hi everyone...
Today I've just started to work on a project that had several developers before me. Everytime a lib file (jar) used on the project was updated, they usually just copy/paste it and added the new jar to the class path. Now the classpath is a mess, with lots of files like "sourcelib1.0.jar" "sourcelib1.1.jar" "sourcelib1.2.jar" included...
I dont know how the Java compiler solves the conflicts of different jar files with the same class and methods, but with versions different, and I would like to know, to be able to clean this mess. (I've already tried to keep the lates version based on the number displayed, but I get build error if I do that). I dont really know if these several versions of the same lib added to the project are a problem I should worry about.
Also, Is there a way of knowing which lib version I'm using, since all of then are in the classpath?
Thanks for your answers

take a look at the jar lesson of the java tutorial here http://java.sun.com/docs/books/tutorial/deployment/jar/
you'll need:
1- an entry point of your program: Main-Class: mainClassName This entry must be added to the manifest file.
See http://java.sun.com/docs/books/tutorial/deployment/jar/appman.html
2- a classpath of your program: Class-Path: jar1-name jar2-name directory-name/jar3-nameThis entry must also be added to the manifest file.
See http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html
NB: In order to manually package your program into a .jar file, you have to have the following structure:
-PROJECT_JAR_DIRECTORY/
- - -META-INF/MANIFEST.MF
- - -com/company/project/*.class
Open MS-DOS and go to the PROJECT_JAR_DIRECTORY directory then run this command:
jar cvfm MyJar.jar META-INF/MANIFEST.MF *hth

Similar Messages

  • Making jar file for the project

    Hello Everybody,
    I have a project which has hibernate capability on and also have postgresql facility in the back-end. I have used Myeclipse to make the project which imports all the necessary libraries. Now I want to make an executable jar which will run the whole project without any compilation by only clicking the jar file. And I also want to maintain the main file as I have about 30 files.
    I need urgent help.
    Tinni

    As you are new to these forums, possibly you do not know:
    DO NOT duplicated your posts:
    http://forum.java.sun.com/thread.jspa?threadID=5262912&messageID=10094981#10094981

  • Everytime need to add jxl.jar before rebuilding the project

    Hello,
    Everytime I have to add jxl.jar in the workspace before rebuilding the project as its path is lost.
    Is there any way out to resolve this problem??
    Thanks n Regards,
    Mandeep

    hi..   
    If you want to add external jar files ...
    and If your WD components are in DCs then you may simply solve the problem by creating External Library DCs and as usual, create a public part out of it and add to the dependencies of your WD DC.
    Follow the following steps  to create an External library and adding it to your dependent DC
         1)Go to File->New->Developmentcomponent
         2)In Window opened select Mycomponents and click Next
         3)In the Window opened Give Name(for example ExcelLib) for                                                external library    and select Type as External Library
         4)Click on Finish
    The  External Library  created is visible in Navigator perspective but not in WebDynpro Explorer perspective
         5)In the folder libraries of the externallibrary(ExcelLib) you paste the jar  file (jxl.jar).
         6)Right Click on the jarfile that you have added in the libraries folder of the  External Library ,go to Developcomponent -
    >add to public part
    7)In the widow opened give the some name  for puplic part and say ok 
    8)Now Right click on the ExternaleLibrary ,Goto DevelopmentComponent --->build
    After build is completed this External Library Dc can be used by other DC As
    Used WebDynpro Components ..where the jar file features ca be accessed    
    Regards
    Madhavi

  • Is plugin.jar included by the jre intall process

    Is plugin.jar included with an install of the JRE? Do I need to bundle a version plugin.jar with my browser based application?
    Is there a version in the manifest file to identity which plugin.jar
    If I have to include it each time, I would like to download it from a maven repository. Does anyone know of a maven repository that allows you to find plugin.jar based on the version of the JRE.
    If you load a plugin.jar that is not compatible with the current JRE shouldn't it raise an exception?

    Is plugin.jar included with an install of the JRE?yes
    Do I need to bundle a version plugin.jar with my browser based application?No
    Is there a version in the manifest file to identity which plugin.jarNo. Applets and Webstart application will always use latest version of plugin.jar available on the system.
    If your application has dependency on the minimum version of JRE then consider specifying this in the JNLP file for your application/applet using j2se tag.

  • Netbeans: creating a jar including jar libraries

    Hi everyone,
    I am trying to create a jar of my netbeans project which includes some other jars as libraries.
    The problem is that it compiles ok and creates the jar but unfortunately it does not include in the project .jar the libraries needed for the execution.
    Therefore when I run the program it complains with a java.lang.NoClassDefFoundError.
    Anyone can advise on how I can solve this?
    Cheers

    Read the README.TXT file that NetBeans creates in your dist folder. And please be informed that this is a forum for problems related to the Java lanuage and standard API, not for an IDE.
    There are IDE forums on nabble.com and java-forums.org
    db

  • Why doesn't Maven find jfxrt.jar, although it is included in the JDK?

    Hi,
    Why doesn't Maven find jfxrt.jar, although it is included in the JDK?
    My solution to build JavaFX apps with Maven is:
    <dependency>
                <groupId>com.oracle</groupId>
                <artifactId>javafx</artifactId>
                <version>2.2</version>
                <scope>system</scope>
                <systemPath>${java.home}/lib/jfxrt.jar</systemPath>
    </dependency>It works, but I wonder why the Maven build process can't find it automatically, as any other Java dependency, too.
    If I build without the dependency, it can't find javafx imports.
    Since Java 7 Update 6 it is included in the JDK.

    There is a long drawn-out thread on this (you don't need to read it):
    Error initializing OC4J server (JDev 10.1.3 EA1) "JDK 7u6 JavaFX integration - Is jfxrt.jar supposed to be on the classpath?"
    Short summary is that jfxrt.jar is in the jdk/jre as of 7u6, but not on the default classpath for the jdk/jre (as of 7u13).
    This will change in a future release (e.g. I believe the latest early access builds of jdk8 do have jfxrt.jar on the default runtime classpath).
    So for now, you will need to explicitly add jfxrt.jar to the classpath. There are various ways to do this, one is to use a system dependency and then use the maven ant run plugin to package your app as is done in this example: http://code.google.com/p/willow-browser/source/browse/pom.xml
    <dependency>
      <groupId>javafx</groupId>
      <artifactId>jfxrt</artifactId>
      <version>${javafx.min.version}</version>
      <scope>system</scope>
      <systemPath>${javafx.runtime.lib.jar}</systemPath>
    </dependency>
    <plugin>
      <artifactId>maven-antrun-plugin</artifactId>
      <version>1.6</version>
      <executions>
        <execution>
          <id>create-launcher-jar</id>
          <phase>package</phase>
          <goals>
            <goal>run</goal>
          </goals>
          <configuration>
            <target xmlns:fx="javafx:com.sun.javafx.tools.ant">
              <taskdef
                  uri="javafx:com.sun.javafx.tools.ant"
                  resource="com/sun/javafx/tools/ant/antlib.xml"
                  classpath="${javafx.tools.ant.jar}"/>
                <fx:application id="fxApp"
                    name="${project.name}"
                    mainClass="${exec.mainClass}"/>
                <fx:jar destfile="${project.build.directory}/${project.build.finalName}-launcher">
                  <fx:application refid="fxApp"/>
                  <fx:fileset dir="${project.build.directory}/classes"/>
                </fx:jar>
                <attachartifact
                    file="${project.build.directory}/${project.build.finalName}-launcher.jar"
                    classifier="launcher"/>
            </target>
          </configuration>
        </execution>
      </executions>
    </plugin>Another way would be to make use of the zenjava javafx maven plugin:
    http://www.zenjava.com/2012/11/24/from-zero-to-javafx-in-5-minutes/

  • I am trying to connect a Macbook Pro to a projector for a Powerpoint presentation. When I use a VGA cable, the color of the projected images are not good. When I use a USB cable, the projected image includes the presenter notes on my computer screen?

    I am trying to connect a Macbook Pro to a projector for a Powerpoint presentation. When I use a VGA cable, the color of the projected images are not good. When I use a USB cable, the projected image includes the presenter notes on my computer screen?

    To move an iPhoto Library to a new machine:
    Link the two Macs together: there are several ways to do this: Wireless Network,Firewire Target Disk Mode, Ethernet, or even just copy the Library to an external HD and then on to the new machine...
    But however you do choose to link the two machines...
    Simply copy the iPhoto Library from the Pictures Folder on the old Machine to the Pictures Folder on the new Machine.
    Then hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Choose Library'
    and select the Library that you moved.  That's it.
    This moves photos, events, albums, books, keywords, slideshows and everything else.
    Your first option didn't work because you imported one Library to another. Every version and thumbnail is imported like a distinct photo, you lose all your Albums, Keywords etc., the link between Original and Previews is destroyed, the non-destructive editing feature is ruined and so on. In summary: it's mess.
    Your second option didn't work because you simply referenced her library on the old machine.
    Regards
    TD

  • How can I get the project number to be included in my expense report query?

    ..afternoon gurus.
    As title suggests, I need to include the project number in my script for the users.
    I've everything else but I've noticed even with the project number specified in the application (in Step 3), the database table (I'd thought that it should have been in the AP_EXPENSE_REPORT_LINES_ALL.project_id but it ain't).
    Where is it located..?
    code so far..
    -- COMPLETE i-EXPENSES details of all outstanding expense claims..
    -- COMPLETE i-EXPENSES details of all outstanding expense claims..
    SELECT  DISTINCT
    erh.week_end_date "Expense Report Date",  erh.attribute_category, erh.attribute5,erh.last_updated_by,
    erl.report_line_id, erh.invoice_num, erh.creation_date, --     erh.SOURCE,
         erh.expense_last_status_date "Last Update", pap.full_name "Employee claiming..",
         erh.override_approver_name "ER Approver",erh.report_submitted_date "Submit date",
         DECODE(NVL(erh.expense_status_code, 'Not yet Submitted (NULL)'), 'CANCELLED', 'CANCELLED',
         'EMPAPPR', 'Pending Individuals Approval',      'ERROR', 'Pending System Administrator Action',
         'HOLD_PENDING_RECEIPTS     ', 'Hold Pending Receipts', 'INPROGRESS', 'In Progress', 'INVOICED', 'Ready for Payment',
         'MGRAPPR', 'Pending Payables Approval', 'MGRPAYAPPR', 'Ready for Invoicing', 'PAID', 'Paid',
         'PARPAID', 'Partially Paid',     'PAYAPPR', 'Payables Approved',     'PENDMGR', 'Pending Manager Approval',
         'PEND_HOLDS_CLEARANCE', 'Pending Payment Verification',     'REJECTED', 'Rejected',     'RESOLUTN',     'Pending Your Resolution',
         'RETURNED',     'Returned',     'SAVED',     'Saved',     'SUBMITTED',     'Submitted',     'UNUSED',     'UNUSED',
         'WITHDRAWN','Withdrawn',     'Not yet Submitted (NULL)') "Expense Status Code" ,
    fu.description "Administrator", erl.item_description, 
    -- gcc.segment1|| '.' || gcc.segment2|| '.'|| gcc.segment3|| '.'|| gcc.segment4|| '.'|| gcc.segment5 "GL code", 
    erl.amount, erl.attribute_category,  --erh.total, 
         erh.description 
         FROM
                    AP_EXPENSE_REPORT_HEADERS_all erh, AP_EXPENSE_REPORT_LINES_ALL erl,
                     per_all_people_f pap, fnd_user fu --                gl_code_combinations gcc,       
         WHERE erh.employee_id = pap.person_id
              AND fu.user_id = erh.created_by
              AND erl.report_header_id = erh.report_header_id
    --          AND erl.code_combination_id = gcc.code_combination_id          
    AND erh.invoice_num IN ('EXP74185')
         AND erh.creation_date > '04-oct-09'
         ORDER BY 3 DESC;thanks for looking...
    S

    Project_id In Ap_expense_report_lines_all Is Null In Oie.K. Is This Intended Functionality ? [ID 437559.1]
    In OIE.J and below , the project_id value was stored in AP_EXPENSE_REPORT_LINES_ALL table.
    From OIE.K an on ,the column name project_id was obsolete in ap_expense_lines_all table,
    and was added in table ap_exp_report_dists_all.

  • C++ speak the text libraries, not sure which option in the project to include

    Hi, i have downloaded all the necessary libraries to speak the text, here the link to the project libraries:
    http://www.codeproject.com/Articles/17897/audio-ostream-A-Text-to-Speech-ostream
    and they require to include them in the project settings.
    Pre-Requisites
    For the code to compile and run you will need 3 libraries:
    For the TTS engine, you will need to install the Microsoft
    Speech SDK (I used ver. 5.1).
    For COMSTL you will need the STLSoft libraries (you'll need STLSoft
    version 1.9.1 beta 44, or later).
    The Boost Iostreams library. You can download Boost here.
    Set your compiler and linker paths accordingly (Boost and STLSOft are header only).
    Not sure how to include them into the project setting ???
    Get back thanks in advance... 
    Gennady Gurin

    I have fixed it, anyway, i got new linking errors,
    : error LNK2028: unresolved token (0A000610) "extern "C" long __stdcall CoCreateInstance(struct _GUID const &,struct IUnknown *,unsigned long,struct _GUID const &,void * *)" (?CoCreateInstance@@$$J220YGJABU_GUID@@PAUIUnknown@@K0PAPAX@Z)
    referenced in function "long __cdecl stlsoft::comstl_project::co_create_instance<struct ISpVoice>(struct _GUID const &,struct ISpVoice * *,unsigned long)" (??$co_create_instance@UISpVoice@@@comstl_project@stlsoft@@$$FYAJABU_GUID@@PAPAUISpVoice@@K@Z)
    1>RemoveDigits-Text-Boxes.obj : error LNK2028: unresolved token (0A0006D6) "extern "C" void __stdcall CoUninitialize(void)" (?CoUninitialize@@$$J10YGXXZ) referenced in function "public: static void __cdecl stlsoft::comstl_project::CoInitialize_policy::uninit(void)"
    (?uninit@CoInitialize_policy@comstl_project@stlsoft@@$$FSAXXZ)
    1>RemoveDigits-Text-Boxes.obj : error LNK2028: unresolved token (0A0006D8) "extern "C" long __stdcall CoInitialize(void *)" (?CoInitialize@@$$J14YGJPAX@Z) referenced in function "public: static long __cdecl stlsoft::comstl_project::CoInitialize_policy::init(void)"
    (?init@CoInitialize_policy@comstl_project@stlsoft@@$$FSAJXZ)
    1>RemoveDigits-Text-Boxes.obj : error LNK2019: unresolved external symbol "extern "C" long __stdcall CoInitialize(void *)" (?CoInitialize@@$$J14YGJPAX@Z) referenced in function "public: static long __cdecl stlsoft::comstl_project::CoInitialize_policy::init(void)"
    (?init@CoInitialize_policy@comstl_project@stlsoft@@$$FSAJXZ)
    1>RemoveDigits-Text-Boxes.obj : error LNK2019: unresolved external symbol "extern "C" void __stdcall CoUninitialize(void)" (?CoUninitialize@@$$J10YGXXZ) referenced in function "public: static void __cdecl stlsoft::comstl_project::CoInitialize_policy::uninit(void)"
    (?uninit@CoInitialize_policy@comstl_project@stlsoft@@$$FSAXXZ)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    Not sure what to include in the linker ???
    Gennady Gurin

  • How to create a .jar file for the BPEL project

    hi all,
    how can i create a .jar file for my BPEL project, i am trying to deploy the project but getting an error :
    "Error: [Error ORABPEL-10902]: compilation failed [Description]: in "C:\OraBPELPM\integration\jdev\jdev\mywork\Workspace_BPELDemo\BPEL_Report\BPEL_Report.bpel", XML parsing failed because "". [Potential fix]: n/a. "
    and when doubel cliking on this error Jdev take me to the beginning of the ".bpel" file.
    I 'm really stuck in here i am not able to deploy the process!
    Thanks,
    Rana

    Rana:
    If you haven't already, I would post this question in the BPEL forum. I would expect a much better turnaround there.
    Johnny Lee

  • How to include an external jar file in .EAR project

    Hello All,
    I have created a web service through java class in sap netweaver 7.1.
    For database connection i want to add external jar file as reference. could you all please tell me how to do this or can i get some scenario where it is explained.
    Please Help
    Regards,
    Vanita Jain

    Hi Vanita,
    open your project in nwds > right click on the project > click on properties option from the menu > click on java build path from the left-side navigation of the window > and click on libraries in the right side tab > here you'll get a button called add external jars > clicking to this, will open browser window to select a jar file.
    Regards,
    Sen

  • A JE created from the AP Invoice does not include the project # on all trx

    A JE created from the AP Invoice does not
    include the project # for the amounts entered in the freight box. To
    duplicate, do the following:
    1. Open an AP Invoice
    2. Enter BP Code
    3. Select Service type
    4. Enter a Project Code in drop down box on Accounting tab
    5. Enter a line in the Contents; specify GL Account, amount and Tax
    Code Open Freight box
    6. Enter an amount in one of the lines
    7. Click ADD
    8. Go back to the invoice and go to the Accounting tab Click on the GL
    journal note and you can see that the line corresponding to the
    contents line has a project, but the line corresponding to the Freight
    box item does not.
    My customer users these projects when printing GL agings and the
    information is very important. Shouldn't this information be carried
    forward on all transactions on the Journal entry? Is there a way to get this information to post?

    Hi Pat,
    the project code (PC) on the marketing document may only be applied to the business partner (BP), hence the only row in the associated journal entry (JE) with this project code is that of the BP.
    You can link project codes to specific accounts (CoA -> select account -> account details -> project code) & this project code will then be assigned every time the account is found in a JE.
    If you require the project code to be applied to the freight, you may assign this project code to the account you have defined for this freight. The drawback is naturally that the project code will then  be pulled every time this freight is used, regardless of whether or not the PC is associated with the BP or not.
    It is possible to manually assign project codes to every row in a journal entry, hence this should also be possible with SDK. You might explore the possibility whether it might be possible to automatically assign the BP PC to all rows in the JE using a script.
    All the best,
    Kerstin

  • Static initialization of java code included in the Imported Archives jars?

    Hi
    Does SAP PI 7.0 support static initialization of java code included in the Imported Archives jars?
    Static block of a java class included in the Imported Archive jars throws a Runtime Exception called ExceptionInInitializationError while trying to run.
    Regards,
    RDS

    Have you tested the code outside PI?

  • How to Include order creation business process in the project.

    Hi,
    I have created Implementation Project in Project Administration. Now I want to Include order creation business process in the project.
    Can anybody guide me how to incude order creation business process in the project. & which T-codes I need to use.
    Many Thanks
    Praveen K

    Hi Praveen,
    It is S User ID and password you can get the sam in ur company .
    The SAP material can't be shared in that way &  pls follow the rules
    https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement
    Do not ask to send you an email.
    The question you ask and the solution to it is often also interesting for other users of the community. If you ask somebody to send you the answer per email, you deprive others of also learning to know the answer. Therefore any requests for sending material or answers to an email address will be modified by the forum moderators.
    In addition, do not use an email address as a user name.  These will be removed as well.  Email addresses can be added to a Business Card or wiki profile.  Their usage in the forums is inappropriate unless we are referring to [email protected]
    Edited by: Prakhar Saxena on Oct 15, 2009 12:38 PM

  • List the projects in sbconfig.jar.

    Hi,
    I have a need to list the contents of an OSB sbconfig.jar using WLST script or any api. Can someone help here.
    While using the console, we have an option to check/uncheck the projects contained in sbconfig.jar and import only the required ones. Likewise while deploying using script, i need to know what are the contents of the jar file so that i can chose those and then deploy.
    Thanks,
    Vijay.

    Hi Vijay,
    sbconfig.jar it's a regular jar file, work as any zip file, you can list it's contents in java or other api capable of read zip files...
    Check this...
    http://www.java2s.com/Code/Java/File-Input-Output/Listfilesinajarfile.htm
    Cheers,
    Vlad

Maybe you are looking for

  • Mi iphone wont sync with my mac but my mac will update my iphone

    I have tried to sync my iphone with my Mac Book and anything that I put in my calendar on phone does not show up on the Mac. Any info I puy on my Mac does show up on my iphone. What am I doing wrong?

  • Document Centre - is it possible to set treeview to automatically collapse?

    Hi there, My question is fairly simple.  I have created a Document Centre and enabled the Treeview option.  By default, it appears that all the folders are expanded.  How can I change that so they are collapsed by default?

  • Linux remote debug - can't load jdwp helper lib

    Running RedHat 7.1 and jetty web server with jdk 1.3.1_09(?) (and ultimately trying to do a remote debug from a Windows Eclipse machine). Running jetty with cmd line args: -Xmx256m -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=80

  • Object dba_registry does  not exist

    Hi, We are performing Preparation Phase for Oracle 9i upgrade. In check for invalid database objects section, when I ran SQL> select comp_id, version, status from dba_registry; got message "object dba_registry does not exist" I am not sure this is is

  • How to use WS-Security?

    Where can I find the security info about a WebService, so I can invoke the service with conforming to the security demand, in WSDL, WSDD or other place? What's the standard way? Thanks.