Can I find java methods using man page on linux terminal? [duplicate] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is there an Java API viewer on command line?
I have been using man for C programming and ri for Ruby programming. Both of them seems very convenient for me, and now I am looking for something alike for Java API.
I apologize if this question has been raised before. I did many Google searches but no result shows up. I think I might have been using the wrong terms.

As part of the JDK, you will also receive the javap utility that allows you to see method signatures in a java .class file.
javap myClass
For java API, you can use
javap java.lang.Integer
If you are a vi fanatic, use this tweak to see the method signature on the class under cursor with the following addition to your ~/.vimrc.
let $jre='/cygdrive/c/jdk1.6.0_21/jre'
map tt yy:tabnew ^R^W^M
map + tt:set ft=java^M!!javap -public `grep .*%$ $jre/lib/classlist`^M
Characters preceeded by caret like ^M need to be typed using Ctrl+V then Ctrl+M
javap needs to be in your system path
Use your own jre location in place of this
Finally, since this is tested using cygwin, you may need to do some touch ups
Another way is to use a text-based browser. See:
Look up javadoc Help file from Vim [Unix Only]

Related

How to auto-format code in Emacs just like in Netbeans IDE [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I am new to Emacs and I would like to know if it can auto-format code for a variety of languages (Java, C++, HTML, LaTeX) just like auto-format option in NetBeans IDE.
I would also like to know
Whether this feature is built-in
Can I download an el file with this option
How to customize the preferences of auto-format (tab-length, lines between functions, braces in new line or in the same line, etc) just like in NetBeans.
(Versions: Emacs-24 on Ubuntu-12.04 / OS-X-10.9)
You would find it by yourself if you called it indent. Indeed, there are many interactive functions that start with indent. We easily find them with M-x indent TAB. But we can also find documentation with C-h ?, so if we try with C-h d RET indent RET to search in functions' documentation, or with M-x apropos RET foo RET we would also find them.
The following are built in and work with different languages (just tried with elisp, python and javascript):
M-x indent-region formats the selected region,
indent-sexp formats the current expression
There is no global option to configure the indentation, we need to dive in each mode's options. There is often options like (setq html-tab-width 4).
edit: some hints: (setq tab-width 8), (setq c-set-style "K&R"), (setq c-basic-offset 8) and with emacs' built in c-mode or GNU Indent you can switch styles: https://www.gnu.org/software/emacs/manual/html_mono/ccmode.html#Choosing-a-Style or https://www.gnu.org/software/indent/manual/indent.html#SEC4

java source parsing library for python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Ive been searching for a while and can't seem to find what im looking for. What I want to do is write a python script to report problems and enforce code standards in Java code. Everything I have found so far has been things to translate java into python or python into java and that isn't really what I want. Im looking for a python library that can parse a multi-thousand class project and present the source itself in python in such a way where I can write rules something like
every class must have class level javadoc
every class must have a #primaryContactName tag in class level javadoc
every class must have a #primaryContactEmail tag in class level javadoc
the authorized 3rd party library list is {1,2,3,4,5} are any libraries other than this
list used
all lists and maps fully type safe.
bla bla bla
I reallize that I can get a great deal of this info from javac with very little effort, and I may investigate using javac to make version work, but im looking to do something a bit more advanced where I can build in real analytics
I have done similar with XDoclet in the past, but that was primarily used to mantain metadata in the source code about what systems it was accessing and such, nothing really to this analytics level im looking for now.
Anyone come across a python library that would help out with this? I would consider other languages (java, c, etc) its simply in my current situation, python is easier to work with than anything else.

Java terminal emulator [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Does anyone knows of a library or a class that emulates the vt100 terminal (doesn't matter if graphical or not). What I want basically is a class that implements the logic of a vt100 terminal (like when receiving a "delete" code will call a delete function, or if GUI based that will delete one char).
Telnetd seems to be a complete and pretty well documented solution:
http://telnetd.sourceforge.net/
You can also try:
http://www.jcraft.com/jcterm/
It behaves like a VT100 and uses a SSH2 connection. But the website indicates the VT100 emulation is incomplete.
Have a look at the JediTerm project: https://github.com/JetBrains/jediterm
It has both graphical implementation as well as API to override.
Graphical version works for remote SSH connections(using JSch) and local pty(using Pty4J).
It is a mature project used for the embedded terminal in JetBrains products.

How Translate ByteCode to Machine Native Code [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am looking for a translator for translate Java ByteCode to Machine Native Code before execution to improve performance.
I heard that OpenOffice is made with JAVA, but I can't see any jar file in his installation folder, therefore, maybe there is a translator but I can't find it.
Does anyone know some tool or comercial product to do that?
Thanks!
There are multiple solutions. All are not ideal.
Take a look here (exe4j). To learn more read this article.
Give a look to Avian JVM. See my reply here to this question for pointers on how to embed it and what class libraries you can use to generate your stand-alone executable.
if you just need a managed language/platform, you can also use .NET/Mono AOT. See the mkbundle tool included with Mono 2.x.
Please have a look into https://www.graalvm.org/.
It could build a native image from your jar and run it as binary (native code).

What's a good Java, curses-like, library for terminal applications? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I would like to write a Java terminal application that does screen manipulation. Are there any good libraries out there that allow you to manipulate the screen like curses in the *nix/C world?
Minimal features I'm looking for are windowing and user input support.
In feature-speak, I'd like to have a region of the terminal where some data is regularly updated while (at the same time) the user can enter commands/text in some other part of the screen.
Lanterna
I found the Lanterna library recently. Haven't had the opportunity to use it yet but it looks like a more up-to-date alternative to the others.
There is Charva, which links to native code but has an api based on Swing.
The screenshots show lots of text windows, so that looks useful.
Haven't used it myself, but Java Curses Library sounds like what you want.
Here is a way to call the ncurses lib using JNI. I tested this and it works.
As of 2013, the closest I can find is Blacken.
Blacken is not a curses library per-se. It moves away from the terminal, and instead, renders it's own "console window." This has the disadvantage of not looking "console-like." Instead, you get full (arbitrary) colour support, and a curses-like API (in addition to their main API).
You can also set the font to Mono for fixed-width characters.

Categories

Resources