Programming :: Unable To Access Java Package

Feb 16, 2011

i am a complete newbie in java. while dealing with packages i faced the following problem. I created a file named "CreatePackage"

Code:

package lobkush;
public class CreatePackage {
public CreatePackage() {
System.out.println("you are presently under package named "lobkush" ");
}
}

after this i created a folder named "lobkush".I also compiled the source file and placed the .class file in the corresponding directory.

Now to test it i created another java file. This is where the problem arises.while importing the class file if I write:

Code:

import lobkush.*;
the compiler shows an error

but if I write

Code:

import lobkush.CreatePackage;

no error is shown and the .class file generated.

View 4 Replies


ADVERTISEMENT

Programming :: Java: Referencing Image Within Package

Jan 30, 2009

I am running into a small bit of difficulty with images I want to use in a Java program, keeping them bundled with the program in a JAR file and accessing them within the package.For those who are thinking it, this is definitely not homework.In my program, I have several images I would like to use on buttons on a toolbar.I have Googled, and I found something that comes close, but it deals with fetching images from a URL - nothing that deals with local files, more specifically, local images kept inside of a JARchive.

View 3 Replies View Related

Programming :: Importing A Package Recursively (with Subpackages) In Java?

Feb 26, 2010

I'm a 1st-year CS major and am new to Java. I had a question about importing packages. As I understand it, when you use a wildcard when importing, it will import the classes within the package specified before the asterisk, but none of the subpackages in the specified package.is there a way to include all classes and subpackages recursively with a single line, instead of doing:

import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;

As I understand it, it doesn't actually cause any bloat in your bytecode, so if it can be done, would there be any disadvantage?

View 4 Replies View Related

Programming :: Java Package To Use For Playing Music With Different Kind Of Instruments?

Jul 23, 2009

Does anybody know any Java package that can be used for playing music with different kind of instruments. Is any package which implements the java.sound api http://java.sun.com/products/java-me.../doc-midi.html

View 1 Replies View Related

Programming :: Unable To Connect With Java Listener

Sep 26, 2010

I have a centos 5.5 machine. I have forwarded both port 22 and 8080 on my router. I can connect on 22 via telnet ip 22 and even can remotely login into the machine. The problem when I start my java listener program which is listening on 8080 it cant not establish any connection (via telnet ip 8080). I have even add this into the iptables too -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9000 -j ACCEPT. I have disabled the SELINUX too.

View 9 Replies View Related

Programming :: Unable To Extract Java Regex For Links

Mar 22, 2011

Im trying to extract the href of a <link> tag from a html page however as some links contain further preferences I seem to be unable to extract them, do you have any idea how I can write this: Link:

[Code]...

View 9 Replies View Related

Programming :: Unable To Access Filehandles (Perl)

May 17, 2010

I've been reading / trying to learn some Perl lately. I've found the free book, "Learning Perl", quite good and easy to follow most of the times. However, today I was testing one of the scripts in the book and it would only run partly.

Code:

#!/usr/bin/perl
use warnings;
use strict;
my %inventory;

[code]....

This row is supposed to give option, either to use an additional script as pipe (sort.plx),or STDOUT if the extra script is not found.It works with the other script present, however, with the sort.plx being absent it simply wont use STDOUT instead but whines to me:

Can't open perl script "sort.plx": No such file or directory

Has the author of the original script done some error writing it? Since I'm a beginner and found most of the stuff confusing in Perl either way (having previously only experience in Bash and some in PHP) - I can't really tell for sure , but from what I can read in documentation - it doesn't appear to be wrong.As it looks now, the only way for me to use STDOUT is only by removing:

open (SORT, "| perl sort.plx") or *SORT = *STDOUT;
select *SORT;

rows. But then, I lose the piping in to that other script as an option.

View 8 Replies View Related

Ubuntu :: Package Installation Error / 'E: Unable To Locate Package Xxx'

Feb 3, 2011

I am following this guide to installing eclipse via terminal command-line on Linux. However, this seems to be happening lately with all the packages I try to install..I checked the Synaptic Package Manager and reloaded and rebooted the computer, but to no avail.

View 5 Replies View Related

Slackware :: Missing Java - Package Browser Down ?

Dec 17, 2010

I thought I knew what I was doing, just a minimal install of slackware 13.1 for a game server (minecraft), but it seems I missed java or something - I get the "command not found" error. gcc-java is installed. What package did I miss/what series is it in? Does it have any dependencies?

View 1 Replies View Related

CentOS 5 :: Remove Java-1.4.2-gcj-compact Package?

May 6, 2009

What is 'java-1.4.2-gcj-compact package' Is this a JDK or just JRE?

I want to remove 'java-1.4.2-gcj-compact' package and install sun's JDK1.6. But lots of other packages depends on 'java-1.4.2-gcj-compact'. How should I go ahead.

View 3 Replies View Related

General :: Libraries In Slackware 12.1 And Install The Java Jdk Package?

May 15, 2010

i wanted to know whether the gcc,g++ libraries are pre-installed i slackware 12.1 or not. if not then from where can i download them .how do i install them? how do i install the java jdk package also?

View 1 Replies View Related

Programming :: Groovy Scripting - An Object-oriented Programming Language For The Java Platform ?

Mar 7, 2010

Groovy is an object-oriented programming language for the Java platform. I do not have experience in Java, only perl and shell scripts. Recently I have been asked to maintain a software written in groovy (also to make enhancements). So can I learn groovy without knowing java language. or isit I have to learn java before venturing into groovy.

View 1 Replies View Related

Debian :: Cannot Find Java Package - Fake Root Does Not Work

Mar 19, 2011

I'm am very new at debian. I have tried to use the apt install to install java-package an fake root after it says cannot find java-package also fake root doesn't work?

View 5 Replies View Related

Ubuntu :: OpenJDK Java 6 Runtime - Package Dependencies Cannot Be Resolved

Aug 26, 2010

I'm trying to install Open Rocket : [URL]. I don't think I have java installed. I went to software center and tried to install "OpenJDK Java 6 runtime" and it says package dependencies cannot be resolved. I tried doing sudo apt-get install through terminal and it was dependent on a long list of things:

openjdk-6-jre
openjdk-6-jre-headless
tzdata-java
tzdata

I tried to sudo apt-get each one and it led me down the list like that to a dead end.

View 6 Replies View Related

Ubuntu Installation :: How To Install Java / Amsn In Synaptic Package Manager

Apr 4, 2010

i downloaded packages of java and amsn but i cant see them in the synaptic package manager.when i search them i cant find and when i click file--> add downloaded packages ,it doesnt take this packages.

View 4 Replies View Related

Ubuntu Multimedia :: Installing Java 3D - Package Javax.vecmath Does Not Exist

Jan 9, 2011

I'm trying to play around with java 3d, but having troubles to get some example to run.

NetBeans don't likes the line "import javax.vecmath.*;", it tells me that "package javax.vecmath does not exist",...

Code:

etc/environment holds following:

Code:

View 1 Replies View Related

Programming :: RPM: Package Requires Old Version Of Same Package?

Nov 22, 2010

I'm building a certain RPM package that must require an old version of that same package in order to be installed/upgraded. Is this possible?

For example:

For a package foo v5, somewhere in the spec file:
"Requires: foo >= 4"

I'm declaring this on the Requires tag of the spec file, but when I try to install or upgrade the package (without having the previous required version installed) I get no dependency error! As for other dependencies it all works fine. If, instead, I create a package named "bar" that "Requires: foo >= 4", when installing I do get the expected dependency error. I'm thinking it's not possible to require an old version of the same package.

View 2 Replies View Related

Ubuntu :: Using Web Min To Access Server \ Unable To Access Email Account From A Web Page?

Sep 12, 2010

ok so i ran into a problem, im using web min to access my server, and im setting up postfix and, dovecot first problem is i want to be able to access my email account from a web page, with log in, so my question is how can i do that?

View 1 Replies View Related

Networking :: Unable To See Shares On Samba Server - No Authentication Access Desired (open Access)

Jun 12, 2009

I've been running a Samba server under RedHat 8 for five years without a hiccup. I want to cut over to a F10 box but cannot get shares accessible. smbclient attempts fail over NT password error. SELinux is disabled. Server is visible on the network. Users require no password access to shared data.

smb.conf follows:

# Samba config file created using SWAT
# from UNKNOWN (>)
# Date: 2009/06/12 14:15:15

[code]....

View 1 Replies View Related

Ubuntu Networking :: The Phone Can Access The Internet Through The Computer Unable To Get Access To Https Sites, Like Webmails

Dec 31, 2010

I managed to configure my W890i phone to get access to internet through an ubuntu-based computer. It's very easy to use the phone to give internet access to the computer, but the opposite is quite more tricky. For that I've done the following

----On the phone---

-Set the USB network option to "through computer", so that the phone uses the computer's internet connection and not the opposite.

-Decide and set "Shared Network" parameters: user, pasword and workgroup.

-In "conectivity-> internet connection" set "allow local network" to "yes"

----On Ubuntu 10.04---

-Install samba, samba-client, smbfs, smbclient, firestarter and dhcp3-server

-Configure Samba (System-> Administration-> Shared folders): same workgroup as in the phone, add new user (the phone), passwd this new user. In my case the user was called "w890i" and the password given was the same.

-Once the phone is connected to the computer through USB (then select "phone mode"), a new connection appears in NetworkManager: usb0.The aim is to create a shared network that gives internet access to this device. Edit the IPv4 parameters of this new connection, set them to Manual and give an IP adress (192.168.0.1) and a subnet mask (255.255.255.0); the rest of the fields are left empty.Connect this network.

-Set firestarter to use dhcp3: sudo ln -sf /etc/init.d/dhcp3-server /etc/init.d/dhcpd

-Launch firestarter and follow the wizard. Set "allow internet shared connection", choose the device for the primary internet access, and then the device for the shared network (usb0). Then change the settings for firestarter: activate DHCP for local network, set IP to the one we gave before (192.168.0.1).

-Open dhcp3-server config file sudo gedit /etc/default/dhcp3-server And set INTERFACES="usb0"

-Set the policies of firestarter: in incoming connections, allow connections from the IP adress given to the phone (192.168.0.1). Then add rules for the ports that need to be open for this connection. I opened HTTP, HTTPS, SMB, SMTP, POP3, IMAP, IMAPS, DHCP for all the connections in the local network.

-Apply policies and start the firewall.

------------

After all this, the phone can access the internet through the computer. Two problems appeared:

1. I couldn't get access to https sites, like webmails. The phone gave a "communication error". But then I tried with Opera instead of the browser built in the phone's firmware, and I could finally get to https sites.

2. I couldn't retrieve mail, neither POP nor IMAP nor IMAPS. I thought it was a firmware problem again, and I tried out several mobile phone email clients written in java, but none of them worked.

So this is at the moment the problem. If I connect from the phone to the internet directly through 3G, the email clients work for all my accounts. I don't think it's a firewall problem, because the ports are opened for this connection

View 3 Replies View Related

Software :: Unable To Run Java Applets

Mar 6, 2010

i am running Oracle EBS R12.1.1 on Linux RHEL 5.3 ,I am not able to run java applets on the same . I installed latest rpm of jre-1.6.0_18 , and it is there in /usr/java/jre1.6.0_18 but when i am searching by command its showing

[Code]....

View 3 Replies View Related

CentOS 5 :: Unable To Install Sun Java

Sep 22, 2009

I am using the latest version of Cont OS 5.I installed Sun Java into the Firefox browser and it works fine for web content but not for accessing my office Windows Desktop remotely. It seems that I have to install Sun Java at Root (I think).installing the latest version of Sun Java for the purpose of accessing my Windows Desktop?

View 1 Replies View Related

Programming :: Using XML In Java?

Jan 6, 2011

how to implement this.

View 3 Replies View Related

Debian :: Unable To Install Java On Lenny 5.0?

Jan 23, 2011

I guess I am still a beginner since I can't do this. I was able to install Java in another computer successfully. I have both running now. The successful one, had a folder for firefox the one with the problem does not have that folder, (firefox). The instuctions I trying to follow are here: [URL]

Not having a firefox folder I installed using /usr/lib/mozilla/plugin . But the plugin has an X attached to the respective icon in /usr/lib/mozilla/plugins.

[URL] This website seems to offer the solution to my problem, I will need help in undoing my previous steps or in removing the incorrect plugin. But will I still need a firefox folder or directory as I have on the other machine? I have a K7S5A PRO MB and Athlon Xp 1800 + processor.

View 3 Replies View Related

Server :: Unable Java Support In Php.ini File?

Nov 29, 2010

How to enable java support in php.ini file.

View 1 Replies View Related

General :: How To Use JDK For Java Programming

Mar 12, 2010

I would like to run java program on fedora10 but I am facing some problems. When I use which java command it show usr/bin/java directory. I was trying to set the java_home path in bash_profile,but there is no affect.

View 2 Replies View Related

Programming :: Stick With Java?

May 12, 2011

Situation: this semester I took an class called Introduction to Software Design with Java.It was my first intro to programming. The class had a very odd structure:1. The text was extremely high level. The first few chapters were all about object oriented programming, how objects interact, all about specification, etc (without ever talking about implementation).2. The lecture simply followed (directly) the text. And as a result was rather uninteresting.3. While highly theoretical (in that it was very high level approach), we never talked about how the computer was dealing with the information, etc.as all very "hand waving/magic" approach.

Okay so enough of the complaints:Question: This summer I'd like to dive a bit more into a language mainly out of frustration and lack of a good book. I'm thinking perhaps a lower level language.1. Would C++ be a good second language? Or should I give Java more time?2. If I am going to go with something else, is C++ sufficiently different, or should I go with C

View 14 Replies View Related

Programming :: Use Function C In Java?

Apr 8, 2010

i want to compile function c in java and compile library is success.. when i call the library in java and error is :

Exception in thread "main" java.lang.UnsatisfiedLinkError: no libfunc.so in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1689)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)

[Code]....

View 1 Replies View Related

Software :: Access The Serial Management Consoles Of Various Hardware Devices Via Browser - Java Based

May 22, 2010

Is there any Linux software that allows accessing a pre-configured serial console via Browser using a java applet? I would like to access the serial management consoles of various hardware devices via browser.

View 1 Replies View Related

General :: Command To Check The Java Version: Java -versionand Got :bash :java: Command Not Found?

Jul 26, 2010

I've just installed java (jre-6u21-linux-i586.bin) on Red Hat 4.4 AS and issued this command to check the java version: java -versionand got :bash :java: command not found

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved