Results 1 to 3 of 3
  1. #1
    Xerces is offline Member
    Join Date
    Jul 2012
    Posts
    4
    Rep Power
    0

    Exclamation Need Help With Java Applet Script/Code

    I'm having an exceeding difficult time with writing a code to launch my game with predetermined information. I'm running Mac OS X 10.6.8 with Java 1.6.0.

    Basically I want to double click on my script and it launches the game and inserts information that it obtains from the webpage automatically.

    When I execute the code, the applet opens, but it still prompts me to login even though my information is provided.


    #!/bin/sh
    cd "/Users/tk/Library/Application Support/spiral"
    /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -Xdock:name="Spiral Knights" -Xdock:icon=rsrc/ui/icon/desktop.icns -Dcom.threerings.getdown=true -Dcom.threerings.getdown.connectPort=50672 -d32 -XX:+AggressiveOpts -XX:SoftRefLRUPolicyMSPerMB=10 -Dorg.lwjgl.util.NoChecks=true -Dapplet=true -Dkongregate=true -DkongregateName=xxx -DkongregateId=xxx -DkongregateAuthToken=xxx -jar getdown-pro.jar .


    So I traced the Java process when its running with me already logged in and found the following command line which I converted into a shell script.


    /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -classpath /Users/tk/Library/Application Support/spiral/code/config.jar:/Users/tk/Library/Application Support/spiral/code/projectx-config.jar:/Users/tk/Library/Application Support/spiral/code/projectx-pcode.jar:/Users/tk/Library/Application Support/spiral/code/lwjgl.jar:/Users/tk/Library/Application Support/spiral/code/lwjgl_util.jar:/Users/tk/Library/Application Support/spiral/code/jinput.jar:/Users/tk/Library/Application Support/spiral/code/jutils.jar:/Users/tk/Library/Application Support/spiral/code/jshortcut.jar:/Users/tk/Library/Application Support/spiral/code/commons-beanutils.jar:/Users/tk/Library/Application Support/spiral/code/commons-digester.jar:/Users/tk/Library/Application Support/spiral/code/commons-logging.jar -Xdock:icon=/Users/tk/Library/Application Support/spiral/rsrc/ui/icon/desktop.icns -Xdock:name=Spiral Knights -Dcom.threerings.getdown=true -Dcom.threerings.getdown.connectPort=60270 -d32 -Xmx256M -XX:+AggressiveOpts -XX:SoftRefLRUPolicyMSPerMB=10 -Djava.library.path=/Users/tk/Library/Application Support/spiral/native -Dorg.lwjgl.util.NoChecks=true -Dsun.java2d.d3d=false -Dappdir=/Users/tk/Library/Application Support/spiral -Dresource_dir=/Users/tk/Library/Application Support/spiral/rsrc -Dapplet=true -Dkongregate=true -DkongregateName=xxx -DkongregateId=xxx -DkongregateAuthToken=xxx -Xmx512M com.threerings.projectx.client.ProjectXApp


    When I try to launch the above script though, all it keeps doing is giving me this in Terminal

    Exception in thread "main" java.lang.NoClassDefFoundError: Support/spiral/code/config/jar:/Users/tk/Library/Application
    Caused by: java.lang.ClassNotFoundException: Support.spiral.code.config.jar:.Users.tk.Library.A pplication
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 47)

    Please, any help would be appreciated. I've already contacted the Devs, and customer support of both companies and neither want to assist with getting this working. If it helps any here is the forum post I've been working on. I've been working on trying to get this to work for the past 5 days and my brain is wracked.

    [Moderator edit: two links removed]
    Last edited by DarrylBurke; 07-31-2012 at 07:34 PM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default Re: Need Help With Java Applet Script/Code

    I've removed links from all three of your forum posts. Any more offsite links and you may be banned as a spammer.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default Re: Need Help With Java Applet Script/Code

    Also, as (just like your earlier thread) there isn't a Java question anywhere, I'm locking this thread.

    If you need help with a MacOS shell script, ask on an Apple forum.

    db

    THREAD CLOSED
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 1
    Last Post: 06-08-2012, 07:11 AM
  2. Debugging a Java Code which is run by a Shell Script
    By ArunJava in forum New To Java
    Replies: 0
    Last Post: 09-12-2011, 03:21 PM
  3. Java Applet Shell script
    By karthikm897 in forum Java Applets
    Replies: 5
    Last Post: 08-18-2009, 04:42 AM
  4. Replies: 3
    Last Post: 07-23-2008, 08:07 AM

Posting Permissions

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