I have problem executing the jar installer for swagger. The indications are to use
java -jar .\swagger-codegen-cli-3.0.19.jar
But I receive this kind of message
15:10:11.691 [main] DEBUG io.swagger.codegen.v3.cli.SwaggerCodegen - there are not options for command 'langs'
15:10:11.693 [main] DEBUG io.swagger.codegen.v3.cli.SwaggerCodegen - there are not options for command 'version'
I have not found what these parameter are for, or what is to be done to set them. Have you some ideas?
The latest version (3.0.22) works for me
$ java -jar swagger-codegen-cli-3.0.22.jar version
3.0.22
$ java -jar swagger-codegen-cli-3.0.22.jar langs
Available languages: [dart, aspnetcore, csharp, csharp-dotnet2, go, go-server, dynamic-html, html, html2, java, jaxrs-cxf-client, jaxrs-cxf, inflector, jaxrs-cxf-cdi, jaxrs-spec, jaxrs-jersey, jaxrs-di, jaxrs-resteasy-eap, jaxrs-resteasy, micronaut, spring, nodejs-server, openapi, openapi-yaml, kotlin-client, kotlin-server, php, python, python-flask, r, scala, scala-akka-http-server, swift3, swift4, swift5, typescript-angular, typescript-axios, typescript-fetch, javascript]
Related
I am facing the following error when I click Run from simple Hello World program of Scala. I am unable to find any solution as I am beginner in the Java field.
I am currently using IntelliJ IDEA 2021.2.3 which I am trying to integrate with Scala but to no avail.I am following this tutorial to run the Scala Program and Install all the required softwares and libraries as mentioned in this link.
https://www.guru99.com/scala-tutorial.html
Screenshot - Intellij IDEA Error for Scala Program
"C:\Program Files\Java\jdk1.8.0_144\bin\java.exe" -Xmx700m -Djava.awt.headless=true -Djava.endorsed.dirs=\"\" -Dpreload.project.path=D:/Scala-Projects -Dpreload.config.path=C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/options -Dcompile.parallel=false -Drebuild.on.dependency.change=true -Djdt.compiler.useSingleThread=true -Daether.connector.resumeDownloads=false -Dio.netty.initialSeedUniquifier=-2427656205608767245 -Dfile.encoding=windows-1252 -Duser.language=en -Duser.country=US -Didea.paths.selector=IdeaIC2021.2 -Didea.home.path=D:/Softwares/ideaIC-2021.2.3.win -Didea.config.path=C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2 -Didea.plugins.path=C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins -Djps.log.dir=C:/Users/Khalid/AppData/Local/JetBrains/IdeaIC2021.2/log/build-log -Djps.fallback.jdk.home=D:/Softwares/ideaIC-2021.2.3.win/jbr -Djps.fallback.jdk.version=11.0.12 -Dio.netty.noUnsafe=true -Djava.io.tmpdir=C:/Users/Khalid/AppData/Local/JetBrains/IdeaIC2021.2/compile-server/helloworld_14920d90/_temp_ -Djps.backward.ref.index.builder=true -Dkotlin.incremental.compilation=true -Dkotlin.incremental.compilation.js=true -Dkotlin.daemon.enabled -Dkotlin.daemon.client.alive.path=\"C:\Users\Khalid\AppData\Local\Temp\kotlin-idea-3911355212386532999-is-running\" -Dtmh.instrument.annotations=true -Dtmh.generate.line.numbers=true -Dcompile.parallel.max.threads=4 -Dcompile.parallel=true -Dscala.compile.server.socket.connect.timeout.milliseconds=10000 -Dscala.compiler.indices.rebuild=true -classpath "D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/jps-launcher.jar;C:/Program Files/Java/jdk1.8.0_144/lib/tools.jar" org.jetbrains.jps.cmdline.Launcher D:/Softwares/ideaIC-2021.2.3.win/lib/annotations.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/slf4j.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/jps-builders.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/kotlin-stdlib-jdk8.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/jps-model.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/javac2.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/forms_rt.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/maven-resolver-transport-file-1.3.3.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/util.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/protobuf-java-3.15.8.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/platform-api.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/jna-platform.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/aether-dependency-resolver.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/jps-javac-extension-1.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/jps-builders-6.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/jna.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/idea_rt.jar;D:/Softwares/ideaIC-2021.2.3.win/lib/3rd-party.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/maven-resolver-connector-basic-1.3.3.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/java/lib/maven-resolver-transport-http-1.3.3.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Kotlin/lib/kotlin-reflect.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Kotlin/lib/kotlin-plugin.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/IntelliLang/lib/java-langInjection-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/eclipse/lib/eclipse-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/eclipse/lib/eclipse-common.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/javaFX/lib/javaFX-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/javaFX/lib/javaFX-common.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/ant/lib/ant-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Groovy/lib/groovy-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Groovy/lib/groovy-constants-rt.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/uiDesigner/lib/jps/java-guiForms-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/maven/lib/maven-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/gradle-java/lib/gradle-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Kotlin/lib/jps/kotlin-jps-plugin.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Kotlin/lib/kotlin-jps-common.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/Kotlin/lib/kotlin-common.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/space/lib/space-java-jps.jar;D:/Softwares/ideaIC-2021.2.3.win/plugins/devkit/lib/devkit-jps.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/scala-library.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/compiler-shared.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/jps/nailgun.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/jps/compiler-jps.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/jps/sbt-interface.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/jps/incremental-compiler.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/jps/scala-parallel-collections.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/spray-json_2.13-1.3.5.jar;C:/Users/Khalid/AppData/Roaming/JetBrains/IdeaIC2021.2/plugins/Scala/lib/scala-compiler-indices-protocol_2.12-0.1.1.jar org.jetbrains.jps.cmdline.BuildMain 127.0.0.1 57901 33b87547-d627-4a07-bd5f-0b53060f32c9 C:/Users/Khalid/AppData/Local/JetBrains/IdeaIC2021.2/compile-server
Error: Could not find or load main class org.jetbrains.jps.cmdline.Launcher
Make sure you are correctly specified the main class in Run configuration dialog:
You can open it from the main toolbar:
When i try to run my code on Eclipse this error appears:
Usage: javaw [-options] class [args...]
(to execute a class)
or javaw [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
-hotspot is a synonym for the "server" VM [deprecated]
The default VM is server.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
i try to coment my entired code and this error still appear.
It seems you haven't set your java path correctly.
Setting Up Eclipse with Java 1.6 on Windows
How To Install and Get Started with Java Programming
Run eclipse in clean mode
Edit the eclipse.ini file located in your Eclipse install directory and insert -clean as the first line.
If this is happening to a specific project only and other projects are running fine then your default run configuration might have changed. You may try the following
- Run -> Run As -> 1 Java Application.
I fixed this issue by deleting some of my old runtime configurations. Eclipse then started automatically generating them again.
This message is also posted on grails mailing list.
In addition to my earlier question I downloaded the grails source from github.
Building via documented gradlew install works (almost) perfect. Than I imported the whole project into Eclipse. And with a bit fighting groovy plugins and "project - workspace-groovy-compiler-issues" I only have a few issues left, all boiling down to java Collection modification in groovy classes. For instance in PluginBuildSettings.groovy:
List<Resource> artefactResourcesList = []
...
artefactResources.addAll compileScopePluginInfo.artefactResources
which gives an error:
Groovy:[Static type checking] - Cannot call java.util.List#addAll(java.util.Collection ) with arguments [java.util.Set ]
I really don't see what the issue may be.
I tried changing the artefactResources declaration in PluginScopeInfo from:
Set<Resource> artefactResources = []
to:
Set<Object> artefactResources = []
which takes away error above, but introduces some other problems let alone the unittests. I'm not hindered with extensive groovy knowledge but it looks all perfect valid to me.
I'm using ggts:
Groovy/Grails Tool Suite
Version: 3.1.0.RELEASE
Build Id: 201210061306
groovy-compiler: 2.0.4.xx -20120921
On mac os x 8.2
java 6.0._37
groovy compiler: 2.0 (workspace and project).
With my favorite search engine I found a reference to grails bug 5516, which is solved but it looks resurected
Type checker fails verification of generic types with addAll
Fixed in 2.0 rc 3,
Hi allI've found XTend (http://xtend-lang.org) and it really sounds great! But, I can't see any standalone command line compiler for this language. It seems only to run under eclipse. I've done some research, and found some people saying, that it has a command line compiler, but I can't find a download link.
Does the compiler exist, standalone, or do you need eclipse to use it?
Regards
It is not documented, but there is indeed a command line compiler in the Xtend code base - the same one used by the Maven plug-in (that is documented in the Xtend homepage).
If Maven plug-in does not work for you, then you could download the standalone jar version directly from the Maven repository at http://build.eclipse.org/common/xtend/maven/org/eclipse/xtend/org.eclipse.xtend.standalone/2.3.1/ (for version 2.3.1), and execute the org.eclipse.xtend.core.compiler.batch.Main class from it.
This class executes the xtend compiler, and usage information can be displayed (also readable from the source file).
You can use the xtend standalone compiler. For my case I copied the following .jar files to a folder named xtendc:
com.google.guava_21.0.0.v20170206-1425.jar
com.google.inject_3.0.0.v201312141243.jar
javax.inject_1.0.0.v20091030.jar
org.antlr.runtime_3.2.0.v201101311130.jar
org.apache.log4j_1.2.15.v201012070815.jar
org.eclipse.emf.common_2.15.0.v20180914-1817.jar
org.eclipse.emf.ecore.xmi_2.15.0.v20180706-1146.jar
org.eclipse.emf.ecore_2.16.0.v20181124-0637.jar
org.eclipse.equinox.common_3.10.200.v20181021-1645.jar
org.eclipse.jdt.core_3.16.0.v20181130-1748.jar
org.eclipse.xtend.core_2.16.0.v20181203-1347.jar
org.eclipse.xtend.lib.macro_2.16.0.v20181203-0507.jar
org.eclipse.xtext.common.types_2.16.0.v20181203-0528.jar
org.eclipse.xtext.util_2.16.0.v20181203-0514.jar
org.eclipse.xtext.xbase.lib_2.16.0.v20181203-0507.jar
org.eclipse.xtext.xbase_2.16.0.v20181203-0528.jar
org.eclipse.xtext_2.16.0.v20181203-0514.jar
org.objectweb.asm_7.0.0.v20181030-2244.jar
And then, in that folder I executed the CLI main class of the batch compiler:
java -cp "*" org.eclipse.xtend.core.compiler.batch.Main -d <path-to-xtend-gen-folder> -useCurrentClassLoader <path-to-src-folder>
CLI usage of main class is documented to be as following:
Usage: Main <options> <source directories>
where possible options include:
-d <directory> Specify where to place generated xtend files
-tp <path> Temp directory to hold generated stubs and classes
-cp <path> Specify where to find user class files
-encoding <encoding> Specify character encoding used by source files
-javaSourceVersion <version> Create Java Source compatible to this version. Can be: 1.5, 1.6, 1.7, 1.8, 9, 10
-noSuppressWarningsAnnotation Don't put #SuppressWarnings() into generated Java Code
-generateGeneratedAnnotation Put #Generated into generated Java Code
-includeDateInGeneratedAnnnotation If -generateGeneratedAnnotation is used, add the current date/time.
-generateAnnotationComment <string> If -generateGeneratedAnnotation is used, add a comment.
-useCurrentClassLoader Use current classloader as parent classloader
-writeTraceFiles Write Trace-Files
so you will need to pass your classpath there.
I am trying to launch an application using sbt's application launcher.
This application is defined as:
#!/bin/sh
java -jar /home/salil.wadnerkar/.conscript/sbt-launch.jar #"/home/salil.wadnerkar/.conscript/n8han/conscript/cs/launchconfig" "$#"
However, when I launch it, it gives me this error:
$ ~/bin/cs n8han/giter8
Error during sbt execution: Could not find configuration file 'C:/MinGW/msys/1.0/home/salil.wadnerkar/.conscript/n8han/conscript/cs/launchconfig'. Searched:
file:/C:/MinGW/msys/1.0/home/salil.wadnerkar/
file:/C:/Users/salil.wadnerkar/
file:/C:/MinGW/msys/1.0/home/salil.wadnerkar/.conscript/
However, the file is present there. So, I think it's because of some quirk in the way sbt handles mingw file path.
Does anybody know how I can get it working?
In Cygwin I used
java -jar "`cygpath -m "$HOME/.conscript/sbt-launch.jar"`" "#file:///C:/Users/cvanvranken/.conscript/n8han/conscript/cs/launchconfig" "$#"
I expect you will be able to get yours to work with something similar, perhaps this:
java -jar /home/salil.wadnerkar/.conscript/sbt-launch.jar "#file:///C:/Users/salil.wadnerkar/.conscript/n8han/conscript/cs/launchconfig" "$#"
or
java -jar /home/salil.wadnerkar/.conscript/sbt-launch.jar "#file:///C:/MinGW/msys/1.0/home/salil.wadnerkar/.conscript/n8han/conscript/cs/launchconfig" "$#"
if those fail, you still definitely need to use the file:// protocol.
Also note the three directories it is searching in the error message
file:/C:/MinGW/msys/1.0/home/salil.wadnerkar/
file:/C:/Users/salil.wadnerkar/
file:/C:/MinGW/msys/1.0/home/salil.wadnerkar/.conscript/
no matter what you put in the launchconfig parameter, if it is not recognized then those directories are searched by default. So you could have gibberish in your parameter and still see the same exact error you are getting now.
you can set the launch config path relative to the .conscript folder -
java -jar /home/salil.wadnerkar/.conscript/sbt-launch.jar #n8han/conscript/cs/launchconfig "$#"