由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - where to execute java program?
相关主题
Question about Tomcatquestion about using Runtime.getRuntime.exec() in Tomcat
为何运行JAVA出现这个错误?问个run java file 的问题
about java -D option?java编译的文件能不能作成可执行文件?
Re: 有用netbeans的吗?How to filter out *.java from jar file?
如何从java中调用MatlabJava on AIX
Unix: where to execute java program?问一个java和netbeans的问题
请问mvn exec怎么把pom的jar加进去?如何在Java上跑Windows PowerShell cmdlet?
SYSDEO tomcat的问题。mac不需要下载安装JDK,那还需要建立新的executable path么?
相关话题的讨论汇总
话题: java话题: program话题: execute话题: dos话题: where
进入Java版参与讨论
1 (共1页)
t***y
发帖数: 22
1
Must java program be executed at a specific directory even after setting the
class path?
g*****g
发帖数: 34805
2
Write a batch or shell script for every java program you want to
execute, then you can deam it like a windows program
you can call it from anywhere, or by double click an icon.

【在 t***y 的大作中提到】
: Must java program be executed at a specific directory even after setting the
: class path?

m******t
发帖数: 2416
3
In fact a lot of java programs assume they are started from a certain
directory, e.g., the application installation home. So either the script or
the shortcut would need to take care of that...

the

【在 g*****g 的大作中提到】
: Write a batch or shell script for every java program you want to
: execute, then you can deam it like a windows program
: you can call it from anywhere, or by double click an icon.

d***o
发帖数: 51
4
If no relative path is given in the classpath, the start dir is not a problem.
Otherwise, for example, if you want to start Tomcat or weblogic, you have to
get into the bin or appserver folder.
A recommendation: In many cases when you start a Java program in a DOS prompt,
you would have to keep the DOS prompt. If you kill the DOS, the Java
application will also be killed. With exe4j, you can wrap the Java program in
an exe file.
http://www.ej-technologies.com

【在 m******t 的大作中提到】
: In fact a lot of java programs assume they are started from a certain
: directory, e.g., the application installation home. So either the script or
: the shortcut would need to take care of that...
:
: the

m******t
发帖数: 2416
5

classpath isn't the only problem. Some less careful program might just
open file using, say, new FileStream("foo.txt");

【在 d***o 的大作中提到】
: If no relative path is given in the classpath, the start dir is not a problem.
: Otherwise, for example, if you want to start Tomcat or weblogic, you have to
: get into the bin or appserver folder.
: A recommendation: In many cases when you start a Java program in a DOS prompt,
: you would have to keep the DOS prompt. If you kill the DOS, the Java
: application will also be killed. With exe4j, you can wrap the Java program in
: an exe file.
: http://www.ej-technologies.com

1 (共1页)
进入Java版参与讨论
相关主题
mac不需要下载安装JDK,那还需要建立新的executable path么?如何从java中调用Matlab
跪求大牛指点Java,看不懂什么意思。Unix: where to execute java program?
HTTP Status 404 The requested resource (/abc/index.jsp) is not available.请问mvn exec怎么把pom的jar加进去?
JSP How to Invoke the Specific version of Xerces-JSYSDEO tomcat的问题。
Question about Tomcatquestion about using Runtime.getRuntime.exec() in Tomcat
为何运行JAVA出现这个错误?问个run java file 的问题
about java -D option?java编译的文件能不能作成可执行文件?
Re: 有用netbeans的吗?How to filter out *.java from jar file?
相关话题的讨论汇总
话题: java话题: program话题: execute话题: dos话题: where