delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/05/18/05:56:27

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_YG
X-Spam-Check-By: sourceware.org
Message-Id: <1337334953.24356.140661077217501.3F01724A@webmail.messagingengine.com>
From: Filipp Gunbin <fgunbin AT fastmail DOT fm>
To: himoundary <himanshu2004 AT gmail DOT com>, cygwin AT cygwin DOT com
MIME-Version: 1.0
Subject: Re: Making Unix like paths work when using java program from Cygwin
Date: Fri, 18 May 2012 13:55:53 +0400
In-Reply-To: <33869106.post@talk.nabble.com>
References: <33869106 DOT post AT talk DOT nabble DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019