Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29

Thread: HowTo: extremely speed up slow Java apps by enabling them to use OpenGL

  1. #21
    Join Date
    Oct 2009
    Beans
    37

    Re: HowTo: extremely speed up slow Java apps by enabling them to use OpenGL

    You sir, are a hero!!
    Thank You.
    ThinkOrSwim runs like a charm now!

  2. #22
    Join Date
    Jun 2009
    Beans
    186

    Re: HowTo: extremely speed up slow Java apps by enabling them to use OpenGL

    I cant do this. when it try i get this:


    Could not find the main class: -Dsun.java2d.opengl=true. Program will exit.



    So has there been some updates in java which make this unavailable? This is my azureus script:

    ================================================== =

    #!/bin/sh
    2
    3 # Include java-wrappers
    4 . /usr/lib/java-wrappers/java-wrappers.sh
    5
    6 JAVA_CLASSPATH="/usr/lib/jni:/usr/lib/java"
    7 VUZE_BIN="/usr/bin/vuze"
    8
    9 find_java_runtime openjdk sunmin5
    10
    11 find_jars Azureus2 log4j-1.2 commons-cli swt
    12
    13 if [ ! -x $VUZE_BIN ]; then
    14 UI=-Dforce.ui=az2
    15 fi
    16
    17 run_java -Dazureus.install.path="$HOME/.azureus" $UI \
    18 org.gudy.azureus2.ui.common.Main "$@"

    ================================================== ================
    Last edited by fuzzylogic25; October 18th, 2010 at 09:29 AM.

  3. #23
    Join Date
    Dec 2007
    Beans
    1,042
    Distro
    Ubuntu Karmic Koala (testing)

    Re: HowTo: extremely speed up slow Java apps by enabling them to use OpenGL

    Wow, that really helps playing Minecraft. Good work!
    He that would make his own liberty secure must guard even his enemy from oppression; for if he violates this duty he establishes a precedent that will reach to himself.
    -Thomas Paine

  4. #24
    Join Date
    Feb 2010
    Location
    Cobourg
    Beans
    163

    Re: HowTo: extremely speed up slow Java apps by enabling them to use OpenGL

    Quote Originally Posted by fuzzylogic25 View Post
    I cant do this. when it try i get this:


    Could not find the main class: -Dsun.java2d.opengl=true. Program will exit.



    So has there been some updates in java which make this unavailable? This is my azureus script:

    ================================================== =

    #!/bin/sh
    2
    3 # Include java-wrappers
    4 . /usr/lib/java-wrappers/java-wrappers.sh
    5
    6 JAVA_CLASSPATH="/usr/lib/jni:/usr/lib/java"
    7 VUZE_BIN="/usr/bin/vuze"
    8
    9 find_java_runtime openjdk sunmin5
    10
    11 find_jars Azureus2 log4j-1.2 commons-cli swt
    12
    13 if [ ! -x $VUZE_BIN ]; then
    14 UI=-Dforce.ui=az2
    15 fi
    16
    17 run_java -Dazureus.install.path="$HOME/.azureus" $UI \
    18 org.gudy.azureus2.ui.common.Main "$@"

    ================================================== ================
    same issue here


  5. #25
    Join Date
    Feb 2009
    Beans
    500

    Re: HowTo: extremely speed up slow Java apps by enabling them to use OpenGL

    This worked great for me... Vuze is quite a bit more responsive now!

    Here's my Vuze startup script:
    Code:
    #!/bin/bash
    
    ######## CONFIGURATION OPTIONS ########
    SCRIPT_NOT_CHANGED=0	# change this to 1 if you don't want your script overwritten!
    JAVA_PROGRAM_DIR=""	# use full path to java bin dir, ex. "/usr/java/j2sdk1.4.2/bin/"
    #PROGRAM_DIR="/home/username/apps/azureus"	# use full path to Azureus bin dir
    JAVA_ARGS="-Xmx128m"
    
    #export MOZILLA_FIVE_HOME="/path/to/gre"	# Full path to GRE/Mozilla. When commenting out this line, also comment out the next line
    #if [ "$LD_LIBRARY_PATH x" = " x" ]; then export LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME; else export LD_LIBRARY_PATH=$MOZILLA_FIVE_HOME:$LD_LIBRARY_PATH; fi
    #######################################
    
    
    
    ######## YOU PROBABLY DO NOT WANT TO TOUCH ANYTHING BELOW! ########
    
    SCRIPT_VERSION=2
    START_CLASS="org.gudy.azureus2.ui.swt.Main"
    
    MSG_LOADING="Loading Azureus:"
    MSG_STARTING="Starting Azureus..."
    MSG2="Java exec found in "
    MSG3="OOPS, your java version is too old "
    MSG4="You need to upgrade to JRE 1.4.x or newer from http://java.sun.com"
    MSG5="Suitable java version found "
    MSG6="Configuring environment..."
    MSG7="OOPS, you don't seem to have a valid JRE "
    MSG8="OOPS, unable to locate java exec in "
    MSG9=" hierarchy"
    MSG10="Java exec not found in PATH, starting auto-search..."
    MSG11="Java exec found in PATH. Verifying..."
    MSG_AZEXIT="Exit from Azureus complete"
    MSG_TERMINATED="Azureus TERMINATED."
    MSG_RECHECK="Re-checking with GCJ (Sun Java recommended).."
    MSG_ISGCJ="Java is GCJ.. looking for Sun Java.."
    MSG_JAVABORK="Java appeared to have crashed:"
    
    SKIP_GCJ=1
    
    look_for_java()
    {
    	if command -v java &>/dev/null; then
    		if check_version ; then
    			echo $MSG11
    			return 0
    		fi
    	fi
    
    	echo $MSG10
    
    
    	JAVA_CHECK_DIRS="/usr/java/latest /usr/java /usr/lib/jvm/latest /usr/lib/jvm"
    	for JAVADIR in $JAVA_CHECK_DIRS; do
    		IFS=$'\n'
    		potential_java_dirs=(`ls -1 "$JAVADIR" | sort | tac 2>/dev/null`)
    		IFS=
    		for D in "${potential_java_dirs[@]}"; do
    			if [[ -d "$JAVADIR/$D" && -x "$JAVADIR/$D/bin/java" ]]; then
    				JAVA_PROGRAM_DIR="$JAVADIR/$D/bin/"
    				echo $MSG2 $JAVA_PROGRAM_DIR
    				if check_version ; then
    					return 0
    				else
    					return 1
    				fi
    			fi
    		done
    	done
    	
    	if [ $SKIP_GCJ ] ; then
    		echo $MSG_RECHECK
    		SKIP_GCJ=
    		if look_for_java ; then
    			return 0
    		else
    			return 1
    		fi
    	else
    		echo $MSG8 "${JAVADIR}/" $MSG9 ; echo $MSG4
    	fi
    	return 1
    }
    
    check_version()
    {
    	if [ $SKIP_GCJ ] ; then
    		JAVA_ISGCJ=`"${JAVA_PROGRAM_DIR}java" -version 2>&1 | grep "gcj"`
    		if [ ! "$JAVA_ISGCJ x" = " x" ] ; then
    			echo $MSG_ISGCJ
    			return 1
    		fi
    	fi
    
    	JAVA_HEADER=`"${JAVA_PROGRAM_DIR}java" -version 2>&1 | head -n 1`
    	JAVA_IMPL=`echo ${JAVA_HEADER} | cut -f1 -d' '`
    	if [ "$JAVA_IMPL" = "java" ] ; then
    		VERSION=`echo ${JAVA_HEADER} | sed "s/java version \"\(.*\)\"/\1/"`
    		if echo $VERSION | grep "^1.[0-3]" ; then
    			echo $MSG3 "[${JAVA_PROGRAM_DIR}java = ${VERSION}]" ; echo $MSG4
    			return 1
    		else
    			echo $MSG5 "[${JAVA_PROGRAM_DIR}java = ${VERSION}]" ; echo $MSG6
    			return 0
    		fi
    	elif [ "$JAVA_IMPL" = "#" ] ; then
    		echo $MSG_JAVABORK
    		${JAVA_PROGRAM_DIR}java -version 2>&1
    		exit 1
    	else	
    		echo $MSG7 "[${JAVA_PROGRAM_DIR}java = ${JAVA_IMPL}]" ; echo $MSG4
    		return 1
    	fi
    }
    
    runJavaOutput()
    {
    	# assume we can write to the user's home..
    
    	${JAVA_PROGRAM_DIR}java "${JAVA_ARGS}" \
    		-cp "${CLASSPATH}" \
    		-Djava.library.path="${PROGRAM_DIR}" \
    		-Dsun.java2d.opengl=true \
    		-Dazureus.install.path="${PROGRAM_DIR}" \
    		-Dazureus.script="$0" \
    		$JAVA_PROPS \
    		"$@" > ~/azScript
    	if [ -f ~/azScript ]; then
    		chmod +x ~/azScript
    		. ~/azScript
    		rm ~/azScript
    	fi
    }
    
    echo $MSG_STARTING
    
    # locate and test the java executable
    if [ "$JAVA_PROGRAM_DIR" == "" ]; then
    	if ! look_for_java ; then
    		exit 1
    	fi
    fi
    
    # get the app dir if not already defined
    if [ -z "$PROGRAM_DIR" ]; then
    		PROGRAM_DIR=`dirname "$0"`
    		PROGRAM_DIR=`cd "$PROGRAM_DIR"; pwd`
    else
    	if [ "$(echo ${PROGRAM_DIR}/*.jar)" = "${PROGRAM_DIR}/*.jar" ]; then
    		echo "You seem to have set an invalid PROGRAM_DIR, unable to continue!"
    		exit 1
    	elif [ ! -f "${PROGRAM_DIR}/Azureus2.jar" ]; then
    		echo "Unable to locate Azureus2.jar in $PROGRAM_DIR, aborting!"
    		exit 1
    	fi
    fi
    
    # Change path here so we can do for loop on program dirs with spaces
    cd "${PROGRAM_DIR}"
    
    # build the classpath
    for FILE in ./*.jar; do
    	CLASSPATH="${CLASSPATH:+${CLASSPATH}:}$FILE"
    done
    
    # setup Java System Properties (no spaces in values)
    JAVA_PROPS="-Dazureus.script.version=${SCRIPT_VERSION}"
    if [ ! "$JAVA_ISGCJ x" = " x" ] ; then
    	JAVA_PROPS="$JAVA_PROPS -Dgnu.gcj.runtime.VMClassLoader.library_control=never"
    fi
    
    # some distros symlink application level plugins into the users's plugin directory..
    # remove all symlinks in user's plugin directory
    find ~/.azureus/plugins -maxdepth 1 -type l -xtype d  -exec rm {} \;
    
    runJavaOutput "org.gudy.azureus2.platform.unix.ScriptBeforeStartup" "$@";
    
    echo $MSG_LOADING
    
    echo "${JAVA_PROGRAM_DIR}java ${JAVA_ARGS} -cp \"${CLASSPATH}\" -Djava.library.path=\"${PROGRAM_DIR}\" -Dazureus.install.path=\"${PROGRAM_DIR}\" -Dazureus.script=\"$0\" $JAVA_PROPS $START_CLASS $@"
    # Don't use "exec -a Azureus ..." here as exec quits this script after completion,
    # preventing ScriptAfterShutdown from running, which installs updates and does
    # restarts
    ${JAVA_PROGRAM_DIR}java "${JAVA_ARGS}" \
    	-cp "${CLASSPATH}" \
    	-Djava.library.path="${PROGRAM_DIR}" \
    	-Dazureus.install.path="${PROGRAM_DIR}" \
    	-Dazureus.script="$0" \
    	$JAVA_PROPS \
    	$START_CLASS "$@"
    
    echo $MSG_AZEXIT
    
    runJavaOutput "org.gudy.azureus2.platform.unix.ScriptAfterShutdown" "$@";
    
    echo $MSG_TERMINATED
    Here's my JDownloader script. Startup is still ugly compared to the Windows version, but it seems more responsive when minimizing/maximizing or switching to and from the JD window.
    Code:
    #!/bin/bash
    #JD Installer/Starter Version 0.2
    #by Jiaz(JD-Team), jiaz@jdownloader.org
    #You need at least:
    #1.) bash (its a bash script ;) )
    #2.) wget 
    #3.) Java Version >= 1.5 (OpenJDK works also in latest Version)
    
    #How to use this?
    #1.) chmod +x jd.sh
    #2.) Place it anywhere you want
    #3.) Running jd.sh for the first time will install and setup JD into JDDIR folder
    #4.) Running jd.sh after the first time will start JDownloader directly
    
    #Parameters
    # update (will perform an update)
    
    #JD Installation folder (adjust to your needs)
    JDDIR=~/.jd
    #default path to our install/update tool (DO NOT Change this)
    JDINSTALLER=http://update0.jdownloader.org/jdupdate.jar
    
    if [ -e $JDDIR ]
    then
    if [ "$1" = "update" ]
    then
    if [ -e $JDDIR/jdupdate.jar ]
    then
    cd $JDDIR
    echo "Start JD-Updater"
    java -Xmx512m -jar jdupdate.jar
    exit
    else
    echo "Cannot start JD-Updater: Download/Start JD-Installer"
    cd $JDDIR
    wget $JDINSTALLER
    java -Xmx512m -jar jdupdate.jar
    exit
    fi
    fi
    if [ -e $JDDIR/JDownloader.jar ]
    then
    echo "JD Installation found: Starting JD now"
    cd $JDDIR
    #java -Xmx512m -jar JDownloader.jar --add-links $1 $2 $3 $4 $5 $6 $7 $8 $9
    java -Dsun.java2d.opengl=true -Dsun.java2d.d3d=false -Xmx512m -jar JDownloader.jar
    exit
    else
    echo "JD Installation found: No valid JDownloader.jar exist!"
    fi
    if [ -e $JDDIR/jdupdate.jar ]
    then
    cd $JDDIR
    echo "Start JD-Updater"
    java -Xmx512m -jar jdupdate.jar
    else
    echo "Cannot start JD-Updater: Download/Start JD-Installer"
    cd $JDDIR
    wget $JDINSTALLER
    java -Xmx512m -jar jdupdate.jar
    exit
    fi
    else
    echo "Download/Start JD-Installer"
    mkdir $JDDIR
    cd $JDDIR
    wget $JDINSTALLER
    java -Xmx512m -jar jdupdate.jar
    exit
    fi
    Last edited by mister_playboy; October 29th, 2010 at 06:55 AM. Reason: added info

  6. #26
    Join Date
    Sep 2005
    Beans
    9

    Re: HowTo: extremely speed up slow Java apps by enabling them to use OpenGL

    Hi,

    I tried to add to the vuze script "-Dsun.java2d.opengl=true \" but uze started and almost immediately shut down, here is the log:


    seba@seba-laptop:~$ ~/azureus/vuze/azureus
    Starting Azureus...
    Suitable java version found [java = 1.6.0_20]
    Configuring environment...
    Java exec found in PATH. Verifying...

    ** (SWT:2671): CRITICAL **: giop_thread_request_push: assertion `tdata != NULL' failed
    GRE/XULRunner automatically found
    Loading Azureus:
    java -Xmx128m -cp "./Azureus2.jar:./swt.jar" -Djava.library.path="/home/seba/azureus/vuze" -Dazureus.install.path="/home/seba/azureus/vuze" -Dazureus.script="/home/seba/azureus/vuze/azureus" -Dazureus.script.version=2 org.gudy.azureus2.ui.swt.Main
    file:/home/seba/azureus/vuze/Azureus2.jar ; file:/home/seba/azureus/vuze/swt.jar ; file:/home/seba/azureus/vuze/
    UIFunctions/ImageLoad took 0ms
    new shell took 176ms
    new shell setup took 81ms
    skin init took 120ms
    MainMenu init took 126ms
    pre skin widgets init took 50ms
    WARNING: already added UIUpdatable com.aelitis.azureus.ui.swt.views.skin.sidebar.Side Bar@221e9e
    skin widgets (1/2) init took 228ms
    skin widgets (2/2) init took 211ms
    pre SWTInstance init took 0ms
    Init Core Columns took 103ms
    SWTInstance init took 0ms
    shell.layout took 50ms
    ---------SHOWN AT 1300549644972;2880ms
    ---------DONE DISPATCH AT 1300549646483;4391ms
    ---------READY AT 1300549646508;4424ms
    shell.open took 1553ms
    processStartupDMS took 0ms
    vuzeactivities init took 0ms
    Locale Initializing took 8ms
    16462: Core: 76ms for activity between 'Loading Plugin: mlab' and 'Loading Plugin: xmwebui'
    16508: Core: 25ms for activity between 'Loading Plugin: xmwebui' and 'Loading Torrents'
    16539: Core: 35ms for activity between 'Loading Plugin: azupnpav' and 'Loading Plugin: aefeatman_v'
    16717: Core: 168ms for activity between 'Loading Plugin: aefeatman_v' and 'Loading Plugin: azupdater'
    16738: Core: 30ms for activity between 'Loading Plugin: azupdater' and 'Loading Plugin: azsmrc'
    16821: Core: 76ms for activity between 'Loading Plugin: azsmrc' and 'Loading Plugin: news'
    16871: Core: 46ms for activity between 'Loading Plugin: news' and 'Loading Plugin: azupnpav'
    16922: Core: 50ms for activity between 'Loading Plugin: azupnpav' and 'Loading Plugin: azplugins'
    16980: Core: 76ms for activity between 'Loading Plugin: azplugins' and 'Loading Plugin: azrating'
    17013: Core: 25ms for activity between 'Loading Plugin: azrating' and 'Loading Plugin: Start/Stop Rules'
    17075: Core: 50ms for activity between 'Loading Plugin: Start/Stop Rules' and 'Loading Plugin: Torrent Removal Rules'
    17136: Core: 61ms for activity between 'Loading Plugin: Plugin Update Checker' and 'Loading Plugin: UPnP'
    17165: Core: 42ms for activity between 'Loading Plugin: UPnP' and 'Loading Plugin: DHT'
    17252: Core: 68ms for activity between 'Loading Plugin: DHT Tracker' and 'Loading Plugin: Magnet URI Handler'
    17276: Core: 25ms for activity between 'Loading Plugin: Magnet URI Handler' and 'Loading Plugin: Core Update Checker'
    17319: Core: 26ms for activity between 'Loading Plugin: Platform Checker' and 'Loading Torrent 4 of 73 : 8CF92B159513D5A50A68D81037651A5E807478FE.torrent'
    17346: Core: 25ms for activity between 'Loading Plugin: External Seed' and 'Loading Plugin: Local Tracker'
    17370: Core: 25ms for activity between 'Loading Plugin: Local Tracker' and 'Loading Plugin: Network Status'
    17444: Core: 70ms for activity between 'Loading Plugin: Buddy' and 'Loading Plugin: RSS'
    18097: Core: 656ms for activity between 'Loading Plugin: RSS' and 'Loading Torrent 5 of 73 : 634D46B4FF9C0D237B4AEA7DFAF1E22CEE3152E0.torrent'
    19871: Core: 1763ms for activity between 'Initialising Global Torrent Manager' and 'Initialising Plugin: Measurement Lab (M-Lab)'
    19921: Core: 36ms for activity between 'Initialising Plugin: Vuze Web Remote' and 'Initialising Plugin: Vuze Feature Manager'
    19989: Core: 77ms for activity between 'Initialising Plugin: Vuze Feature Manager' and 'Initialising Plugin: Azureus Update Support'
    20025: Core: 50ms for activity between 'Initialising Plugin: AzSMRC' and 'Initialising Plugin: NEWS'
    DEBUG::Sat Mar 19 16:47:30 CET 2011:rg.gudy.azureus2.pluginsimpl.local.PluginInitializ er::initialisePlugin::1594:
    java.lang.IllegalArgumentException: Empty key
    at javax.crypto.spec.SecretKeySpec.<init>(SecretKeySp ec.java:96)
    at lbms.azsmrc.plugin.main.XMLConfig.loadConfigFile(X MLConfig.java:76)
    at lbms.azsmrc.plugin.main.Plugin.initialize(Plugin.j ava:148)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer$8.run(PluginInitializer.java:1571)
    at org.gudy.azureus2.pluginsimpl.local.utils.Utilitie sImpl.callWithPluginThreadContext(UtilitiesImpl.ja va:951)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer.initialisePlugin(PluginInitializer.java:1561)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer.access$400(PluginInitializer.java:59)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer$2.run(PluginInitializer.java:1318)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer.initialisePlugins(PluginInitializer.java:1497)
    at com.aelitis.azureus.core.impl.AzureusCoreImpl.star t(AzureusCoreImpl.java:847)
    at com.aelitis.azureus.ui.swt.Initializer.run(Initial izer.java:533)
    at org.gudy.azureus2.ui.swt.mainwindow.SWTThread$7.ru nSupport(SWTThread.java:274)
    at org.gudy.azureus2.core3.util.AERunnable.run(AERunn able.java:38)
    at java.lang.Thread.run(Thread.java:636)

    [alert] Alert:3:Error initializing plugin 'AzSMRC'
    DEBUG::Sat Mar 19 16:47:30 CET 2011:rg.gudy.azureus2.pluginsimpl.local.PluginInitializ er::initialisePlugin::1598:
    java.lang.IllegalArgumentException: Empty key
    at javax.crypto.spec.SecretKeySpec.<init>(SecretKeySp ec.java:96)
    at lbms.azsmrc.plugin.main.XMLConfig.loadConfigFile(X MLConfig.java:76)
    at lbms.azsmrc.plugin.main.Plugin.initialize(Plugin.j ava:148)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer$8.run(PluginInitializer.java:1571)
    at org.gudy.azureus2.pluginsimpl.local.utils.Utilitie sImpl.callWithPluginThreadContext(UtilitiesImpl.ja va:951)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer.initialisePlugin(PluginInitializer.java:1561)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer.access$400(PluginInitializer.java:59)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer$2.run(PluginInitializer.java:1318)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer.initialisePlugins(PluginInitializer.java:1497)
    at com.aelitis.azureus.core.impl.AzureusCoreImpl.star t(AzureusCoreImpl.java:847)
    at com.aelitis.azureus.ui.swt.Initializer.run(Initial izer.java:533)
    at org.gudy.azureus2.ui.swt.mainwindow.SWTThread$7.ru nSupport(SWTThread.java:274)
    at org.gudy.azureus2.core3.util.AERunnable.run(AERunn able.java:38)
    at java.lang.Thread.run(Thread.java:636)

    Error initializing plugin 'AzSMRC' : java.lang.IllegalArgumentException: Empty key
    20053: Core: 26ms for activity between 'Initialising Plugin: NEWS' and 'Initialising Plugin: UPnP Media Server'
    20160: Core: 100ms for activity between 'Initialising Plugin: UPnP Media Server' and 'Initialising Plugin: Tracker Static Pages'
    20226: Core: 67ms for activity between 'Initialising Plugin: Tracker Static Pages' and 'Initialising Plugin: Rating'
    20250: Core: 23ms for activity between 'Initialising Plugin: Start/Stop Rules' and 'Initialising Plugin: Download Remove Rules'
    20268: Core: 11ms for activity between 'Initialising Plugin: Share Hoster' and 'Initialising Plugin: PluginUpdate'
    20294: Core: 14ms for activity between 'Initialising Plugin: Universal Plug and Play (UPnP)' and 'Initialising Plugin: Distributed DB'
    20328: Core: 11ms for activity between 'Initialising Plugin: Distributed Tracker' and 'Initialising Plugin: Magnet URI Handler'
    20336: Core: 19ms for activity between 'Initialising Plugin: Magnet URI Handler' and 'Initialising Plugin: CoreUpdater'
    20352: Core: 14ms for activity between 'Initialising Plugin: External Seed' and 'Initialising Plugin: LAN Peer Finder'
    Core Initializing took 4149ms
    psDMS 0ms
    Analysing /home/seba/azureus/vuze/hs_err_pid990.log
    #
    # A fatal error has been detected by the Java Runtime Environment:
    #
    # SIGSEGV (0xb) at pc=0x02a795a0, pid=2701, tid=2744982384
    #
    # JRE version: 6.0_20-b20
    # Java VM: OpenJDK Server VM (19.0-b09 mixed mode linux-x86 )
    # Derivative: IcedTea6 1.9.7
    # Distribution: Ubuntu 10.10, package 6b20-1.9.7-0ubuntu1
    # Problematic frame:
    # C [libGL.so.1+0x6d5a0] XF86DRIQueryExtension+0x8e
    #
    # An error report file with more information is saved as:
    # /home/seba/azureus/vuze/hs_err_pid2701.log
    #
    # If you would like to submit a bug report, please include
    # instructions how to reproduce the bug and visit:
    # https://bugs.launchpad.net/ubuntu/+source/openjdk-6/
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    #
    /home/seba/azureus/vuze/azureus: line 190: 2701 Aborted ${JAVA_PROGRAM_DIR}java "${JAVA_ARGS}" -cp "${CLASSPATH}" -Djava.library.path="${PROGRAM_DIR}" -Dsun.java2d.opengl=true -Dazureus.install.path="${PROGRAM_DIR}" -Dazureus.script="$0" $JAVA_PROPS $START_CLASS "$@"
    Exit from Azureus complete
    No shutdown tasks to do
    Azureus TERMINATED.
    seba@seba-laptop:~$ ~~~~~~


    Any idea?

  7. #27
    Join Date
    Sep 2005
    Beans
    9

    Re: HowTo: extremely speed up slow Java apps by enabling them to use OpenGL

    Hi,

    I tried to add to the vuze script "-Dsun.java2d.opengl=true \" but uze started and almost immediately shut down, here is the log:


    seba@seba-laptop:~$ ~/azureus/vuze/azureus
    Starting Azureus...
    Suitable java version found [java = 1.6.0_20]
    Configuring environment...
    Java exec found in PATH. Verifying...

    ** (SWT:2671): CRITICAL **: giop_thread_request_push: assertion `tdata != NULL' failed
    GRE/XULRunner automatically found
    Loading Azureus:
    java -Xmx128m -cp "./Azureus2.jar:./swt.jar" -Djava.library.path="/home/seba/azureus/vuze" -Dazureus.install.path="/home/seba/azureus/vuze" -Dazureus.script="/home/seba/azureus/vuze/azureus" -Dazureus.script.version=2 org.gudy.azureus2.ui.swt.Main
    file:/home/seba/azureus/vuze/Azureus2.jar ; file:/home/seba/azureus/vuze/swt.jar ; file:/home/seba/azureus/vuze/
    UIFunctions/ImageLoad took 0ms
    new shell took 176ms
    new shell setup took 81ms
    skin init took 120ms
    MainMenu init took 126ms
    pre skin widgets init took 50ms
    WARNING: already added UIUpdatable com.aelitis.azureus.ui.swt.views.skin.sidebar.Side Bar@221e9e
    skin widgets (1/2) init took 228ms
    skin widgets (2/2) init took 211ms
    pre SWTInstance init took 0ms
    Init Core Columns took 103ms
    SWTInstance init took 0ms
    shell.layout took 50ms
    ---------SHOWN AT 1300549644972;2880ms
    ---------DONE DISPATCH AT 1300549646483;4391ms
    ---------READY AT 1300549646508;4424ms
    shell.open took 1553ms
    processStartupDMS took 0ms
    vuzeactivities init took 0ms
    Locale Initializing took 8ms
    16462: Core: 76ms for activity between 'Loading Plugin: mlab' and 'Loading Plugin: xmwebui'
    16508: Core: 25ms for activity between 'Loading Plugin: xmwebui' and 'Loading Torrents'
    16539: Core: 35ms for activity between 'Loading Plugin: azupnpav' and 'Loading Plugin: aefeatman_v'
    16717: Core: 168ms for activity between 'Loading Plugin: aefeatman_v' and 'Loading Plugin: azupdater'
    16738: Core: 30ms for activity between 'Loading Plugin: azupdater' and 'Loading Plugin: azsmrc'
    16821: Core: 76ms for activity between 'Loading Plugin: azsmrc' and 'Loading Plugin: news'
    16871: Core: 46ms for activity between 'Loading Plugin: news' and 'Loading Plugin: azupnpav'
    16922: Core: 50ms for activity between 'Loading Plugin: azupnpav' and 'Loading Plugin: azplugins'
    16980: Core: 76ms for activity between 'Loading Plugin: azplugins' and 'Loading Plugin: azrating'
    17013: Core: 25ms for activity between 'Loading Plugin: azrating' and 'Loading Plugin: Start/Stop Rules'
    17075: Core: 50ms for activity between 'Loading Plugin: Start/Stop Rules' and 'Loading Plugin: Torrent Removal Rules'
    17136: Core: 61ms for activity between 'Loading Plugin: Plugin Update Checker' and 'Loading Plugin: UPnP'
    17165: Core: 42ms for activity between 'Loading Plugin: UPnP' and 'Loading Plugin: DHT'
    17252: Core: 68ms for activity between 'Loading Plugin: DHT Tracker' and 'Loading Plugin: Magnet URI Handler'
    17276: Core: 25ms for activity between 'Loading Plugin: Magnet URI Handler' and 'Loading Plugin: Core Update Checker'
    17319: Core: 26ms for activity between 'Loading Plugin: Platform Checker' and 'Loading Torrent 4 of 73 : 8CF92B159513D5A50A68D81037651A5E807478FE.torrent'
    17346: Core: 25ms for activity between 'Loading Plugin: External Seed' and 'Loading Plugin: Local Tracker'
    17370: Core: 25ms for activity between 'Loading Plugin: Local Tracker' and 'Loading Plugin: Network Status'
    17444: Core: 70ms for activity between 'Loading Plugin: Buddy' and 'Loading Plugin: RSS'
    18097: Core: 656ms for activity between 'Loading Plugin: RSS' and 'Loading Torrent 5 of 73 : 634D46B4FF9C0D237B4AEA7DFAF1E22CEE3152E0.torrent'
    19871: Core: 1763ms for activity between 'Initialising Global Torrent Manager' and 'Initialising Plugin: Measurement Lab (M-Lab)'
    19921: Core: 36ms for activity between 'Initialising Plugin: Vuze Web Remote' and 'Initialising Plugin: Vuze Feature Manager'
    19989: Core: 77ms for activity between 'Initialising Plugin: Vuze Feature Manager' and 'Initialising Plugin: Azureus Update Support'
    20025: Core: 50ms for activity between 'Initialising Plugin: AzSMRC' and 'Initialising Plugin: NEWS'
    DEBUG::Sat Mar 19 16:47:30 CET 2011:rg.gudy.azureus2.pluginsimpl.local.PluginInitializ er::initialisePlugin::1594:
    java.lang.IllegalArgumentException: Empty key
    at javax.crypto.spec.SecretKeySpec.<init>(SecretKeySp ec.java:96)
    at lbms.azsmrc.plugin.main.XMLConfig.loadConfigFile(X MLConfig.java:76)
    at lbms.azsmrc.plugin.main.Plugin.initialize(Plugin.j ava:148)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer$8.run(PluginInitializer.java:1571)
    at org.gudy.azureus2.pluginsimpl.local.utils.Utilitie sImpl.callWithPluginThreadContext(UtilitiesImpl.ja va:951)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer.initialisePlugin(PluginInitializer.java:1561)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer.access$400(PluginInitializer.java:59)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer$2.run(PluginInitializer.java:1318)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer.initialisePlugins(PluginInitializer.java:1497)
    at com.aelitis.azureus.core.impl.AzureusCoreImpl.star t(AzureusCoreImpl.java:847)
    at com.aelitis.azureus.ui.swt.Initializer.run(Initial izer.java:533)
    at org.gudy.azureus2.ui.swt.mainwindow.SWTThread$7.ru nSupport(SWTThread.java:274)
    at org.gudy.azureus2.core3.util.AERunnable.run(AERunn able.java:38)
    at java.lang.Thread.run(Thread.java:636)

    [alert] Alert:3:Error initializing plugin 'AzSMRC'
    DEBUG::Sat Mar 19 16:47:30 CET 2011:rg.gudy.azureus2.pluginsimpl.local.PluginInitializ er::initialisePlugin::1598:
    java.lang.IllegalArgumentException: Empty key
    at javax.crypto.spec.SecretKeySpec.<init>(SecretKeySp ec.java:96)
    at lbms.azsmrc.plugin.main.XMLConfig.loadConfigFile(X MLConfig.java:76)
    at lbms.azsmrc.plugin.main.Plugin.initialize(Plugin.j ava:148)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer$8.run(PluginInitializer.java:1571)
    at org.gudy.azureus2.pluginsimpl.local.utils.Utilitie sImpl.callWithPluginThreadContext(UtilitiesImpl.ja va:951)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer.initialisePlugin(PluginInitializer.java:1561)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer.access$400(PluginInitializer.java:59)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer$2.run(PluginInitializer.java:1318)
    at org.gudy.azureus2.pluginsimpl.local.PluginInitiali zer.initialisePlugins(PluginInitializer.java:1497)
    at com.aelitis.azureus.core.impl.AzureusCoreImpl.star t(AzureusCoreImpl.java:847)
    at com.aelitis.azureus.ui.swt.Initializer.run(Initial izer.java:533)
    at org.gudy.azureus2.ui.swt.mainwindow.SWTThread$7.ru nSupport(SWTThread.java:274)
    at org.gudy.azureus2.core3.util.AERunnable.run(AERunn able.java:38)
    at java.lang.Thread.run(Thread.java:636)

    Error initializing plugin 'AzSMRC' : java.lang.IllegalArgumentException: Empty key
    20053: Core: 26ms for activity between 'Initialising Plugin: NEWS' and 'Initialising Plugin: UPnP Media Server'
    20160: Core: 100ms for activity between 'Initialising Plugin: UPnP Media Server' and 'Initialising Plugin: Tracker Static Pages'
    20226: Core: 67ms for activity between 'Initialising Plugin: Tracker Static Pages' and 'Initialising Plugin: Rating'
    20250: Core: 23ms for activity between 'Initialising Plugin: Start/Stop Rules' and 'Initialising Plugin: Download Remove Rules'
    20268: Core: 11ms for activity between 'Initialising Plugin: Share Hoster' and 'Initialising Plugin: PluginUpdate'
    20294: Core: 14ms for activity between 'Initialising Plugin: Universal Plug and Play (UPnP)' and 'Initialising Plugin: Distributed DB'
    20328: Core: 11ms for activity between 'Initialising Plugin: Distributed Tracker' and 'Initialising Plugin: Magnet URI Handler'
    20336: Core: 19ms for activity between 'Initialising Plugin: Magnet URI Handler' and 'Initialising Plugin: CoreUpdater'
    20352: Core: 14ms for activity between 'Initialising Plugin: External Seed' and 'Initialising Plugin: LAN Peer Finder'
    Core Initializing took 4149ms
    psDMS 0ms
    Analysing /home/seba/azureus/vuze/hs_err_pid990.log
    #
    # A fatal error has been detected by the Java Runtime Environment:
    #
    # SIGSEGV (0xb) at pc=0x02a795a0, pid=2701, tid=2744982384
    #
    # JRE version: 6.0_20-b20
    # Java VM: OpenJDK Server VM (19.0-b09 mixed mode linux-x86 )
    # Derivative: IcedTea6 1.9.7
    # Distribution: Ubuntu 10.10, package 6b20-1.9.7-0ubuntu1
    # Problematic frame:
    # C [libGL.so.1+0x6d5a0] XF86DRIQueryExtension+0x8e
    #
    # An error report file with more information is saved as:
    # /home/seba/azureus/vuze/hs_err_pid2701.log
    #
    # If you would like to submit a bug report, please include
    # instructions how to reproduce the bug and visit:
    # https://bugs.launchpad.net/ubuntu/+source/openjdk-6/
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    #
    /home/seba/azureus/vuze/azureus: line 190: 2701 Aborted ${JAVA_PROGRAM_DIR}java "${JAVA_ARGS}" -cp "${CLASSPATH}" -Djava.library.path="${PROGRAM_DIR}" -Dsun.java2d.opengl=true -Dazureus.install.path="${PROGRAM_DIR}" -Dazureus.script="$0" $JAVA_PROPS $START_CLASS "$@"
    Exit from Azureus complete
    No shutdown tasks to do
    Azureus TERMINATED.
    seba@seba-laptop:~$ ~~~~~~


    Any idea?

  8. #28
    Join Date
    Jan 2008
    Beans
    15

    Re: HowTo: extremely speed up slow Java apps by enabling them to use OpenGL

    Hey guys,

    all of you having trouble to apply this switch, should probably better first check the JRE you are actually using. It doesn't make too much sense to start a deviating environment with a sun JRE specific switch, does it?

    @mer0090

    This for example indicates, you are using OpenJDK instead of sun JRE

    Quote Originally Posted by mer0090 View Post
    Analysing /home/seba/azureus/vuze/hs_err_pid990.log
    #
    # A fatal error has been detected by the Java Runtime Environment:
    #
    # SIGSEGV (0xb) at pc=0x02a795a0, pid=2701, tid=2744982384
    #
    # JRE version: 6.0_20-b20
    # Java VM: OpenJDK Server VM (19.0-b09 mixed mode linux-x86 )
    # Derivative: IcedTea6 1.9.7

    # Distribution: Ubuntu 10.10, package 6b20-1.9.7-0ubuntu1
    # Problematic frame:
    # C [libGL.so.1+0x6d5a0] XF86DRIQueryExtension+0x8e
    #
    # An error report file with more information is saved as:
    # /home/seba/azureus/vuze/hs_err_pid2701.log
    #
    # If you would like to submit a bug report, please include
    # instructions how to reproduce the bug and visit:
    # https://bugs.launchpad.net/ubuntu/+source/openjdk-6/
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    #
    So better install Sun JRE in order to use this tweak.
    For example, you could execute these commands in a console:
    Code:
    sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
    sudo apt-get update
    sun-java6-bin & sun-java6-jre
    If you already did, and still having OpenJDK taking over, you can change the default JRE choice of Ubuntu with the command:
    "sudo update-alternatives --config java"

    Hope that helps,
    Cheers, Nix

  9. #29
    Join Date
    Nov 2006
    Location
    Melbourne (Victoria, OZ)
    Beans
    937
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: HowTo: extremely speed up slow Java apps by enabling them to use OpenGL

    Hi all. I see things have great changed since this thread started, so I'd like to check what the latest instructions would be, using Vuze 4.7.0.2 in Ubuntu 11.10 (64-bit), with both Sun Java (just before the very latest version) and OpenJDK (latest) installed, with the script looking like:

    #!/bin/sh

    # Include java-wrappers
    . /usr/lib/java-wrappers/java-wrappers.sh

    JAVA_CLASSPATH="/usr/lib/jni:/usr/lib/java"
    VUZE_BIN="/usr/bin/vuze"

    find_java_runtime openjdk sunmin5

    find_jars Azureus2 log4j-1.2 commons-cli swt

    if [ ! -x $VUZE_BIN ]; then
    UI=-Dforce.ui=az2
    fi

    run_java -Dazureus.install.path="$HOME/.azureus" $UI \
    org.gudy.azureus2.ui.common.Main "$@"


    Many thanks in advance - this unresponsiveness in Vuze that started recently with an update (I assume to Java) is driving me nuts. [EDIT: OK, turns out I only have OpenJDK, so Sun's Java was obviously uninstalled at some point, probably the last upgrade. Sun's website just told me a later version was available, not that it wasn't installed on my system. So do I uninstall OpenJDK, and will that have unwanted consequences with programs relying on it?]
    Last edited by OzzyFrank; March 7th, 2012 at 07:12 AM.
    Soylent Green is PEOPLE!!!

Page 3 of 3 FirstFirst 123

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •