File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Working with Java in UNIX

 
Anita Hari
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am working on a Java based application which runs in a UNIX environment in an AIX machine. The procedure how I work is,

1. Create all java files, compile to class files, package them into jar files using RAD IDE in my Windows XP machine.
2. Copy the jar file from my local system to the UNIX machine using a FTP tool like WINScp.
3. Use shell script to run the java program in the UNIX machine.


So, whenever my code encounters issues, I have to repeat the same above said 3 procedures each and every time while doing unit testing. This delays the testing and rework phase.

Is there any better way to work with Java in UNIX? Please let me know.

Thanks,
Anita
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11833
181
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First up, you probably should look at the document that was auto-linked when you typed unit - it describes unit testing versus functional testing versus integration testing and more. You should be able to do all unit testing on your Microsoft Windows XP computer.

Some things to think about. They are not mutually exclusive, and any one of them might help -

Why are you using a Microsoft Windows XP computer if your deliverable requires a *nix operating system? Have you considered doing your development on a GNU/Linux system? Ubuntu is designed for people who are relatively new to setting up *nix systems - it is designed for ease of use. If you really need to be running Microsoft Windows applications, you might want to consider VirtualBox or VMWare or Parallels and have multiple operating systems running simultaneously.

As a much more lightweight option, (depending on what you are doing within your shell script), you might want to consider installing CygWin to add a lot of the GNU/*nix tools to the limited Microsoft Windows environment.

You might want to consider putting Jenkins on the server and have it run the tests automatically on the AIX system whenever you check code into source control.

You might ask the system administrators if they can export a drive as an NFS mount, which you could then mount as an NFS drive under Microsoft Windows. I would not recommend having your development environment on the exported drive, but it would make it easier to copy the binary files across. Technically speaking you could also ask them to install Samba so the AIX computer could appear as a Microsoft Windows server, or configure an Apache HTTP server to serve up WebDAV that you could then have Microsoft Windows connect to as a shared drive. Depending on your administrators the NFS mounts may be the easier option to ask for.

If you are using ant, then you can use the scp task as part of your build process to automatically copy the file across to the AIX system whenever the Jar file is created/updated. You could also use the sshexec task to run the shell script as part of the same process.
 
Pat Farrell
Rancher
Posts: 4660
5
Linux Mac OS X VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anita Hari wrote:Is there any better way to work with Java in UNIX? Please let me know.


I can't imagine developing anything without an IDE, which means running the development world on the same, or at least very similar OS. You can, if you want, install Eclipse or Netbeans on the AIX box, and use X-Windows to work on it from your evil Windows box. But I'd just put Ubuntu on my box, either a dual boot setup, or format C: and remove Windows completely. Real developers use the shell. :-)
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pat Farrell wrote:
Anita Hari wrote:Is there any better way to work with Java in UNIX? Please let me know.


I can't imagine developing anything without an IDE, which means running the development world on the same, or at least very similar OS. You can, if you want, install Eclipse or Netbeans on the AIX box, and use X-Windows to work on it from your evil Windows box. But I'd just put Ubuntu on my box, either a dual boot setup, or format C: and remove Windows completely. Real developers use the shell. :-)


Java really is (mostly) "write once, run anywhere" and I've done development on Windows for deployment on Linux and Solaris (sometimes both at once!) for a number of years. So, unless there's something nasty like native-code classes in the app, testing the app on Windows can really cut down on the copy-to-AIX work.

Until fairly recently, my data uplink was so slow that deploying a new release took over half an hour. Local testing was essential.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic