{"id":25780,"library":"java2faas","title":"java2faas","description":"CLI tool that transpiles Java code for deployment to AWS Lambda and IBM Cloud Functions. Version 0.3.2. It converts a local Java project into deployable artifacts (with Maven support) for two cloud providers simultaneously. Differentiated by handling both Amazon and IBM from a single source, automatically generating deployment scripts. Suitable for simple Java functions on Java 8. No active development since 2019.","status":"abandoned","version":"0.3.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install java2faas","lang":"bash","label":"npm"},{"cmd":"yarn add java2faas","lang":"bash","label":"yarn"},{"cmd":"pnpm add java2faas","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM module; use import syntax. No default export.","wrong":"const java2faas = require('java2faas')","symbol":"java2faas","correct":"import { java2faas } from 'java2faas'"},{"note":"CLI functionality is in subpath export; use full path.","wrong":"import CLI from 'java2faas'","symbol":"CLI","correct":"import { CLI } from 'java2faas/cli'"},{"note":"Case-sensitive: 'Transpiler' with capital T.","wrong":"import { transPiler } from 'java2faas'","symbol":"Transpiler","correct":"import { Transpiler } from 'java2faas'"}],"quickstart":{"code":"npm i -g java2faas@0.3.2\njava2faas --path . --name myFunction --entry-file src/main/java/Hello.java --entry-method hello --aws-role arn:aws:iam::123456789012:role/lambda-role","lang":"typescript","description":"Install globally and run from terminal to transpile a Java project into deployable artifacts for AWS Lambda and IBM Cloud Functions."},"warnings":[{"fix":"Use AWS CDK or Terraform with Java runtime.","message":"Package not updated since 2019 and has low downloads; consider alternatives like CDK or Terraform for production deployments.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Ensure your code targets Java 8 bytecode.","message":"Only supports Java 8; Java 11+ features may break.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Include proper JavaBean patterns (getters, setters, no-arg constructor).","message":"Requires Request.java and Response.java to have getters/setters; otherwise compilation fails.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Double-check option spelling: --aws-role (not --awsRole).","message":"CLI options are case-sensitive and not validated; typo in --aws-role will cause silent failure.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm i -g java2faas' or use npx: 'npx java2faas ...'","cause":"Package not installed or not in PATH","error":"Error: Cannot find module 'java2faas'"},{"fix":"Verify options: --path must point to project root with src/main/java structure.","cause":"java2faas did not generate the amazon/ibm directories","error":"sh: deploy.sh: No such file or directory"},{"fix":"Ensure both classes have getter for each field, setter for each field, and a public no-argument constructor.","cause":"Request.java or Response.java missing correct getters/setters or no-arg constructor","error":"Class not found: Request/Response"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}