**有没有办法将类文件转换为exe文件? 假设我创建了一个java桌面应用程序并希望转换为exe **
答案 0 :(得分:-1)
这是不可能的,但是如果您使用带有以下脚本的Windows,则可以创建@echo off
java myProgram
文件:
In [38]: var = '{"section_1":{"setion_id":1,"status":"false"},"section_2":{"setion_id":2,"status":"false"},"section_3":{"setion_id":3,"status":"false"},"section_4":{"setion_id":4,"status":"false"}}'
In [39]: json_file = json.loads(var) #converting string into json object
In [40]: temp_dic = dict(json_file) #converting json object into python dictionary
In [41]: temp_dic.update({'section_1':{'section_id':1,'status': 'true'}}) #update dictionary accoding to your need
In [42]: output_json = json.loads(json.dumps(temp_dic)) #converting dictionary into python string
In [43]: output_json
Out[43]:
{u'section_1': {u'section_id': 1, u'status': u'true'},
u'section_2': {u'setion_id': 2, u'status': u'false'},
u'section_3': {u'setion_id': 3, u'status': u'false'},
u'section_4': {u'setion_id': 4, u'status': u'false'}}
最终,用户仍然需要安装JVM。