1
votes

Is there a way to access the Java API methods through command prompt?

like accessing the methods of String class, accessing the methods of Integer class. etc etc.

this will serve as my references so that whenever I write a program in command prompt and can easily search up for the API.

thanks.

3
Do you mean like an interactive console? If so can you not use an editor? Java programs still need to be compiled and executed. - emt14
Java isn't interpreted, unless I'm misunderstanding what you're trying to accomplish here. - Makoto
can you explain how you are able to write program in command prompt ? - vels4j
would be a cool task for you too: write an interactive console java program that can search and find through the java API, but why do you write "a program in command prompt"? - burna

3 Answers

0
votes

If you're just looking for easy ways to remember the available functions, an IDE like Eclipse will autocomplete the available functions as you type, so it should be easy to find them if that's what you want.

However, the reference to the 'command prompt' is confusing... If you need language you can actually execute from the command prompt, you will need a language that has an interpreter and can import the Java APIs. Jython, Groovy or Scala can all do that.

0
votes

The short answer is NO! there is no way to that. As explained above, you can use eclipse or Netbeans IDE and you have to press Ctrl+space to get the intellisense.

0
votes

It seems that you're looking for an easier way to program. IDEs, such as IntelliJ IDEA, NetBeans, or Eclipse would be invaluable tools to have and master.

Also, it's just a fact of programming that, every now and then, we have to go back to the API for a thing or two. There's really nothing really wrong with that.