简体   繁体   English

如何通过命令提示符访问Java API方法?

[英]How to access Java API methods through command prompt?

Is there a way to access the Java API methods through command prompt? 是否可以通过命令提示符访问Java API方法?

like accessing the methods of String class, accessing the methods of Integer class. 就像访问String类的方法,访问Integer类的方法一样。 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. 它将用作我的参考,以便每当我在命令提示符下编写程序并可以轻松搜索API时。

thanks. 谢谢。

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. 如果您只是在寻找简单的方法来记住可用功能,那么像Eclipse这样的IDE会在您键入时自动完成可用功能,因此,如果需要的话,应该很容易找到它们。

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. 但是,对“命令提示符”的引用令人困惑...如果您需要可以从命令提示符处实际执行的语言,则需要一种具有解释器并可以导入Java API的语言。 Jython , Groovy or Scala can all do that. JythonGroovyScala都可以做到这一点。

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. 如上所述,您可以使用eclipse或Netbeans IDE,并且必须按Ctrl + space才能获得智能感知。

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. IntelliJ IDEANetBeansEclipse这样的IDE都是拥有和掌握的宝贵工具。

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. 同样,只是编程的事实,我们不时需要回到API来解决一两件事。 There's really nothing really wrong with that. 真的没有什么错。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM