executable-jar

referencing data files in jars

杀马特。学长 韩版系。学妹 提交于 2020-01-22 02:14:06
问题 My Java program references a lot of data files. I put them in a top level directory called data/, along with src/ and bin/. In Eclipse, references to data/ and ../data/ both seem to work. When I run it from the command line, only ../data/ works. When I put the bin/ and data/ directories in a jar and correctly set the entry point, it doesn't seem to know that I want it to access the data/ directory inside the jar. The only way I've been able to get it to work is by setting the references to ..

Do I need different version of mysql-connector for jdk 8

。_饼干妹妹 提交于 2020-01-17 08:15:08
问题 I'm using mysql-connector-java-5.1.6-bin with jdk 6 currently but I'm moving my project to jdk 8 do I need to download different version of this jar file? 回答1: If you want use JDK 8, you need the latest version of mysql connector, Connector/J 8.0 From the What's New in Connector/J 8.0? page: It is a MySQL driver for the Java 8 platform. For Java 7 or earlier, use Connector/J 5.1 instead. 回答2: You don't require Connector/J 8.0 to run on JRE 8. Connector/J 5.1 works too but 5.1 is getting much

Provide/Export executable file to client

偶尔善良 提交于 2020-01-17 02:55:09
问题 I just completed working on a client's tool, which uses Jfreechart jar, and dll and a lib file for JNI interface. Now I would like to export/ provide a executable file to client, I tried to click on java project folder and export Java>Runnable Jar file (extract required libraries into generated JAR) , a Jar file is exported with some Warnings. However, we are not able to run the file on client's machine. How can I fix this, obviously I don't want to provide complete Java project and ask

Executing batch file from runnable jar gives path not found error

☆樱花仙子☆ 提交于 2020-01-16 20:47:21
问题 I am executing a batch file from java program. When I execute from eclipse it works fine but when I make it a runnable jar it is not able to find the path of the batch file I kept the batch file as a resource in the source directory. When I print the path of the resource using Class.getResource("/resource/mybat.bat") it gives the path correctly as resources/mybat.bat (jar creation option : package required library into generated jar) file:/C:/Users/aasha.medhi/Desktop/myjar.jar!/resources

How do I put a icon on java applications?

独自空忆成欢 提交于 2020-01-16 12:02:15
问题 I have a question. I have a really cool game that I have made in eclipse. In order for people to execute it I want to convert it to a executable jar. Although I want the jar to have a icon like most .exe programs, although I don't know how to do that. What is the way that most people put icons on their java programs? I have converted it to a .exe with a icon before but I want to know if there is another way 回答1: The jar is not really an executable from the OS point of view - it is just an

Java JAR Export Images Folder Is Wrong

雨燕双飞 提交于 2020-01-16 03:52:32
问题 and thank you for reading this and any help you give me. Well...I'm using Eclipse, and I'm trying to export my project as a .jar. The problem is...I have a folder that is listed in Eclipse as a class folder in my build path that I named "res." Inside the res folder is another named "Images." When I export my .JAR, and look at the files in it, all I see is the Images folder, not the res, which messes up my image loading methods in the project. Are there any ideas on either how to get the res

maven-shade-plugin : make a jar whereas we are in war Project?

◇◆丶佛笑我妖孽 提交于 2020-01-15 12:24:05
问题 Question is in the title. I sucess to first to do a jar (project packaging jar)....then i move it before id do mvn clean to keep it elsewhere. Or i'm a in a war project so i have to rename project packaging to war then i have to do a mvn clean install I got my war. I then import the first jar to use from my war. Is there a clearer way do that with maven shade plugin to generate both war and jar. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId>

maven-shade-plugin : make a jar whereas we are in war Project?

▼魔方 西西 提交于 2020-01-15 12:22:08
问题 Question is in the title. I sucess to first to do a jar (project packaging jar)....then i move it before id do mvn clean to keep it elsewhere. Or i'm a in a war project so i have to rename project packaging to war then i have to do a mvn clean install I got my war. I then import the first jar to use from my war. Is there a clearer way do that with maven shade plugin to generate both war and jar. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId>

How do I get an Icon on a .jar file?

痞子三分冷 提交于 2020-01-15 09:45:42
问题 I have written a program in java, and I am able to execute it as a jar file. I was wondering two things. one, how would I make the .jar file have a desktop icon other than the standard java icon. and two, I am using netbeans, how would I create a .exe file instead of a .jar file? 回答1: Like Kitsune said, you can make an executable file. The Java packager I'm most familiar with is Launch4J. It's highly configurable and can be called from Ant scripts, so it can easily integrate into an existing

Maven - Executable file from a java project

十年热恋 提交于 2020-01-14 13:56:11
问题 I need to use maven (for a school project) to create an executable file from a single maven command. I've never used maven and tried many solutions here on stackoverlow. The solutions created a jar file, but the file never opened. This is my project structure src com project code swing programm interface Main.class I know this isn't maven convention, however changing it now would mean I would have to adjust the imports (as intelliJ doesn't refactor everything perfectly) for around 40 classes.