在Eclipse中为JAR运行“Export”时使用的shell命令是什么?

时间:2015-10-25 02:50:18

标签: java eclipse shell maven jar

我想从命令行将我的eclipse项目导出为JAR,但只通过带有File的Eclipse UI完成此操作 - >出口 - > Java - > JAR。

1 个答案:

答案 0 :(得分:2)

Java JDK提供// Get content of json url let jsonString = try NSString.init(contentsOfURL: url!, encoding: NSUTF8StringEncoding) // Create JSON Dictionary from data var jsonResult = NSJSONSerialization.JSONObjectWithData(jsonString.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)!, options: NSJSONReadingOptions.MutableContainers, error: &err) as NSDictionary //Create instance for base model representation let responseModel = Json4Swift_Base(dictionary: jsonResult) //print name print(responseModel!.name) //Get the collection2 from result let collection2 = responseModel?.results!.collection2 //Get the first object from collection 2 let firstObject = collection2?.first //Print the event and hesta print(firstObject?.event?.text) print(firstObject?.hasta) 命令:https://docs.oracle.com/javase/8/docs/technotes/tools/unix/jar.html

对于更精细的用途,建议您考虑使用Apache Ant或Maven: