开发者

Python's IDLE for Java

Question:开发者_Python百科 IS there and IDE like python's IDLE for other languages? specifically I'd like one for java, but any programing just feels so much nicer with a debug system like IDLE's.


Info:

The main feature I'm getting at is the ability to test programs. In IDLE I can have the editor for my class in one window, i save and run it then IDLE pops up. it there was anything to run, such happens. but If I'm making just the classes and not the full program it just sits there with a dumb look on it's face. I type in for example:

a = foo(%constructor params%)

and now a is an instantiation of foo and i can test any of the functions i want at will:

a.bar("function call params!")

and then foo.bar runs. it is incredibly useful for debugging. But I've only ever seen it in python. But would really like it in java, where I have to write a whole separate class in order to do anything. which is incredibly annoying.


Conclusion:

Thank you those who answered. recursive, TwentyMiles, recursive, Justin Ethier, and especially recursive... recursive... The wikipedia page is wonderful. a REPL was what I was looking for.

P.S. sorry for the lack of info, I was in a hurry and forgot. one of those moments your you have it in your head that you know what you mean, surely everyone else does...


If you are talking about a REPL (Read Eval Print Loop), or some sort of console where you can test out code without having to compile the whole project/file, BeanShell is the best I've found for Java. It isn't tightly integrated with an IDE, like IDLE, but with a language like Java it's about as good as it gets.


BlueJ is probably the closest thing available in the Java community.


I would like to add that Intellij IDEA has an interactive shell when at break points as well, it is a little calculator icon in the debug panel when at a break point. Also since Groovy is a superset of Java, you can write straight up Java in its interactive shell as well.


Jshell is integrated into the JDK download, and works like IDLE.

Just type jshell in Command Prompt.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜