jar

How to package resources, that are accessed directly , into a jar file

余生颓废 提交于 2019-12-30 10:32:35
问题 I have recently developed a game in Slick2D, i have accessed all my images directly e.g Image i = new Image("address.png"); as opposed to using a class that will load resources or using an input stream. I wondered if it would still be possible to load all the resources into a jar, i added the /res folder to my buildpath and used jarsplice to add my libraries and natives however the jar will not run because it cannot find the images. 回答1: Image i = new Image("address.png"); Is looking into the

Jasper Reports “package net.sf.jasperreports.engine does not exist” exception in JDeveloper 11.1 using WebLogic only in EAR Web Page

Deadly 提交于 2019-12-30 10:29:13
问题 I'm using JDeveloper 11.1, Oracle 11 and TIBCO JasperReports 6.0.1. I'm having problems trying to generate Jasper Reports from my web page (ViewController) while using an ApplicationModule (Model - EJB) for doing that. At the end the PDF file has to be sent via email, that's why I let it into the Model project. If I execute the ApplicationModule, it works fine, no exceptions, the PDF is very well generated and sent. However, if I execute the client method since a web page I got this exception

Java WAR - Load Spring beans from an external JAR

强颜欢笑 提交于 2019-12-30 10:05:03
问题 I would like to load inside my Spring MVC Web Application (packaged as WAR) some Spring framework beans annotated with @Service from an external jar, which is in charge of accessing a database and located in the classpath under /WEB-INF/lib. If possible, it would be desirable to load them automatically using the @Autowired annotation. I have followed successfully the solution in this link1: this.ctx = new ClassPathXmlApplicationContext("services-context.xml"); this.myAService = ctx.getBean(

Jars added to an Android library are not getting referenced in the project

不打扰是莪最后的温柔 提交于 2019-12-30 09:54:12
问题 I have created an Android library where I included some external jars. These jars are seen in "Referenced Libraries" under the library project. When I reference this library in my other project, it is not able to link the jars that had been added to library. It shows errors to the referenced library under the project. It should have linked the jars which are added in library, rather, it shows an error in the project in which I have added this library. Can anyone help me figure this out? 回答1:

executing .jar file with an argument by mouse right-click on Windows?

别等时光非礼了梦想. 提交于 2019-12-30 09:51:42
问题 I find the ChkBugReport to be very interesting: http://developer.sonymobile.com/knowledge-base/tools/analyse-your-bugreports-with-our-open-source-tool/ so I would like to use it on my Windows7 but in a simple way. In order to use the tool that is in jar, I need to type the following in the command prompt: java -jar ChkBugReport_ver.jar dumplog.txt where the dumplog.txt is the log I want to analyze by the tool. The thing is that it is quite tiresome to run cmd and then type "java -jar... blah

How to build javadoc from sources within a .jar file?

你离开我真会死。 提交于 2019-12-30 09:03:39
问题 I have to build Javadoc from myCode.jar that contains both sources and class files. Can I do it without extracting the jar? According to http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#classpath I should be able to do so this way: C:\>javadoc -d docs -classpath myCode.jar net\kem\jmx\CacheManagerMBean.java However, I get the following error: javadoc: error - File not found: "net\kem\jmx\CacheManagerMBean.java" [search path for source files: [myCode.jar]] [search path for

How to build javadoc from sources within a .jar file?

坚强是说给别人听的谎言 提交于 2019-12-30 09:01:28
问题 I have to build Javadoc from myCode.jar that contains both sources and class files. Can I do it without extracting the jar? According to http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#classpath I should be able to do so this way: C:\>javadoc -d docs -classpath myCode.jar net\kem\jmx\CacheManagerMBean.java However, I get the following error: javadoc: error - File not found: "net\kem\jmx\CacheManagerMBean.java" [search path for source files: [myCode.jar]] [search path for

Trouble integrating BouncyCastle Jar

江枫思渺然 提交于 2019-12-30 08:13:33
问题 Okay, I'll say now that I know very little about Java. I was given the Bouncy Castle Jar and told that would contain what I needed to do this assignment. The Jar file is bcprov-jdk15on-147.jar . I'm also doing this on a Unix machine maintained by my school, so I can't go in and play with all of the Java files. When I compile my class using Javac (specifically I use the command javac -classpath bcprov-jdk15on-147.jar encrypt.java ), it compiles without error, but when I go to run the program

Java : programmatically determine all of the package names loaded on the classpath

廉价感情. 提交于 2019-12-30 08:13:10
问题 Any suggestions as to how to approach how I would find out a list of package names that exist on the current classpath ? This needs to be done programmatically at run time by one of the classes loaded (and executing) on the classpath (i.e. inside out , not outside in). More details: One approach I considered was to use reflection on each of the classes loaded thus far by the class loader, and extract the package names from them. However, my application already runs into thousands of classes,

What is a classifier in SBT

回眸只為那壹抹淺笑 提交于 2019-12-30 08:10:09
问题 What is meant under the term classifiers ? Is it comes from Jars? For example in sbt-assembly plugin: artifact in (Compile, assembly) ~= { art => art.copy(`classifier` = Some("assembly")) } 回答1: classifier is defined by Maven as the fifth element of a project coordinate, after groupId , artifactId , version and packaging . More specifically (from the maven documentation, emphasis mine): The classifier allows to distinguish artifacts that were built from the same POM but differ in their