madhavd1/vscode-javadoc-tools

Export doesn't seem to work

JoshJames04 opened this issue · 8 comments

So I've just tried this extension for quickly generating and exporting javadoc - great, I thought!

It doens't work! The export results in this error (see image below). I'm not sure if this is me or the extension itself, any help would be greatly appricaited.

image

I also receive an error when trying to export the Javadocs on macOS, however I can't get it in any console just the following text on a popup:

Command 'Javadoc Tools: Export Javadoc' resulted in an error (Running the contributed command: 'javadoc-tools.exportJavadoc' failed.)

Hello, I had the same problem and what I did to "fix it" is this, undefined/bin/javadoc is caused because you don't have any Java specified as java.home in java settings, then it's recommended to specify java tools the target dir where the javadoc is going to be, execute it and it should give the same error you are seeing. Copy the command and open the cmd (in Ubuntu maybe is similar) and paste the command there, then just execute it and it should be working. Seems like powershell doesnt like to execute some programs

I actually looked into this further before you mentioned that @DarkRPA but forgot to post it. So you're right, powershell does not like the command because of a missing &. I'll update the forks repo tonight for you to have - https://github.com/JoshJamesLS/vscode-javadoc-tools.

The only change is in the extension.js (extension.ts on the repo). If you copy the contents of extension.ts from the fork to C:\Users[USER].vscode\extensions\madhavd1.javadoc-tools-1.4.0\out\extension.js, then it should work.

@JoshJamesLS hey man, I was wondering how do you install the fix you made into vs code? i have downloaded your file and now not exactly sure how to get that into my vs code. Any help would be much appreciated :)

@JoshJamesLS
just to be as clear as possible:

My Computer(MacOs High Sierra v10.13.6):
I installed Javadoc Tools from the extension manager in vs code

Your Repo:
Then I went to the link you provided ( https://github.com/JoshJamesLS/vscode-javadoc-tools )
In the repository i went into the src file and copied the contents from extension.ts

My Computer:
Then i went to the file where the Javadoc Tools is installed on my machine ( madhavd1.javadoc-tools-1.4.0 )
Then i went into the 'out' folder
Then i replaced the content of extension.js with the contents copied from above-mentioned extension.ts file
Then i tried to run the Javadoc Tools: Export Javadoc command

still get the same issue:
Command 'Javadoc Tools: Export Javadoc' resulted in an error (command 'javadoc-tools.exportJavadoc' not found)

@tomasi001
Sorry for the late reply, lots going on.

I should have specified in the repo, but this fix is for Windows only. The issue revolved around a missing command line character which was specifically Windows based. Unfrotunately, I do not know enough about MacOS and it's terminal differences compared to Windows - So I'm unsure what the character would be instead of the '$'. If you know what this is, let me know and I can publish a MacOS fix as well.

Sorry about this!

Hi,
I had the same problem, fixed it by adding the following to the settings.json file:

  1. "java.home": "C:/Program Files/Java/jdk-17"
  2. "javadoc-tools.generateJavadoc.isUsingPwsh": "false"
  3. "javadoc-tools.generateJavadoc.workspaceSourceFolder": "./src/"
  4. "javadoc-tools.generateJavadoc.targetFolder": "./javadoc/"

Hey, I am on a Windows PC and have the same issue with v1.5.1 (1.6 is not working because of 'invalid path'). Is here a fix?
When I run the command manually in the terminal I get
'error: package com.fasterxml.jackson.databind does not exist
import com.fasterxml.jackson.databind.JsonNode;'
for every external library I use.