LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-28-2011, 02:29 AM   #1
woodzy
Member
 
Registered: Feb 2011
Posts: 31

Rep: Reputation: 0
Java issue must be fixed please help


#1 Ubuntu-10.04-x86_64 (its a form of liunx)
#2 OS 64 bit
#3 java 1.6.0_20
#4 java 64 bit
#5 ERROR below, do you need more info? i dont know what to give for info, if u need more please tell me what to look for

craft: line1: @ECHO: command not found
craft: line2: IF: command not found
craft: line3: IF:command not found
craft: line5: PAUSE: command not found

i need it to look like this below, and load the program called "craft".jar

@ECHO OFF
IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="64" "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xms512M -Xmx512M -jar "%~dp0craft.jar"
IF /I "%PROCESSOR_ARCHITECTURE:~-2%"=="86" java -Xms512M -Xmx1000M -jar "%~dp0craft.jar"

PAUSE
 
Old 02-28-2011, 03:17 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Not a Java issue but a scripting one:
Code:
case $(uname -i 2>/dev/null) in
 X86_64)
       java -Xms512M -Xmx512M -jar /path/to/craft.jar
       ;;
   i386)
       java -Xms512M -Xmx1000M -jar /path/to/craft.jar
       ;;
     *)
       echo "Dunno what to do with value $(iname -i 2>&1), exiting."
       exit 127
       ;;
esac
 
Old 02-28-2011, 12:43 PM   #3
woodzy
Member
 
Registered: Feb 2011
Posts: 31

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by unSpawn View Post
Not a Java issue but a scripting one:
Code:
case $(uname -i 2>/dev/null) in
 X86_64)
       java -Xms512M -Xmx512M -jar /path/to/craft.jar
       ;;
   i386)
       java -Xms512M -Xmx1000M -jar /path/to/craft.jar
       ;;
     *)
       echo "Dunno what to do with value $(iname -i 2>&1), exiting."
       exit 127
       ;;
esac

so do i type all of that in?hit enter after each line? yea i just tryed that and it closed my interface....
so i tryed it as a .bat file and i got this error (edited the pater to program)
blah blah, RUN.bat: line 9:command not found, exiting.

Last edited by woodzy; 02-28-2011 at 02:59 PM.
 
Old 03-01-2011, 12:43 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by woodzy View Post
so do i type all of that in?hit enter after each line? yea i just tryed that and it closed my interface....
so i tryed it as a .bat file and i got this error (edited the pater to program)
blah blah, RUN.bat: line 9:command not found, exiting.
Code:
#!/bin/bash
JAR="/path/to/craft.jar"
case $(uname -i 2>/dev/null) in
 X86_64) java -Xms512M -Xmx512M -jar "${JAR}";;
   i386) java -Xms512M -Xmx1000M -jar "${JAR}";;
      *) echo "Dunno what to do with value $(iname -i 2>&1), exiting."; exit 127;;
esac
exit 0
0. Save the above script as it is posted here on the Ubuntu machine as "/usr/local/bin/craft.sh",
1. Locate the "craft.jar" on the Ubuntu machine and notice the full path,
2. Change the "/path/to/" in the JAR="/path/to/craft.jar" line to the full path you use for craft.jar,
3. Run 'sudo chmod 0755 /usr/local/bin/craft.sh' to make the script executable,
4. Run "/usr/local/bin/craft.sh" and see if it starts up OK.
5. If it does not start OK post the output of running "/bin/bash -vx /usr/local/bin/craft.sh 2>&1 | tee /tmp/craft.err" (see the "/tmp/craft.err" file).
 
Old 03-14-2011, 10:01 PM   #5
woodzy
Member
 
Registered: Feb 2011
Posts: 31

Original Poster
Rep: Reputation: 0
didnt work
Quote:
Originally Posted by unSpawn View Post
Code:
#!/bin/bash
JAR="/test/craft.jar"
case $(uname -i 2>/dev/null) in
 X86_64) java -Xms512M -Xmx512M -jar "${JAR}";;
   i386) java -Xms512M -Xmx1000M -jar "${JAR}";;
      *) echo "Dunno what to do with value $(iname -i 2>&1), exiting."; exit 127;;
esac
exit 0
0. Save the above script as it is posted here on the Ubuntu machine as "/usr/local/bin/craft.sh",
1. Locate the "craft.jar" on the Ubuntu machine and notice the full path,
2. Change the "/path/to/" in the JAR="/path/to/craft.jar" line to the full path you use for craft.jar,
3. Run 'sudo chmod 0755 /usr/local/bin/craft.sh' to make the script executable,
4. Run "/usr/local/bin/craft.sh" and see if it starts up OK.
5. If it does not start OK post the output of running "/bin/bash -vx /usr/local/bin/craft.sh 2>&1 | tee /tmp/craft.err" (see the "/tmp/craft.err" file).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
video resolution issue Radeon Ubuntu 10.04 fixed but... alar Ubuntu 6 11-29-2010 09:43 AM
Fixed Conky/KDE4 transparency issue Gavin Harper Slackware 1 06-19-2010 04:01 PM
interrupted dpkg can't be fixed because of filesystem location issue? oncozerov Linux - General 5 01-23-2009 07:47 AM
apache mod_rewrite security issue fixed? mastrboy Debian 1 08-03-2006 03:27 PM
UNresolved and Fixed issue thread marking abs LQ Suggestions & Feedback 8 02-13-2004 04:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration