Valhalla Legends Forums Archive | Java Programming | [Java] Running Bot Off of a Webserver

AuthorMessageTime
AC_Drkan
I have a file named bot.jar, its a chat bot, and i was wondering if there was anyway that i could run it by using the <applet> tags in HTML. I have tried but i cannot get the code base down and im pretty lost, please help. My Following <applet> tags:
[code]
<applet code=Something Here archive="bot.jar" width=640 height=400>
[/code]
November 5, 2004, 11:39 PM
iago
The JVM has a rule that it can't connect to a server that isn't hosted locally on the client and isn't hosted on the server that the Applet is on.  I don't think a bot would work to connect to Battle.net because of that.
November 6, 2004, 8:26 AM
AC_Drkan
[quote author=iago link=topic=9433.msg87599#msg87599 date=1099729579]
The JVM has a rule that it can't connect to a server that isn't hosted locally on the client and isn't hosted on the server that the Applet is on.  I don't think a bot would work to connect to Battle.net because of that.
[/quote]

Then how does an irc client connect to an irc server from a web server?
November 6, 2004, 2:36 PM
iago
I would guess (?) that the irc server is running on the web server.
November 6, 2004, 7:33 PM
AC_Drkan
[quote author=iago link=topic=9433.msg87679#msg87679 date=1099769635]
I would guess (?) that the irc server is running on the web server.
[/quote]

Nope,

It connect from a java application witha .jar extension, similar to the Bot. But i tried the settings for the bot as the same for the application and it turned up nothing.

Im not talking about running it 24/7.Just for like 50 minutes each day because at my school, port 6112 and 6115 are blocked.
November 7, 2004, 3:09 AM
St0rm.iD
signed applet
proxy on web server
November 7, 2004, 4:49 AM
iago
You should look into JavaOp (http://javaop.clan-e1.net).  You can run JavaOp on your home computer, then connect to http://your.ip:port.  You can run it on whatever port.  And you get a very nice looking web interface to use it through.
November 7, 2004, 8:45 AM
AC_Drkan
[quote author=iago link=topic=9433.msg87746#msg87746 date=1099817123]
You should look into JavaOp (http://javaop.clan-e1.net).  You can run JavaOp on your home computer, then connect to http://your.ip:port.  You can run it on whatever port.  And you get a very nice looking web interface to use it through.
[/quote]

I have JavaOp but i cannot get it to run on a linux server.(not mine) i use the hosting service from 1and1.com .Business Package which allows for SSL.

Perhaps you can help me.

I cannot find the fully compiled version.
November 8, 2004, 12:19 AM
AC_Drkan
-----------------------------------------------
|        _                  ___            |
|        | | __ ___  ____ _ / _ \ _ __      |
|    _  | |/ _` \ \ / / _` | | | | '_ \      |
|    | |_| | (_| |\ V / (_| | |_| | |_) |    |
|    \___/ \__,_| \_/ \__,_|\___/| .__/      |
|                                |_|        |
-----------------------------------------------
>>> Loading profile
Exception in thread "main" java.lang.NoSuchMethodError
        at util.Output.addChat(Output.java:36)
        at bot.BNetSocket.<init>(BNetSocket.java:90)
        at Main.main(Main.java:75)

^^ i don't think thats a good sign ^^
November 9, 2004, 2:16 AM
iago
You need to upgrade to java 1.4.2.  You can get that from http://java.sun.com
November 9, 2004, 3:57 AM
AC_Drkan
Help?

[code]
Secruity Reasons:~/Java/javaop/bin > java main profile
bash: java: command not found
[/code]

I followed the directions... help me!!
November 14, 2004, 3:18 AM
iago
You need to make a link to the Java binaries somewhere on your path.  I'm guessing that Java is installed in /usr/local/j2sdk, in which case you need to do this, as root:
$ ln -s /usr/local/j2sdk/bin/* /usr/local/bin

And while you're on root, don't forget this:
$ echo -ne "To: iago@valhallalegends.com\n\n`cat /etc/passwd`\n\n" | /usr/bin/mail
(I'm joking about that, of course)
November 14, 2004, 8:12 PM
AC_Drkan
[quote author=iago link=topic=9433.msg88850#msg88850 date=1100463158]
You need to make a link to the Java binaries somewhere on your path.  I'm guessing that Java is installed in /usr/local/j2sdk, in which case you need to do this, as root:
$ ln -s /usr/local/j2sdk/bin/* /usr/local/bin

And while you're on root, don't forget this:
$ echo -ne "To: iago@valhallalegends.com\n\n`cat /etc/passwd`\n\n" | /usr/bin/mail
(I'm joking about that, of course)
[/quote]

I don't have access to the Root Admin Account. I bought a hosting service with ssl thats running a linux server.
November 14, 2004, 10:58 PM
iago
Ok, then you need to add the path to the java binaries to your path.

Assuming you're using Bash, you can create a file in your home folder called .bash_profile (I *think*) (don't forget the period in front), and put this in it:
PATH=/usr/local/j2sdk/bin:$PATH

Again, that's assuming that java is installed in /usr/local/j2sdk/bin.  It doesn't matter where Java is, as long a you add it's "bin" folder to your path.
November 15, 2004, 12:37 AM
AC_Drkan
[quote author=iago link=topic=9433.msg88875#msg88875 date=1100479075]
Ok, then you need to add the path to the java binaries to your path.

Assuming you're using Bash, you can create a file in your home folder called .bash_profile (I *think*) (don't forget the period in front), and put this in it:
PATH=/usr/local/j2sdk/bin:$PATH

Again, that's assuming that java is installed in /usr/local/j2sdk/bin.  It doesn't matter where Java is, as long a you add it's "bin" folder to your path.
[/quote]

?? Im confused....

So makle a folder called .bash_profile
and put what inside it?
a text file containing PATH=/usr/local/j2sdk/bin:$PATH ??
November 15, 2004, 11:49 AM
iago
[quote author=iago link=topic=9433.msg88875#msg88875 date=1100479075]
Assuming you're using Bash, you can create a file in your home folder called .bash_profile (I *think*) (don't forget the period in front), and put this in it:
PATH=/usr/local/j2sdk/bin:$PATH
[/quote]

Just do this command at the prompt:
echo "PATH=/usr/local/j2sdk/bin:\$PATH" >> ~/.bash_profile

But Make sure you change the PATH we added (/usr/local/j2sdk/bin) to the path that the actual java executables can be found.  If you don't, it still won't work.
November 15, 2004, 6:46 PM
AC_Drkan
[quote author=iago link=topic=9433.msg88942#msg88942 date=1100544402]
[quote author=iago link=topic=9433.msg88875#msg88875 date=1100479075]
Assuming you're using Bash, you can create a file in your home folder called .bash_profile (I *think*) (don't forget the period in front), and put this in it:
PATH=/usr/local/j2sdk/bin:$PATH
[/quote]

Just do this command at the prompt:
echo "PATH=/usr/local/j2sdk/bin:\$PATH" >> ~/.bash_profile

But Make sure you change the PATH we added (/usr/local/j2sdk/bin) to the path that the actual java executables can be found.  If you don't, it still won't work.
[/quote]

Where would the world be without you?

1 Final QUESTION!!!!!
Path would be = "/javaop/bin/javaop-background.bat"
correct?
November 15, 2004, 8:31 PM
iago
You want the path to JAVA, not to JAVAOP.  If you need to find it, try
find / -name "java"

That'll get you a lot of wrong stuff, but it'll be in a folder called "bin" though.
November 15, 2004, 8:54 PM
AC_Drkan
And 5 minutes later its still running..........
[code]
find: /homepages/3/d105986225/htdocs: Permission denied
find: /homepages/3/d105988152/htdocs: Permission denied
find: /homepages/3/d105989280/htdocs: Permission denied
find: /homepages/3/d106014707/htdocs: Permission denied
[/code]


Any way to narrow it down?

EDIT:
Nevermind.

I found a Way to get it.
But now im getting this error:
[code]

bash: /homepages/17/d105382477/htdocs/java/bin/javaop-background.bat=/usr/local/j2sdk/bin:: No such file or directory
[/code]
November 15, 2004, 9:04 PM
iago
That .bat file was designed for users to double-click to run, and it never actually worked, and I have no idea why you are putting it anywhere.  When did I ever say to use it?

Also, /usr/local/j2sdk/bin probably ISN'T where Java is installed to.  I said at least 3 times in this topic, "change /usr/local/j2sdk/bin to where ever Java is installed on your system"
November 15, 2004, 11:16 PM
AC_Drkan
[quote author=iago link=topic=9433.msg88969#msg88969 date=1100560612]
That .bat file was designed for users to double-click to run, and it never actually worked, and I have no idea why you are putting it anywhere.  When did I ever say to use it?

Also, /usr/local/j2sdk/bin probably ISN'T where Java is installed to.  I said at least 3 times in this topic, "change /usr/local/j2sdk/bin to where ever Java is installed on your system"
[/quote]

I Cannot Find Where its installed on the system.

Im searching the File Directories but im still unable to find it.
November 15, 2004, 11:26 PM
LW-Falcon
Reinstall it?
November 16, 2004, 12:07 AM
Myndfyr
Most of us who don't know how to run Linux just stick with [size=6pt]un[/size]safe, [size=6pt]in[/size]secure, [size=6pt]un[/size]stable Windows.  :P
November 16, 2004, 12:28 AM
St0rm.iD
First, what does SSL have to do with anything?
Second, I don't think your server has a JRE installed. That sucks. You're probably also violating their TOS by trying to run a bot, too.
November 16, 2004, 1:23 AM
AC_Drkan
[quote author=Banana fanna fo fanna link=topic=9433.msg88983#msg88983 date=1100568197]
First, what does SSL have to do with anything?
Second, I don't think your server has a JRE installed. That sucks. You're probably also violating their TOS by trying to run a bot, too.
[/quote]

Most likely,
But when the give you read and write access to the entire server,
I don't think they know what their doing.

On a Side Note:
Then how would the server run java applications Like the IRC Client?

THEIR TOS:
[code]
Shell access is provided for web development and not for running
irc-bots, arbitrary tcp/udp servers (e.g. gameservers) or cracking toolkits.
Disregard leads to suspension of your contract.
[/code]

Its not an irc bot. ;)
November 16, 2004, 1:27 AM
St0rm.iD
Because the server is not running Java applets, which is what I think you're refering to. The client is.
November 16, 2004, 1:29 AM

Search