Making Unix like paths work when using java program from Cygwin

Filipp Gunbin fgunbin@fastmail.fm
Fri May 18 09:56:00 GMT 2012


> Is there a way to get the equivalent of the "native" javac and java
> programs one would find on a typical Linux workstation. If not, can I
> accomplish what I want using the gcc java compiler gjc?

Even if you compile with gjc, you still need the virtual machine, which
is as far as I know not available.

But you have another option.

You can make your Java program OS-independent (as it should be) and run
it from the shell script in Cygwin using a usual Java VM for Windows.
For that, you need to fix paths in environment variables appropriately
(unix->windows) using the cygpath utility before starting java.

You can see examples of this in startup scripts of some well-established
Java projects like Tomcat, ActiveMQ or JBoss.

--
Filipp Gunbin

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list