本文介绍了将整个Java项目移植到C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种将整个Java项目转换为C#的免费方式。我遵循本教程有点过时了。

I'm looking for a free way to convert entire Java projects to C#. I followed Pauldb's article on using Sharpen in eclipse. The tutorial is a bit outdated.

使用Luna on Windows我收到以下错误:

While using Luna on Windows I got the following errors:

尝试更新我的环境工作后,我得到

After trying to update the references to work on my enviroment I get

...\run-sharpen.xml:59: The following error occurred while executing this line:
...\run-sharpen.xml:20: exec returned: 13

其中日志文件说java.lang.RuntimeException:Applicationsharpen.core。应用程序在注册表中找不到。

In which the log file says "java.lang.RuntimeException: Application "sharpen.core.application" could not be found in the registry."

推荐答案

步骤1:下载eclipse Mars我正在使用4.5.0)

Step 1: Download eclipse Mars (I'm using 4.5.0)

步骤2:打开Eclipse。导入您的项目,并使用一个src /文件夹为所有的java文件。

Step 2: Open Eclipse. Import your project and use a src/ folder for all your java files.

步骤3:添加文件sharpen.properties,sharpen-all-options,run-sharpen.xml和header.txt到项目文件夹的根目录。编辑sharpen.properties以适应您的环境。在run-sharpen.xml中,注释这些行,因为它们是依赖关系的示例:

Step 3: Add the files "sharpen.properties", "sharpen-all-options", "run-sharpen.xml" and "header.txt" to the root of the project folder. Edit sharpen.properties to fit your enviroment. In run-sharpen.xml, comment out these lines as they are examples for dependencies:

<arg value="-cp" />
<arg path="C:/eclipse/workspace/myproject/libs/kxml2-2.3.0.jar" />
<arg value="-cp" />
<arg path="C:/eclipse/workspace/myproject/libs/regexp-me.jar" /> 

步骤4:帮助>安装新软件>查找并添加Eclipse 2.0样式插件支持和Eclipse e4工具开发人员资源(或仅搜索Eclipse测试,工具,示例和其他并添加全部)

Step 4: Help > Install new software > Find and add "Eclipse 2.0 Style Plugin Support" and "Eclipse e4 Tools Developer Resources" (or just search "Eclipse Tests, Tools, Examples, and Extras" and add all)

第5步::并将其放入你的eclipse / plugins文件夹。

Step 5:: Use ngit's sharpen.core jar file and place it into your "eclipse/plugins" folder.

步骤6:

这篇关于将整个Java项目移植到C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-19 01:41