Results 1 to 3 of 3
- 01-16-2011, 05:42 PM #1
Member
- Join Date
- Jan 2011
- Posts
- 1
- Rep Power
- 0
Java command line Windows vs Linux
okay so i made a batch file on my windows xp for testing purposes when i made myself a java program
its basically a server thing that i made in javaJava Code:@echo off title Source 474 java -Xmx1200m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.08-ga-bin.jar server
now i want to host the server on my linux machine
how would i convert this DOS to linux
to be more specific, Ubuntu Server 10.10
now i installed JDK, JRE, and i have a mysql server running on my Linux
so im pretty sure i meet all the prerequisites
now im having problems with the linux shell script so far i have
and that doesnt seem to workJava Code:#!bash/bin/ java -Xmx1200m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.08-ga-bin.jar server sleep
- 01-16-2011, 05:52 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,410
- Blog Entries
- 7
- Rep Power
- 17
- 01-16-2011, 05:52 PM #3
Senior Member
- Join Date
- Mar 2010
- Posts
- 953
- Rep Power
- 4
You want
and notJava Code:#!/bin/bash
Try replacing your semicolons with colons. Also, you're probably better off putting in absolute paths (starting from the filesystem root -- "/") rather than relative paths (starting from the current directory -- "."). Once you've created your shell script, make sure you make it executable (chmod 755 <scriptname>). Then either put it into a directory that is already on your $PATH or make sure that you invoke it with an explicit path. In other words, if it's called "myscript" and it's in your current directory, you probably can't just type "myscript", as the current directory is probably not on your $PATH. Type "./myscript" instead.Java Code:[COLOR="Red"]#!bash/bin/ [/COLOR]
-Gary-
Similar Threads
-
Connecting to linux web server and performing command line operations with Java
By Jojomofoman in forum New To JavaReplies: 3Last Post: 01-11-2011, 11:45 PM -
"Could not find the main class" for Linux Command Line Compile
By tetelee in forum New To JavaReplies: 3Last Post: 08-25-2010, 10:21 AM -
Formatting java command line output - Multi line string
By dricco in forum New To JavaReplies: 2Last Post: 07-02-2010, 02:20 PM -
javac on the Windows command line--whitespace in path name?
By mslate in forum New To JavaReplies: 2Last Post: 03-31-2010, 12:26 AM -
calling linux command line in java
By fangzhong in forum New To JavaReplies: 0Last Post: 02-03-2008, 04:24 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks