GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — java2python/plugin at master · jbrette/java2python

Expand file tree

/

plugin

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

plugin

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
.claude-plugin
.claude-plugin
 
 
commands
commands
 
 
scripts
scripts
 
 
skills/java2python
skills/java2python
 
 
README.md
README.md
 
 

README.md

Outline

j2p -- the java2python Claude Code plugin

Translate Java to Python from inside Claude Code, using the java2python compiler for the structure and the model for the parts that need type knowledge.

What is in it

Component Name Purpose
Skill java2python Loads when a task involves translating Java to Python. Explains how to run j2py and, more importantly, what to check in its output.
Command /j2p:translate <file> Translate a named file, directory or snippet now.
Script scripts/j2py.sh Runs the translator, finding it wherever it lives.

Install

/plugin install j2p --marketplace jbrette/java2python

From a checkout of this repository, where the repository root is itself the marketplace:

claude plugin marketplace add .
claude plugin install j2p@java2python

claude plugin validate ./plugin checks the manifest without installing anything.

Finding the translator

scripts/j2py.sh resolves j2py in this order:

  1. $J2PY_HOME, if set, which must be a java2python checkout.
  2. The checkout the plugin ships inside (plugin/ lives at its root).
  3. A j2py already on PATH.

A checkout wins over an installed j2py so that local edits to the translator are what actually run. With a checkout it prefers uv run, falling back to python3 bin/j2py when uv is not installed.

Why the model is still in the loop

j2py parses Java with an ANTLR grammar, so it gets the structure right and never hallucinates it. It tracks no types, so "n is " + i -- fine in Java -- comes out as a Python TypeError, new ArrayList<>() comes out as an undefined name, and % keeps Python's sign rules instead of Java's. The skill lists these, and the fix is a reading pass over the generated file, not a rewrite of it.

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.