I would like to convert these Java functions to JavaScript: CircleFitter.java. I don't need the file reading portions though.
JSweet seems like a good option. So, I tried pasting the contents of the java file into the online JSweet sandbox, but I get these errors:
Line 58: module 'java.io' has no exported member 'FileReader'
Line 58: property 'FileReader' does not exist on type 'typeof io'
Line 58: module 'java.text' has no exported member 'DecimalFormat'
Line 58: property 'DecimalFormat' does not exist on type 'typeof text'
Line 58: module 'java.text' has no exported member 'DecimalFormatSymbols'
Line 58: property 'DecimalFormatSymbols' does not exist on type 'typeof text'
Line 58: module 'java' has no exported member 'awt'
Line 58: property 'awt' does not exist on type 'typeof java'
Line 69: property 'in' does not exist on type 'typeof System'
Line 76: property 'exit' does not exist on type 'typeof System'
Line 125: property 'exit' does not exist on type 'typeof System'
Line 128: property 'exit' does not exist on type 'typeof System'
These errors seem to fall into 2 categories:
- module __ has no exported member __
- property __ does not exist on type __
I don't use Java, so I have no idea how to get around these. I appreciate the help.