Search Results

Search found 2322 results on 93 pages for 'jar'.

Page 21/93 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • eclipse mtj - proguard : obfuscate third party jar error

    - by robinmag
    i use proguard (support in mtj plugin) to obfuscate a project that has some third party jars but i gives me errors: Your input classes appear to be inconsistent. You may need to recompile them and try again. Alternatively, you may have to specify the options '-dontskipnonpubliclibraryclasses' and/or '-dontskipnonpubliclibraryclassmembers'. It seems that proguard use the classes in JavaSE. It only happens with projects that use third party jars :( Thank you in advanced!

    Read the article

  • Batch and the for loop

    - by Farid
    Hi everyone, I have a java application launched by a .cmd file. I want to set the classpath of the application through this batch, all the needed jars are into a lib folder. Here is what I tried : set _classpath=. for %%i in (%1/lib/*.*) do ( set _classpath=%_classpath%;%%i ) Surprisingly, it seems that it does not act as expected. Let's say there is 3 jar in the lib folder : pikachu.jar sonic.jar mario.jar Here is what happens : set _classpath=. set _classpath=.;pikachu.jar set _classpath=.;sonic.jar set _classpath=.;mario.jar Obviously, what I am looking to get is set _classpath=.;pikachu.jar;sonic.jar;mario.jar Any idea ? Thanks and regards,

    Read the article

  • Running server-program from a .jar file

    - by skiwi
    I have created and am working on a server-application that monitors for specific folders and takes appropriate actions whenever files are being added. Now I come to the point where I want to be able to shutdown the program, for example for applying a patch. The server runs simply in a command prompt, how can I signal that I want to perform maintenance on it? I do not think reading System.In is feasible as I am also outputting text in the prompt. Regards.

    Read the article

  • ADF Reusable Artefacts

    - by Arda Eralp
    Primary reusable ADF Business Component: Entity Objects (EOs) View Objects (VOs) Application Modules (AMs) Framework Extensions Classes Primary reusable ADF Controller: Bounded Task Flows (BTFs) Task Flow Templates Primary reusable ADF Faces: Page Templates Skins Declarative Components Utility Classes Certain components will often be used more than once. Whether the reuse happens within the same application, or across different applications, it is often advantageous to package these reusable components into a library that can be shared between different developers, across different teams, and even across departments within an organization. In the world of Java object-oriented programming, reusing classes and objects is just standard procedure. With the introduction of the model-view-controller (MVC) architecture, applications can be further modularized into separate model, view, and controller layers. By separating the data (model and business services layers) from the presentation (view and controller layers), you ensure that changes to any one layer do not affect the integrity of the other layers. You can change business logic without having to change the UI, or redesign the web pages or front end without having to recode domain logic. Oracle ADF and JDeveloper support the MVC design pattern. When you create an application in JDeveloper, you can choose many application templates that automatically set up data model and user interface projects. Because the different MVC layers are decoupled from each other, development can proceed on different projects in parallel and with a certain amount of independence. ADF Library further extends this modularity of design by providing a convenient and practical way to create, deploy, and reuse high-level components. When you first design your application, you design it with component reusability in mind. If you created components that can be reused, you can package them into JAR files and add them to a reusable component repository. If you need a component, you may look into the repository for those components and then add them into your project or application. For example, you can create an application module for a domain and package it to be used as the data model project in several different applications. Or, if your application will be consuming components, you may be able to load a page template component from a repository of ADF Library JARs to create common look and feel pages. Then you can put your page flow together by stringing together several task flow components pulled from the library. An ADF Library JAR contains ADF components and does not, and cannot, contain other JARs. It should not be confused with the JDeveloper library, Java EE library, or Oracle WebLogic shared library. Reusable Component Description Data Control Any data control can be packaged into an ADF Library JAR. Some of the data controls supported by Oracle ADF include application modules, Enterprise JavaBeans, web services, URL services, JavaBeans, and placeholder data controls. Application Module When you are using ADF Business Components and you generate an application module, an associated application module data control is also generated. When you package an application module data control, you also package up the ADF Business Components associated with that application module. The relevant entity objects, view objects, and associations will be a part of the ADF Library JAR and available for reuse. Business Components Business components are the entity objects, view objects, and associations used in the ADF Business Components data model project. You can package business components by themselves or together with an application module. Task Flows & Task Flow Templates Task flows can be packaged into an ADF Library JAR for reuse. If you drop a bounded task flow that uses page fragments, JDeveloper adds a region to the page and binds it to the dropped task flow. ADF bounded task flows built using pages can be dropped onto pages. The drop will create a link to call the bounded task flow. A task flow call activity and control flow will automatically be added to the task flow, with the view activity referencing the page. If there is more than one existing task flow with a view activity referencing the page, it will prompt you to select the one to automatically add a task flow call activity and control flow. If an ADF task flow template was created in the same project as the task flow, the ADF task flow template will be included in the ADF Library JAR and will be reusable. Page Templates You can package a page template and its artifacts into an ADF Library JAR. If the template uses image files and they are included in a directory within your project, these files will also be available for the template during reuse. Declarative Components You can create declarative components and package them for reuse. The tag libraries associated with the component will be included and loaded into the consuming project. You can also package up projects that have several different reusable components if you expect that more than one component will be consumed. For example, you can create a project that has both an application module and a bounded task flow. When this ADF Library JAR file is consumed, the application will have both the application module and the task flow available for use. You can package multiple components into one JAR file, or you can package a single component into a JAR file. Oracle ADF and JDeveloper give you the option and flexibility to create reusable components that best suit you and your organization. You create a reusable component by using JDeveloper to package and deploy the project that contains the components into a ADF Library JAR file. You use the components by adding that JAR to the consuming project. At design time, the JAR is added to the consuming project's class path and so is available for reuse. At runtime, the reused component runs from the JAR file by reference.

    Read the article

  • How to deploy jar artifacts directly from a maven repository to appserver specific directories

    - by Joshua
    I have JDBC driver dependencies (e.g. h2, mysql ..) which have to be copied under ${jboss.home}/common/lib before it is used by my EAR application. What would be the best way to directly copy from a maven repository into the above location instead of doing a manual copy. I would not prefer to store copies of the drivers as part of my SVN. Note: I currently specify this as a maven dependency and copy this artifact from the local repository, not sure if this is the best way to do solve this.

    Read the article

  • how to import other schema jars when using the scomp tool

    - by MikeJiang
    there is a huge amount of xml schemas for the business, some of them are common types like Money.xsd, Address.xsd, etc, while others are business specific like Customer.xsd, ShippingOrder.xsd, etc. So I decide to compile these schemas into 2 jars, one is commonbeans.jar, the other is businessbeans.jar. I've separated them into different folders. to build the commonbeans.jar is simple, just run "scomp -out commonbeans.jar ....\common*.xsd"; while run "scomp -out businessbeans.jar ....\business*.xsd" is a different story, there are errors say can't find those common types, and run "scomp -out businessbeans.jar ....\business*.xsd ....\business*.xsd" will blindly duplicate all the common types into the businessbeans.jar. so is there any way to link the commonbeans.jar when compile those busimess schemas, maybe something like "scomp -out businessbeans.jar ....\business*.xsd commonbeans.jar". I hope my poor english has expressed my issue!

    Read the article

  • Want to make jar,war,ear files using apache ANT and use hudson for automated build process [closed]

    - by user1314506
    I want to make build.xml for following all task and i want to set up jenkins or Hudson for Continuous Integration How should i make build file using apache Ant and how to build all projects using single build file? mkdir MyProjectsjar Compile following project and create jar file javaproject1 package1 javafile1 javafile2 javaproject2 package1 javafiles package2 javafiles javaproject3 package1 javafiles javaproject4 package1 javaproject5 package1 javafiles package2 javafiles javaproject6 package1 javaproject7 package1 javafiles javaproject8 package1 javafiles javaproject9 package1 javafiles package2 javafiles javaproject10 package1 javafiles package2 javafiles javaproject11 package1 javafiles package2 javafiles javaproject12 package1 javafiles package2 javafiles javaproject13 package1 javafiles package2 javafiles javaproject14 package1 javafiles package2 javafiles javaproject15 package1 javafiles package2 javafiles javaproject16 package1 javafiles package2 javafiles javaproject17 package1 javafiles package2 javafiles Copy the above jar files into the folder created in step 1 Compile EJB projects and Create EAR project Compile web projects and other all project and create WAR files copy EAR and WAR files to jboss/default/deploy folder.

    Read the article

  • ConnectJDBCDataStoreHelper Jar File

    - by adisembiring
    Hi ... I'm trying to create mysql datasource in websphere. I have setup the data source and test the data source from the admin console. I used ConnectJDBCDataStoreHelper as datasource helper. Now, I'm trying to access the datasource from desktop application using Hibernate. I've set the JNDI URL, ContextFactory and etc. And I have reference was 7 library in my project. While I try to run, there are some error occurred. com.ibm.websphere.rsadapter.ConnectJDBCDataStoreHelper not found.

    Read the article

  • Adding a Jar to ext and using it in Eclipse

    - by Bob Breznak
    I am providing a client with a lab station image for a school program. There is a library that I'd like to directly add to the JRE so that students can use the library without needing to fiddle with adding the classpath. As this is a basic after school program, the goal is to just get students into programming with as little overhead additions as possible. At this point, I have the lib put into the jre/lib/ext and Eclipse is able to find it, however it will not allow access to any of the classes. I see it in the JRE System Library and the classes and packages are showing up there but when I go to use it, I am getting an "Access restriction" error. When I remove the JRE System Library then add it back in, everything works swimmingly. The library is accessible exactly as intended. Any ideas on how to resolve this?

    Read the article

  • Ant and Flex-4 problem, MXMLC.jar not found !

    - by Ali
    Hi all, I updated a flex application from flex 3.5 to flex 4.0. We are using ant for compiling our project and we have a mxmlc task to handle the flex part. After the upgrade, our mxmlc task broke. Here is the task definition: <taskdef resource="flexTasks.tasks"> <classpath> <pathelement path="${FLEX_HOME}/ant/lib/flexTasks.jar"/> <pathelement path="${FLEX_HOME}/lib/flexTasks.jar"/> <fileset dir="${FLEX_HOME}/lib"> <include name="**/*.jar"/> </fileset> </classpath> </taskdef> And here is mxmlc task <mxmlc file="${src}/Main.mxml" output="${build}/main.swf" debug="true" target-player="10" services="../src/main/webapp/WEB-INF/flex/services-config.xml" context-root="/" > <compiler.library-path dir="${lib}"> <include name="*.swc"/> </compiler.library-path> <compiler.library-path dir="${FLEX_HOME}/frameworks/libs"> <include name="*.swc"/> </compiler.library-path> <compiler.library-path dir="${FLEX_HOME}/frameworks/libs/player/10.0"> <include name="*.swc"/> </compiler.library-path> <compiler.library-path dir="${FLEX_HOME}/frameworks/locale"> <include name="**/*"/> </compiler.library-path> </mxmlc> And we are getting: The class not found in jar file: mxmlc.jar I checked the ${FLEX_HOME}/lib folder and I can see the mxmlc.jar file there. I appreciate your comments for resolving this matter, Thanks, -A

    Read the article

  • JAR files, don't they just bloat and slow Java down?

    - by Josamoto
    Okay, the question might seem dumb, but I'm asking it anyways. After struggling for hours to get a Spring + BlazeDS project up and running, I discovered that I was having problems with my project as a result of not including the right dependencies for Spring etc. There were .jars missing from my WEB-INF/lib folder, yes, silly me. After a while, I managed to get all the .jar files where they belong, and it comes at a whopping 12.5MB at that, and there's more than 30 of them! Which concerns me, but it probably and hopefully shouldn't be concerned. How does Java operate in terms of these JAR files, they do take up quite a bit of hard drive space, taking into account that it's compressed and compiled source code. So that can really quickly populate a lot of RAM and in an instant. My questions are: Does Java load an entire .jar file into memory when say for instance a class in that .jar is instantiated? What about stuff that's in the .jar that never gets used. Do .jars get cached somehow, for optimized application performance? When a single .jar is loaded, I understand that the thing sits in memory and is available across multiple HTTP requests (i.e. for the lifetime of the server instance running), unlike PHP where objects are created on the fly with each request, is this assumption correct? When using Spring, I'm thinking, I had to include all those fiddly .jars, wouldn't I just be better off just using native Java, with say at least and ORM solution like Hibernate? So far, Spring just took extra time configuring, extra hard drive space, extra memory, cpu consumption, so I'm concerned that the framework is going to cost too much application performance just to get for example, IoC implemented with my BlazeDS server. There still has to come ORM, a unit testing framework and bits and pieces here and there. It's just so easy to bloat up a project quickly and irresponsibly easily. Where do I draw the line?

    Read the article

  • Checking for corrupt war file after mvn install

    - by Tauren
    Is there a maven command that will verify that a WAR file is valid and not corrupt? Or is there some other program or technique to validate zip files? I'm on Ubuntu 9.10, so a linux solution is preferred. On occasion, I end up with a corrupt WAR file after doing mvn clean and mvn install on my project. If I extract the WAR file to my hard drive, an error occurs and the file doesn't get extracted. I believe this happens when my system is in a low-memory condition, because this tends to happen only when lots of memory is in use. After rebooting, doing a mvn install always gives a valid WAR file. Because this happens infrequently, I don't typically test the file by uncompressing it. I transfer the 50MB war file to my server and then restart Jetty with it as the root webapp. But when the file is corrupt, I get a java.util.zip.ZipException: invalid block type error. So I'm looking for a quick way to validate the file as soon as mvn install is completed. Is there a maven command to do this? Any other ideas?

    Read the article

  • How do I read the manifest file for a webapp running in apache tomcat?

    - by Nik Reiman
    I have a webapp which contains a manifest file, in which I write the current version of my application during an ant build task. The manifest file is created correctly, but when I try to read it in during runtime, I get some strange side-effects. My code for reading in the manifest is something like this: InputStream manifestStream = Thread.currentThread() .getContextClassLoader() .getResourceAsStream("META-INFFFF/MANIFEST.MF"); try { Manifest manifest = new Manifest(manifestStream); Attributes attributes = manifest.getMainAttributes(); String impVersion = attributes.getValue("Implementation-Version"); mVersionString = impVersion; } catch(IOException ex) { logger.warn("Error while reading version: " + ex.getMessage()); } When I attach eclipse to tomcat, I see that the above code works, but it seems to get a different manifest file than the one I expected, which I can tell because the ant version and build timestamp are both different. Then, I put "META-INFFFF" in there, and the above code still works! This means that I'm reading some other manifest, not mine. I also tried this.getClass().getClassLoader().getResourceAsStream(...) But the result was the same. What's the proper way to read the manifest file from inside of a webapp running in tomcat? Edit: Thanks for the suggestions so far. Also, I should note that I am running tomcat standalone; I launch it from the command line, and then attach to the running instance in Eclipse's debugger. That shouldn't make a difference, should it?

    Read the article

  • Java library for parsing command-line parameters?

    - by Mnementh
    I write a little command-line-application in Java. This application should work with a mix of parameters and commands, similar to svn. Examples app url command1 app url command2 --parameter2 -x app url command1 --param-with-argument argument app --parameter url command1 app --no-url command2 app --help Wanted Exists an easy-to-use library for Java Supports parsing of such command-lines (Bonus) Automatically creates an appropriate help

    Read the article

  • Read / Write XML file from Java application bundle

    - by Peter
    Hi there! I've got an XML file that is parsed and written in my application. From within my IDE (Eclipse) I simply address it like this: Reading: private String xmlFile = "file.xml"; and then I build the document: doc = sax.build(xmlFile); Writing is done like this: writer = new FileWriter("file.xml"); Runs great so far, but after bundling my application, the file is no longer accessible. What exactly do I have to do to make it accessible from within an application bundle? I'm absolutely not familiar with the classpath or whatever I need for that, so please go easy on me! Thank you very much!

    Read the article

  • How do I add jars needed to compile a maven project if they were never built with a pom?

    - by JasonH
    I'm just starting with maven, coming from years of working with Ant. I'm trying a basic task now, building a simple project that requires some libraries from a vendor. I have the jars in src\main\resources\VENDORNAME. When I run mvn compile it fails on compilation saying the libraries don't exist. I can't seem to add these as dependencies because I don't know their version number and as they are proprietary I can't find them in ibiblio or elsewhere. Without these Jars I can't compile my classes. Is there a way to use jars that didn't follow Maven's convention? I might not understand maven correctly, so any guidance is welcome. Much appreciated for any responses.

    Read the article

  • Different lib directories of JBpss

    - by Serafeim
    There is a number of different lib directories JBoss (5.1.0) uses: I can find jboss/lib, jboss/lib/endorsed, jboss/common/lib, jboss/server/default/lib and of course the jboss/server/default/deploy/myapp/WEB-INF/lib (am I missing something ?). From the above, I know that I need to use the last one (WEB-INF/lib) to put any jars my app needs. What about all the others ? What is their use and what should I put there ? Why put it there and not in the WEB-INF/lib ? Thanks !

    Read the article

  • How to build your non-gui Java program into a console program.

    - by Robert
    I dont know how to describe it well, but i will try. Ok, i want to be able to build my java program so that when it opens, it will look and work exactly as it does in the console. So it reads the Scanner class and prints normally, and does everything it would do if it was in the console. Ive looked around for this and havent found anything. I can make a gui java program fairly easily, but i would rather have a terminal, console like program, that works exactly as the java console, thanks.

    Read the article

  • debate: Is adding third party libraries to a war a good idea?

    - by Master Chief
    We have a debate going on . a. The "standard" way of assembling a web app. Create a WAR with all our app artifacts and all other components like hibernate and memcached etc are deployed in the tomcat/shared/lib area. b. Create a humongous war with everything included and nothing in tomcat/shared/lib. Pros for a - It keeps things modular and the war is small. Cons for a - dependency on shared/lib has to be managed especially by the deployment process. Pros for b - All dependencies are controlled by the build process removing any room for error. Cons for b - War is really, really big. If you are deploying over a network to a huge farm, then it might have an impact. want to see what thoughts others might have about this.

    Read the article

  • ANT: ways to include libraries and license issues

    - by Eric Tobias
    I have been trying to use Ant to compile and ready a project for distribution. I have encountered several problems along the way that I have been finally able to solve but the solution leaves me very unsatisfied. First, let me explain the set-up of the project and its dependencies. I have a project, lets call it Primary which depends on a couple of libraries such as the fantastic Guava. It also depends on another project of mine, lets call it Secondary. The Secondary project also features some dependencies, for example, JDOM2. I have referenced the Jar I build with Ant in Primary. Let me give you the interesting bits of the build.xml so you can get a picture of what I am doing: <project name="Primary" default="all" basedir="."> <property name='build' location='dist' /> <property name='application.version' value='1.0'/> <property name='application.name' value='Primary'/> <property name='distribution' value='${application.name}-${application.version}'/> <path id='compile.classpath'> <fileset dir='libs'> <include name='*.jar'/> </fileset> </path> <target name='compile' description='Compile source files.'> <javac includeantruntime="false" srcdir="src" destdir="bin"> <classpath refid='compile.classpath'/> </javac> <target> <target name='jar' description='Create a jar file for distribution.' depends="compile"> <jar destfile='${build}/${distribution}.jar'> <fileset dir="bin"/> <zipgroupfileset dir="libs" includes="*.jar"/> </jar> </target> The Secodnary project's build.xml is nearly identical except that it features a manifest as it needs to run: <target name='jar' description='Create a jar file for distribution.' depends="compile"> <jar destfile='${dist}/${distribution}.jar' basedir="${build}" > <fileset dir="${build}"/> <zipgroupfileset dir="libs" includes="*.jar"/> <manifest> <attribute name="Main-Class" value="lu.tudor.ssi.kiss.climate.ClimateChange"/> </manifest> </jar> </target> After I got it working, trying for many hours to not include that dependencies as class files but as Jars, I don't have the time or insight to go back and try to figure out what I did wrong. Furthermore, I believe that including these libraries as class files is bad practice as it could give rise to licensing issues while not packaging them and merely including them in a directory along the build Jar would most probably not (And if it would you could choose not to distribute them yourself). I think my inability to correctly assemble the class path, I always received NoClassDefFoundError for classes or libraries in the Primary project when launching Second's Jar, is that I am not very experienced with Ant. Would I require to specify a class path for both projects? Specifying the class path as . should have allowed me to simply add all dependencies to the same folder as Secondary's Jar, should it not?

    Read the article

  • How to parameterize a path in ANT?

    - by strelokstrelok
    I have the following defined in a file called build-dependencies.xml <?xml version="1.0" encoding="UTF-8"?> <project name="build-dependencies"> ... <path id="common-jars"> <fileset file="artifacts/project-1/jar/some*.jar" /> <fileset file="artifacts/project-2/jar/someother*.jar" /> </path> ... </project> I include it at the top of my build.xml file. Now I need to make the artifacts folder a parameter so it can be changed during execution of different targets. Having this... <?xml version="1.0" encoding="UTF-8"?> <project name="build-dependencies"> ... <path id="common-jars"> <fileset file="${artifacts}/project-1/jar/some*.jar" /> <fileset file="${artifacts}/project-2/jar/someother*.jar" /> </path> ... </project> ...and defining an "artifacts" property (and changing it) in the target does not work because it seems that the property substitution happens when the path is defined in build-dependencies.xml How can I solve this? One way I was thinking was to have a parameterized macro and call that before the path is actually used, but that seems not elegant. Something like this: <macrodef name="create-common-jars"> <attribute name="artifacts"/> <sequential> <path id="common-jars"> <fileset file="@{artifacts}/project-1/jar/some*.jar" /> <fileset file="@{artifacts}/project-2/jar/someother*.jar" /> </path> </sequential> </macrodef>

    Read the article

  • Maven - 'all' or 'parent' project for aggregation?

    - by disown
    For educational purposes I have set up a project layout like so (flat in order to suite eclipse better): -product | |-parent |-core |-opt |-all Parent contains an aggregate project with core, opt and all. Core implements the mandatory part of the application. Opt is an optional part. All is supposed to combine core with opt, and has these two modules listed as dependencies. I am now trying to make the following artifacts: product-core.jar product-core-src.jar product-core-with-dependencies.jar product-opt.jar product-opt-src.jar product-opt-with-dependencies.jar product-all.jar product-all-src.jar product-all-with-dependencies.jar Most of them are fairly straightforward to produce. I do have some problem with the aggregating artifacts though. I have managed to make the product-all-src.jar with a custom assembly descriptor in the 'all' module which downloads the sources for all non-transitive deps, and this works fine. This technique also allows me to make the product-all-with-dependencies.jar. I however recently found out that you can use the source:aggregate goal in the source plugin to aggregate sources of the entire aggregate project. This is also true for the javadoc plugin, which also aggregates through the usage of the parent project. So I am torn between my 'all' module approach and ditching the 'all' module and just use the 'parent' module for all aggregation. It feels unclean to have some aggregate artifacts produced in 'parent', and others produced in 'all'. Is there a way of making an 'product-all' jar in the parent project, or to aggregate javadoc in the 'all' project? Or should I just keep both? Thanks

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >