Tips on working with Java On Linux [closed] - java

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am working on Java for few years but most of the time I work on Windows OS as it is my DEV environment. Now I want to work on Java+Linux environment.
I have installed Ubuntu 12.04, installed Oracle JDK, Eclipse, Netbeans...so far good.
But I am looking for resources/websites/blogs focusing on Java Development On Linux to learn more about how resolve common issues for newbies(like me), any profiling/debugging tools for java apps, tips on log files searching, identifying how many java processes are running, killing a particular java process etc.
By googling I am able to get these details individually... want to know if any websites/blogs exclusively focusing on above mentioned areas?

The good news: Once you are running inside the JVM, Java works in a very similar way on both Windows and Linux - to some degree that is the whole point of a cross-platform language and runtime! So most of your Java experience will be entirely portable.
If you find yourself doing something Linux or Windows specific then you might want to stop and think.... is there a cross-platform way of doing this? In Java there usually is.
As a result the Linux and Windows specific things that you need to know are basically just the stuff that happens outside the JVM, e.g.:
Starting and stopping JVMs
How native libaries are handled
Non-Java-specific stuff like managing the filesystem etc.
Don't have any specific resources for you to follow up, but general Linux sites should help you with most of the above.

The things you are looking for a general purpose UNIX commands and are not specific to Java or even Linux. All the Java command are the same under Windows and Linux and if you use an IDE you don't need to worry about them
any profiling/debugging tools for java apps
Same as Windows. Use the debug button in your IDE for debugging and jvisualvm for profiling or a commercial profiler like YourKit.
tips on log files searching
Use less or grep or both. ;) You can use these in Windows using Cygwin.
identifying how many java processes are running
Use jps -lvm just like in Windows.
killing a particular java process
Use kill {pid}
want to know if any websites/blogs exclusively focusing on above mentioned areas?
I wouldn't imagine there is. Look for common UNIX commands instead.

Actually, There is a lot of tools to debugging java apps on linux.
I have a blog post listing the java related tools that I used for last several years.
http://hunmr.blogspot.com/2012/08/java-performance-tunning.html
and some handy commands:
http://hunmr.blogspot.com/2012/08/handy-commands-for-development.html

Related

Portable Runtimes? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Intro
One of the coolest things about Java is that the JRE has a very small footprint as well as being highly portable, so I can run my application on nearly any platform with ease, and without having to integrate into the operating system linked libraries or C:\Windows\System etc - that is, the JRE can be run from within a folder.
.NET struggles in this regard - especially with size. Mono is becoming an ever popular choice but there seems to be too many dependencies that the Operating System needs to have.
Question
Are their any other RUNTIMES/languages (Perl, Ruby) that have this similar functionality that I mentioned above?
Again (1) Portability (2) Multiple OS support (AIX, Solaris, Linux) (3) Size for re-distribution over a network (4) Easy to Install and Deploy.
AIM
I'm looking for a light-weight run time or language that can be deployed on a server as easily as the JRE is.
For example: If I had to use Python, that would require added libraries to be installed on OS etc. Perl would be a good example, found on most Linux but endless hassle of for version and getting a third-party library.
ANSWER!!!!
This was CLOSED because it was thought to not be RELEVANT.
But FYI for those who this may help; outside of JRE, LUA is probably the most portable not requiring dependencies and compiles or system integration.
Ruby is not quite there, although it's default on most Linux (not on BSD)
BSD comes with Lua though :)
Lastly, Jruby is not practical, as it may use the JRE (20MB) and then JRuby itself (16MB).
Some thoughts for someone considering a deploy across multifarious "OS's" and being portable enough to distribute without consuming excessive bandwidth.
Thanks
JVM and .NET are only virtual machines, that interpret bytecode. There are a lot of language on top of them.
JVM
Java
Groovy
Scala
JRuby
Jython
JavaScript (Rhino)
Clojure
etc.
.NET
C#
VB.NET
Nemerle
J#
Boo
IronRuby
IronPython
etc.
There are another VM and script languages that can be run across the platform, i.e. Parrot that is Perl 6 VM or Lua that is X-platform script language (i.e. WoW use it). There are also project like LLVM (Low Level Virtual Machine) but this is still a little bit platform dependent.

lazarus or Java [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have a Delphi background, also C++ background. But last several years, I involved in web projects, and worked primarily with PHP. Now I am looking for a platform to develop simple desktop applications (interacts with server). I was thinking of Java as I am used with Eclipse IDE, and have C++ background. But I see Lazarus became a mature environment. its applications even work on Java Virtual Machine. In the past I have seen that some Amateur looking technologies have became popular than professional ones like PHP, Flash even Object Pascal. So should I choose Java, or lazarus for desktop application development.
If you have a C++ background, try the Nokia Qt framework which has everything you want to develop desktop application. the Qt SDK is shipped with its own IDE (which's really great) and rich APIs.
Enjoy :)
Of the two options, I would certainly choose Java (larger support base, more stable, more 3rd party libraries, etc).
You mention that you come from a C++ background. Why not just use C++ (theoretically easier than picking up a new language).
If Lazarus runs on the JVM, it should have access to the same libraries as every other JVM language, so you'd be learning swing, etc.
If you are going to do desktop apps and you want a decent GUI toolkit you really have two choices as far as I know, either go with a JVM language or .net
If you go with a JVM, why in specific Lazurus? There are dozens (well technically hundreds--possibly thousands) of JVM languages to choose from. Go with anything stable that helps you get the job done.
Hmm, that is UNLESS you don't work alone. If you work with others, I suggest Java (or C#) period (Maybe Scala). Otherwise you will have a heck of a time hiring and training.
There are also probably C++ GUI frameworks, even cross-platform sometimes but none will be as rich as everything that is available on the JVM or .net platforms.

What IDE to use? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I come from Linux and Windows programming is fairly new to me. On linux, I used to use vim and the command line and everything worked fine, even for large projects. However, on windows, the command line seems a lot more cumbersome and I hear that lots of devs use IDEs. The question is, what do I use (C++ here)? What does everyone usually use? VC++? I've read about Eclipse, how is the C++ support for it? I have used Netbeans for Java and I absolutely love it, is the C++ support upto par? Also, Netbeans seems to need make for windows, which is a pain to set up, is there a good alternative?
I don't think you can get an objective answer to a question as general as this. Different people have different experiences with different IDEs, and opinions are subjective.
My best advice is to be lazy. If the tools you are used to using do a good (or even half good) job, then don't change. The real point of an IDE is to get the job done effectively. Spending lots of time evaluating, setting up, going through the learning curves, switching back and forth doesn't get the job done.
If you are moving to doing development for windows, VC++ is a very good IDE, and arguably the best for pure windows development, I perfer eclipse though, mainly so that I have a single IDE that I use no matter what platform I'm on (Windows, Linux, and Mac).
The C++ support is execlent with the latest eclipse and CDT (C/C++ Development Tools) versions so that shouldn't be much of a problem.
I never have been that happy using Netbeans, but that is personal taste I think.
I generally use Eclipse for Java and love it, have had no problems. The intellisense is great and the automatic formatting works perfectly.
Currently I am using Visual Studio for C# and C++ but it leaves much to be desired in terms of performance, so I too am looking for a new solution there.
I thought Netbeans used Ant for build scripts, but I could be wrong. It's been a long time.
I use Visual Studio and find it's a fairly nice IDE with decent command line for build scripts, etc.
You might want to take a look at CodeBlocks. It is the IDE I used for C++ to make the transition. Worked well for me.
It depends. :-)
Are you moving to Windows "permanently", or just creating a new port? You can continue to use your old tools, if you work on several platforms.
Otherwise, VC++ is the native compiler for Windows. Obviously the one Microsoft uses for compiling Windows itself. The source code debugger is very well integrated with the rest of the IDE, and supports downloading debug info for the system binaries as well. Can be very useful.
For Java irrespective of the OS you are using, I highly recommend IDEA IntelliJ. There is also an open source "Community Edition" now which is quite cool.
i think if you used to use vim and command line in linux u'll find anything in Windows OS is so simple comparing with vim and command line so i thinkmit's so easy for u to convert to any IDE in Windows but i think it's better to use the native IDE for C++ by Microsoft itself not to use any other IDE from any another company because as i think the biggest advantage in Microsoft is its Support for its products and u can find easily tutorials and documentation easily

which is the best java gui testing tool? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking for a java gui testing tool in which tests can be created by recording my gui actions (buttons pressed, windows closed, etc.)
A scripting mechanism for writing tests is not required.
It could be free or commercial, but cheap and great is better than expensive and great.
My application is a rich-client app written in Java SE 6.
Yoav
If it's a Swing app you could take a look at Marathon.
I concur with Kettelerij, Marathon's the way to go.
It's easy to integrate into external systems like Subversion & CruiseControl, becasue all the scripts are human readable (Jython) and not locked into some proprietary format that requires an export (like most of the commercial tools).
It is able to record scripts in your choice of Jython or JRuby, which are essentially python and ruby that give you access to Java API. Very easy to understand.
For advanced testers, you are able to identify which GUI component you want to select using not just their names, but instead a a unique subset of their properties, for example
click('{Text: OK Enabled: true}')
... finds a component whose getText() is "OK" and isEnabled() is "true". This makes the scripts highly dynamic and easier to maintain.
I used Jemmy some years ago. Now I'm mostly doing webapps, so my experience in this field may be somewhat old. :-)
A scripting mechanism for writing
tests is not required.
Yes, it is. Pure capture/replay simply does not work in practice, you always have to edit the resulting scripts. And you often end up spending so much time doing that in an inadequate environment that you save no time over a pure scripting solution tailored for efficient script writing.
I have been impressed with Quick Test Pro. It is pay software from HP, but it has been able to get at some software that most tools can't work with. It has some data features so that tests can be run multiple times with varying data inputs. It is scriptable through VB so most Tester/Developer people will be able to work with it. I have been using it lately to execute tests on many machines for use in performance testing.
Try QEngine will do the record and play back. Has scripting options also
jameleon is very useful for testing web based applications. It combines a number of frameworks providing great flexability to your approach contained in a single launch framework.
There is no capture for jameleon I think you may be confusing this with selenium capture and record. Jameleon is a pure scripting framework.
You also have IBM's Rational Functional Tester:
http://www-01.ibm.com/software/awdtools/tester/functional/
I used an older version to test .NET forms applications (it also works with java apps, windows native apps, web pages). It failed a lot of times, and the integration with .NET was not so great. I don't quite recommend it for that purpose.
However, it is known to work a better with Java apps (RFT itself is made in java, and Java apps were the original target I think), specially in its most recent versions.
It's a very expensive application though. Personally I wouldn't use it again, unless I didn't have another choice.

Profiling a Java Application in Eclipse? (plug-in) [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking to find bottlenecks in my Java application in Eclipse. I'm thinking this might be useful:
http://www.eclipse.org/projects/project_summary.php?projectid=tptp.performance
Any other good plug-ins to use?
EDIT OK, it doesn't necessarily have to be an Eclipse plug-in. But it would be nice. And, I'm most interested in speed.
If you can, use jvisualvm in the Sun Java 6 JDK (IBM too). It works out of the box and can answer many of the initial questions.
Note that on Windows you need to invoke jvisualvm with the same Java binary as the program you want to investigate for best results.
(visualvm is a stand-alone subset of the Netbeans profiler)
In my experience, TPTP is something to run away from as fast as possible. It's a horribly overengineered mess, almost impossible to get to work, badly documented, and slow as molasses.
I'm not aware of any good and free profiling plugins for eclipse. But then, does it really have to be an eclipse plugin? VisualVM comes with the JDK since Java 6u7, is fast and easy to use. It may not be the most feature-rich of profilers, but has been sufficient for me.
YourKit is an excellent commercial profiler that has good Eclipse integration.
I found JProfiler (commercial) to be really helpful. It has Eclipse integration, although it is not an Eclipse plugin per sa', so you can very easily invoke a profiler instead of a regular execution session. It had very good bottleneck analysis and you can find-tune the settings to lower the overheads of the profiler itself. Highly recommended.
I've also used the Netbeans profiler which is pretty good. It's pretty easy to set it up to profile your Eclipse project while it is running in Eclipse. You don't need to open the project in Netbeans.
The Eclipse Memory Analyser has been helping me a lot recently.
If you are looking for a IBM JDK equivalent for visualvm, try the IBM Java Health Center: http://www.ibm.com/developerworks/java/jdk/tools/healthcenter/. It has some decent profiling capabilities, and is rather fast.
You can always dump call stacks (e.g. Ctrl-Break on command line). It is surprisingly very effective.

Categories

Resources