What do you mean by "convert"? Java source code compiles cross-platforms, and class files run cross-platform. Or are you referring to the line endings in the files?
your .class files can be moved over to your linux box and should run as is.
Never ascribe to malice that which can be adequately explained by stupidity.
albert kao
Ranch Hand
Joined: Feb 04, 2010
Posts: 224
posted
0
Ulf Dittmer wrote:What do you mean by "convert"? Java source code compiles cross-platforms, and class files run cross-platform. Or are you referring to the line endings in the files?
I am referring to the line endings in the files (java, eclipse projects, etc).
You ought to avoid using \n or \r unless you specifically want those characters. Using the %n tag after printf or format, or using println, ensure that the JVM uses the correct line end combination for the operating system. More details about %n in the Formatter class.
(I think the OP was referring to source files saved in a non-useful way.)
albert kao
Ranch Hand
Joined: Feb 04, 2010
Posts: 224
posted
0
albert kao wrote:I had developed my java programs with Spring framework, Eclipse on Windows. How to convert to linux (ubuntu)?
Do I write a script with dos2unix?
Another person told me to do this in Eclipse:
Select the project(s) and then File > Convert Line Delimiters To > Unix