LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-05-2005, 05:38 AM   #1
vivekr
Member
 
Registered: Nov 2005
Location: Coimbatore,India
Distribution: Fedora Core4
Posts: 68

Rep: Reputation: 15
Problem in Java with ports....


Hi to all.
I am actually struggling a lot. I desperately need some help.
It all started some months before. Initially I was working in java using Forte Java(I am afraid I dont remember the exact version) in Windows XP. initially it was working well. Suddenly it popped up a message like it couldnt reach or handle some port-So it cant execute servlets. From then on a lot of probs crept in- I couldnt trace the program. Every time I compiled the prog some msgs kept popping up. So I uninstalled the s/w.

Later when I tried Apache Tomcat(V5.0 ,V5.5) both of them failed to connect to the local loopback port(127.0.0.1). Its not popping up any errors but shows the message Page cannot be found.


When I tried to run networking programs written in Java the showed the same error---

"Socket Exception---(blah blah) : JVM_BIND" (Now I dont remember the exact exception thrown)

Worse was, a month back I gave net connection to my comp. I am able to connect to Internet without any problem in Linux(Fedora Core 3). However , in Windows XP I couldnt do the same. I couldnt connect to the network at all.

I used "ping" to connect to networks. It works fine, sending(say 60-80) and receiving(5-10) packets.

Now, the problem is I have all my works stored in XP. So I cant move as such to Linux now. I also need XP for few s/ws available specifically only for Windows.

So can anybody help me with a soln. I would be extremely happy if anyone of u can help me out of this problem.

An advance thanks to anyone cares for helping me to get rid of this problem

Last edited by vivekr; 11-06-2005 at 02:04 AM.
 
Old 11-05-2005, 07:32 AM   #2
jaristr
Member
 
Registered: Aug 2005
Distribution: Debian and slackware based
Posts: 119

Rep: Reputation: 15
Well I don't know much about java but since you mentioned JVM_BIND I think that binding the server to port fails because the port is already in use. What you need to do is to either try another port or set some attribute so before calling bind that it forces socket to bind on the port even if its already used.
Sorry that I don't know how to do this in java but here's couple links that might help:

http://swforum.sun.com/jive/thread.j...44757&tstart=0
http://www.jboss.org/?module=bb&op=viewtopic&t=67937

try "java bind JVM_BIND" in google for more.
 
Old 11-05-2005, 08:00 AM   #3
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
You need to make sure the server has stopped completely before running it. If another server is running at the adress or the process didn't die, you will have a message saying tomcat cannot bind the desired port.
 
Old 11-06-2005, 02:38 AM   #4
vivekr
Member
 
Registered: Nov 2005
Location: Coimbatore,India
Distribution: Fedora Core4
Posts: 68

Original Poster
Rep: Reputation: 15
Thanks 4 the response.

Actually I have used TCPViewer before and it popped up the message
"Connection Exception: 10098"

And i have oracle's Apache server on my machine. But I am not using ports 8080 and <1024. But still its not working.
Actually in my post I have written
" Worse was, a month back I gave net connection to my comp. I am able to connect to Internet without any problem in Windows. However , in Windows XP I couldnt do the same. I couldn't connect to the network at all. "

Actually now I am working with the internet using Linux(Fedora Core 3). That was a small typing mistake.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problem in Java with ports.... vivekr Programming 1 11-05-2005 04:26 PM
problem installing Java from ports zibo *BSD 1 06-15-2005 02:59 PM
Java JDk15 from ports zibo *BSD 1 05-31-2005 06:38 PM
Need Java program to listen on ports < 1024 w/o being root - possible brenan99 Linux - General 2 02-22-2005 02:12 PM
Installing Java from FreeBSD ports. darksky *BSD 4 11-13-2003 10:38 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:36 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