Http://blog.csdn.net/shawyeok/article/details/22406137?utm_source=tuicool
We write the program through Java and then package it for the jar package and run it with the following command
Java–jar Example.jar
Here is running on our own machine. But if you want to run the program on other machines, you need some trouble, this article to introduce this method, using the tool for exe4j, through the article at t
Today, when I write a project, I import a jar file that I wrote, and I can't find the jar file error when I debug it:08-06 21:42:10.744:e/androidruntime (2578): java.lang.RuntimeException:Unable to instantiate activity componentinfo{ Com.example.iotlife/com.example.iotlife.mainactivity}: Java.lang.ClassNotFoundExceptio
(GO) Java reads the resource file from the jar packageBlog Category:
Java
From: http://blog.csdn.net/b_h_l/article/details/7767829There is no problem when reading some resource files in code (compared to slices, music, text, etc.) and running in the integrated Environment (ECLIPSE). However, when packaged into an executable jar package (package the r
#----------------------------------------------------------------------- whileGetopts": hp:j:"opt Do Case$optinchh|HELP) usage; Exit0 ;; P|package) package_name=$OPTARG;; J|jar) jar_file=$OPTARG;; \? )Echo-E"\ Option does not exist: $OPTARG \ n"The usage; exit1 ;; Esac#---End of Case--- DoneShift$ ($OPTIND-1))if[[-Z $package _name]]; Then Echo "package_name can ' t not be empty"Usage Exitfiif[[-Z $jar
The obfuscation configuration file in the Eclipse project is copied to the as in the confusing process that prompts the following errorSolution:Delete the from -libraryjars libs/***.jar your Proguard-rules.pro file.The reason is that the Build.gradle file is configured withdependencies {Compile filetree (include: ' *.jar
receives a character type char, which returns an array of strings string[] - */ - for(inti=0; I) { the -string[] Pinyinarray = Pinyinhelper.tohanyupinyinstringarray (args[0].charat (i)); - - for(intj=0; j) { + - System.out.println (Pinyinarray[j]); + } at } - } -}Start compilingRun successfully
JAVAC-CP indicates the location of the import class in the. java file.
JAVA-CP indicate
Recently encountered a requirement: There is a master struts. xml file which needs to be introduced if struts. xml.
However, these sub-modules are put into the classpath of the main module in the form of jar packages. Of course, their struts. XML is also in the jar. Can struts of the main module be introduced in this case?
First, ask Google. The result is fea
To help a colleague to import a MAVEN project found that no POM files are present after import.
Said it was not possible to find the corresponding jar file from the server. Then after a long time to finally find the cause, summed up the following 1, the network has problems2. The jar library is not trusted3, the POM configuration version error
The probability o
Objective:Java is called "compile once, run everywhere", but there is a premise that you have to install the Java environment on the machine. This is fine for developers or some other computer-savvy person, but it can be a hassle for some people who don't understand computers, and they want things to work instead of installing additional software. We can achieve this by encapsulating the JRE with the exported jar files.method is very simple, is to con
package name of the file in Java in the projectFigure 4Paste the Java source file that you just copied into the sub-folder, as shown in 5Figure 5Now, open the Administrator command console for the system, and enter the command to start creating the folder where the Java source files are to be created.Enter the cd+ space, shown in 6Figure 6Go to the beginning to
There is no problem when reading some resource files in code (compared to slices, music, text, etc.) and running in the integrated Environment (ECLIPSE). However, when packaged into an executable jar package (package the resource files), these resource files cannot be found, as in the following code:Java code[Java]View Plaincopy
Source Code 1:
Package edu.hxraid;
Import java.io.*;
Public class Resource {
public void GetResource () throws i
1. You want to clear the target file is 32 bits or 64 bits, if the generation is 32, you will use the 32-bit JRE, if the generation is 64, you will use the 64-bit JRE.
Figure 1
Select 32bit or 64bit in the circle position. Because I want to create a 32bit, I use the default.
2.JRE configuration (not configured to report various Java_home errors):
I first create a folder called "Hj Little Helper", and then put my executable program Limitvic1.1.
the Java class file is born into an executable Java Application. There are three Java applications: a jar that executes entirely natively (such as a native GUI executable), is executed remotely on the server (for example, a browser), and in a combination of the two (for example, the client interacts locally with the remote Server)to generate a jar from a class fi
"Reproduced use, please specify the source: http://blog.csdn.net/mahoking "Scenario One: Java projects are not dependent on third-party jar packages 1. First open the project in MyEclipse, right click on the project, select "Export", 2. Select Java/jar File,next; 3. Select the resources to Export you can choos
To replace the class file under the jar package, many people may think of simply using WinRAR to open and replace the file. In general,
It is feasible, but if the jarCodeAfter obfuscation, the case is different, and the file name is the same, in bytes s
The
Before reading this article, make sure that the jar package has at least one main method entry and a graphical interface.And ensure that the main-class in the META-INF/manifest file has pointed to the main method entry previously implemented.
Recently, the hard disk broke down, so I re-installed the OS and found that the copied JDK or JRE (uninstalled version) cannot o
Please ensure that there is at least one main method entry and a graphical interface in the jar package before viewing this article.
and ensure that the Main-class in the Meta-inf/manifest file has pointed to the previously implemented Main method portal.
The hard drive has been damaged recently, so the OS was reinstalled and a copy of the JDK or JRE (not installed version) was found and cannot be opened
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.