Public class HelloWorld {
public static void Main (string[] args) {
System.out.println ("Hello World!");
}
}
#!/bin/ksh
echo "--------helloWorld------->>"
Java_home= "/usr/jdk/jdk1.6.0_34"
Java_options= "-hotspot-xms128m-xmx512m"
Class_path=.;. /lib;
Java-jar Helloworld.jar
Note:The class that runs the main method is specified in the MANIFEST.MF in the jar
Main jar Package used: Commons-io-1.3.2.jar package; Commons-fileupload-1.2.1.jar package; Commons-lang-2.3.jar, in the use of components to implement file upload should pay attention to the consistency of the front and back, note that in the background definition
Official spring-MVN deployment example, built using MavenUse MVN Eclipse: cleanMVN Eclipse: eclipse-dwtpversion = 1.0 Build. during deployment, it is found that the jar is not copied to the corresponding place. Therefore, right-click the project, properties, and deployment assembly,Add-"Java buildpath entrys select the jar package of Maven and then deploy it without errors. However, after entering the addre
Reproduced from: http://blog.sina.com.cn/s/blog_6723c88f01010965.html
about Win7 The jar file cannot be opened by double-clicking(2012-04-13 10:24:57) reprint
Tags: topics
Recently, often encountered online questioning said double hit can not open the jar file, the hint is not find main cl
1. This evening, a program was written that, based on a small spring boot site, found that using FileUtils.class.getResource (path) to get the resource files in the jar package was not successful and its path was strangefile:/users/lonecloud/documents/ideacode/git/export/target/export-0.0.1-snapshot.jar!/boot-inf/classes!/temp/ Temp.xlsAfter reviewing the data, and viewing the resource files in the jar pack
After the recent upgrade of the entire schema to spark 2.0.0, the problem was that every time a hive--service Metastore started, a small bug was always reported.
Unable to access/home/ndscbigdata/soft/spark-2.0.0/lib/spark-assembly-*.jar: There is no file or directory.
And what is going on in this line, there is no information on the Internet.
Have no way, had to step-by-step analysis, finally found
Sometimes the development of some gadgets, need to read the configuration file, but the finished jar package will often appear to find no path problem, There are two ways of thinking:
Place the file in the same directory as the jar package, such as the Config/config.properties
By my machine path,First, the D:/Signature directory is the root directory of the operation.D: The/Signature/src directory is a previously signed JAR file. Now we will use the new key forandever. Key to re-sign these jar files.D:/Signature/Dist directory is used to save the signed JAR
function: To talk about how to build a Java Project executable jar package through eclipse, and how to make the jar package into ext file through exe4j;
= "Java Project
1. Java Project build jar package
(1), "project" right key-> "Export ...", pop-up "Export Settings" window as follows:
(2), select the
The path of the configuration file cannot be obtained after the jar package is created for the project.
Today, I am working on a Java project in development. I want to read the information in the configuration file. when the project is packaged with a jar package, the configuration
The usual way to run a jar file on a Linux server is to: $ Java-jar Test.jar
The feature is that when the SSH window is closed, the program aborts. or the runtime can't cut out to perform other tasks, is there a way to get the jar running in the background:
Method One:
$ nohup Java-
In actual projects, the original large projects need to be split into small functions based on business functions, and deployed independently in the form of services. On this premise, the same code is also used to apply various projects, for convenience. It is introduced as a jar package and used as another project. In an independent JAR package, we set an independent data source
Package Java project into a jar package, if there is a resource file in the jar package needs to access, need to take the form of stream access, you can call the getResourceAsStream () method, and cannot be accessed by path (the file has been hit into the jar, Not conforming
Now the directory of my folders is in:C:\Users\linsenq\Desktop\cglibjarI want to make a jar of all the folders in this directory and the. class files in this folder.First step: Open cmd with win+r to switch directories to C:\Users\linsenq\Desktop\cglibjarStep two: Execute command: Jar CVF Spring-objenesis-repack-2.6.jar *The Spring-objenesis-repack-2.6.
Select the default program:. jar file Right-click, open-> Select default program-> Browse, select JRE under Bin file Javaw.exe.
Edit registry: Hkey_classes_rootapplicationsjavaw.exeshellopencommand, modify the data value to [D:program filesjavajdk1.6.0_ 21jrebinjavaw.exe '-jar '%1 '] (in square brackets, add –
Because of the need for development, you need to dynamically load classes based on the configuration, so simply test the Java dynamic load class Defining interfaces Package Loader;public interface Helloiface {public String hello (); Public String Sayhi ();} Implementing interfacesImplement this interface in other plug-in classes and export it as a jar, such as D:/tmp/test.jar Package Loader;public class Helloimpl implements helloiface{@Overridepublic
Introduction to Jnotiy, a jar package that supports dynamic monitoring (cascading monitoring) folders and files. In Linux, the Jnotify service is called on the Linux underlying. In Windows, you need to add the DLL file for the attachment.Because this jar file is not in the generic Maven repository, the Pom.xml
First, the jar file is an executable file that is exposed under eclipse, but this is not the file you can double-click to execute under Windows.So to say, how to put the exported jar file, run it up.1, under the Windows system:Fir
From ly83522:http://topic.csdn.net/t/20040614/17/3091277.html
Problem:
is a Keymaker.jar,
I can run it by double-clicking on another machine, just like an executable file.
But on my machine double-click is open with RAR,
Unable to run.
Solve:
If you correctly install the Java Runtime Environment (JRE), the. jar icon should be like a sheet of paper and have a shape of a, just like a WordPad icon.
If your
It's been a toss of the afternoon ~ ~, "no job jar file Set" is the meaning of the job jar is not found, and then it is not possible to find a custom mymapper class, the general reason is not set the Jar package class, that is, when configuring the job, there is no following this line of code:Job.setjarbyclass (mutidou
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.