File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes General Computing and the fly likes What about OS ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "What about OS ?" Watch "What about OS ?" New topic
Author

What about OS ?

Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 63

i don't know where to post this topic so i am posting here.
Question is: i have done my all programming in windows environment. should i change my OS to some how UNIX based ?
....


Correct Me if i am wrong
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
What prompted this question? If you feel productive on Windows, why are you considering switching? Remember that we know nothing about your circumstances.
Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 63

it is just we have shift our server from windows to linux. and we got some problem in our application. May be that was our mistake that we code like windows environment or wrong coding practice. that's i want to find.
but still we are using windows to code ? should i ?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10097
    
164

Which programming language are you working on? And what exact problem did you run into when your application was moved to *nix platform?

[My Blog] [JavaRanch Journal]
Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 63

I work on java technology.
The problem are,like :
During writing on files "-" is treated as " – " .
ResultSet Closed which is working fine on widows..
etc...

These are some programming issues. but works fine on windows.
So *nix is better solution for avoiding such mistake.?
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Might be an encoding problem. Windows and Unix use different platform default encodings, so if there's an operation somewhere where the code relies on that (by not specifying the encoding), there might be trouble.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

Neeraj Dhiman wrote:During writing on files "-" is treated as " – " .

Where did you get the dash? If someone did a copy-and-paste from a Word document, then the dash is not a dash (ASCII 0x2D) but is rather some other character. And yes such characters can cause unpredictable results. Ditto for single and double quotes. I recently corrected a number of Java sources where comments were copied from Word documents; the resulting Java sources compiled just fine under Windows but gate the OpenJDK on Linux fits.


JBoss In Action
Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 63

" - " this is coming from unicode
\u002d
Carlo Moore
Greenhorn

Joined: Aug 02, 2005
Posts: 27
Where in your code are you using the dash?

Many people develop in windows and run their code on unix.

If you copy a text file from windows to unix, from a shared folder for instance, you may get some problems.
But for packaged jars or ears I've never had a problem.


Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38765
    
  23
. . . and a dash (&#x002d; = -) is < 0x80 (=128), so it is a plain ASCII character. Even a Windows®/DOS command line can display that. There is something wrong if it displays as â€. Are you sure you are using the ASCII (\u002d) version?
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

As has already been said, this is probably an encoding issue. I'd say you should find and correct the issue, rather than switching to Unix just because of that.

If you want just to be able to test your application on Unix, you might consider VMWare Workstation or some other virtualization technology (maybe a free alternative exists). We're doing exactly that - developing on Windows, deploying onto Linux; we've got Linux in a VMWare for testing and packaging.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10360
    
    8

Martin Vajsar wrote:... you might consider VMWare Workstation or some other virtualization technology (maybe a free alternative exists).

Sure does!


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 63

hi, Sorry for late reply.
Yes now i have a Linux testing environment to test the application.

this was the encoding problem.

Thanks All. I am still on windows.

Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4655
    
    5

Linux is easy to install. It will happily live as a dual boot on a Windows box. Or take an old PC that is too slow for modern windows and install Linux on it.

Everyone should have some hands on experience with a non-Windows OS, so they will be ready when the world stops running Windows.
Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 63


It is really a good suggestion for using *nix . i have little bit experience on Linux in my college time but its not enough.
So its time to learn some think like this side by side.
its a really a valuable suggestion.

Thanks Farrell,
Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 63

I have one more Question: which "Linux" i have to install which is good with java programming ?
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4655
    
    5

Which Linux is a question that can only be answered over lots of beers and a fair amount of pizza.

A few years ago, I'd answer "Ubuntu" but I hate "unity" their GUI. So I'd recommend Linux Mint.

I run Debian on most of my Linux boxes, but Mint and Ubuntu are more user friendly.

The strongest recommendation that I can give is:

Use the distro that your buddy uses, so you can buy him/her a beer when you need help.

All other differences are minor.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38765
    
  23
If you think Unity is bad that means you have never tried Gnome3! At least with Gnome3 there are some tweaks to turn it back into a desktop. And googling, I have just found there may be ways to tweak Unity.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

Pat Farrell wrote:Use the distro that your buddy uses, so you can buy him/her a beer when you need help.

Always good advice, and the reason I always recommend the distro I use to family and friends!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What about OS ?