2

Sharpen - SushiHangover

 2 years ago
source link: http://sushihangover.github.io/sharpen/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Sharpen

Sep 25th, 2016 10:44 am

I needed to convert some Java code to C# and one of the best ways that I ever found is to use Sharpen. This used to be available as a Eclipse plugin but you can find a cli version at Mono’s Github account:

One of the issues in running Sharpen is that it requires Java 1.7, NOT 1.6, nor 1.8..

So you need to have a Java 7 install. An easy way if you are already using homebrew, is available via a cask:

brew install Caskroom/versions/java7

Note: If you get errors, make sure that your casks are updated, brew upgrade brew-cask

Current JDK:

/usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home

Get a list of Install JDKs:

ls -l1 /Library/Java/JavaVirtualMachines/
1.6.0.jdk
jdk1.7.0_71.jdk
jdk1.7.0_80.jdk
jdk1.8.0_92.jdk

Export a “new home”:

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home

Now I can build and run sharpen, i.e.:

mvn clean test
mvn install
java -jar src/target/sharpencore-0.0.1-SNAPSHOT-jar-with-dependencies.jar /Users/sushi/github/PlayParser

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK