Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bird8693/java2v

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java2V licence vlang patreon

Java2V Transpiler (J2V) provides the ability to transpile Java source into human-readable V that can be compiled using V's C, or Javascript backends. A subset of the Java Class Library (See docs) is also implemented for use.

Example

Input:

public static void main(String[] args) {
	File file = new File("data.txt");
	System.out.println("File name: " + file.getName());

	List<String> content = Files.readAllLines(file.toPath());
  	for (String line : content) {
		System.out.println(line);
  	}
}

Output:

fn main() {
	mut file := io.file("data.txt")
	println("File name: " + file.get_name())

	mut content := nio.read_all_lines(file.to_path())
	for mut line in content {
		println(line)
	}
}

Repo Structure

There are two modules in this repository.

  • jcl/ - Classes from the Java Class Library reimplemented in V.
  • src/ - Main transpiler source.

About

A Java to V translator/transpiler.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 80.7%
  • V 19.3%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.