32,204 Topics

Member Avatar for
Member Avatar for end3r

Hi, I have a problem with some resource files (i.e. .txt) which I have created in the project under let's say com/myapp/resources. I have a class created: com.myapp.util.MyClass which reference a file.txt located in resources folder: [CODE] MyClass.class.getResourceAsStream("../resources/file.txt"); [/CODE] The project is created in eclipse. After I export the project …

Member Avatar for end3r
0
309
Member Avatar for choboja621
Member Avatar for choboja621
0
75
Member Avatar for mangopearapples

Hey everyone, I'm trying to make a button have an image, it used to work but for some reason, now it doesn't. This is the error: [COLOR="Red"]Exception in thread "main" java.lang.NullPointerException at javax.swing.ImageIcon.<init>(Unknown Source) at Main.createImageIcon(Main.java:109) at Main.<init>(Main.java:82) at Main.main(Main.java:103) [/COLOR] I see that the error is the: [CODE]ImageIcon NewFileIcon …

Member Avatar for Moraes V.A.
0
355
Member Avatar for sirlink99

I am wondering if there is a way to make a MySQL database using my java program without actually having a defined username for the admin. for example I would make a program that you could install on all computers in a network that connect to a newly made database …

Member Avatar for masijade
0
121
Member Avatar for mayursharma

Hello everyone .. I am new to this excel reading !! Introduction: I have a link to a txt-file(or doc file) in excel file and i need to read a data present in the linked file. I can read normal text present in excel file.. Problem : but not able …

Member Avatar for mayursharma
0
750
Member Avatar for masijade

I am attempting to run a junit test against a JAX-WS service method using a simple client class and compiled generated sources from ws-import. When the test is run through surefire while doing either test or install I get the error java.lang.NoSuchMethodError: com.sun.xml.ws.api.model.SEIModel.getJAXBContext()Lcom/sun/xml/bind/api/JAXBRIContext; but when I inspect the xml in …

0
80
Member Avatar for ladybro

Hi folks, Right now I'm trying to learn about multidimensional arrays. I'm currently working on an assignment where I have to store data in said arrays. However, the input format is funky and surpasses my knowledge of how I can store it. The problem is generally along these lines. X …

Member Avatar for NormR1
0
181
Member Avatar for jcAmats

Hi. Can somebody help me? I am trying to create a program that reads random line from a file and displays them. My problem is, it keeps repeating the same line after a few tries. i have 8 total lines from my file... this is my code so far... [CODE]public …

Member Avatar for jcAmats
0
586
Member Avatar for poojavb

Hello Friends, I have one project in Java but the exe file cant show the system.out.println messages. I want to create a jar file in such a way that the error of file e.g. abc.java should be viewed when I click the jar file. is there any possible way....

Member Avatar for poojavb
0
145
Member Avatar for bo0ga

How did you learn Java? I just watched the basic and intermediary video tutorials from thenewboston.com and I'm still not 100 percent. I've moved onto the android application development tutorials which deals with a lot of java, and I still don't totally understand it. It started off with a bunch …

Member Avatar for stultuske
0
204
Member Avatar for .:n'tQ-boy:.

Hi mate, I am doing a mini program in java that let us look up word as a dictionary. I tended to use database to store words and their meanings, but my teacher suggested me using file (or xml). I chose using file (write a vector to file). Can u …

Member Avatar for joehms22
0
193
Member Avatar for Valiantangel

Can anyone give me an example iniitialing a non zero value using arrays If u cant give an example pls dont respond.Thanks:)

Member Avatar for NormR1
0
81
Member Avatar for jingham

i am using a java program and i need to store two sets of data (radius and thickness) there are elven of these i need to store. my question is firstly how to store these into an array without having to do user input each time. then say i need …

Member Avatar for NormR1
0
249
Member Avatar for comSysStudent

I'm trying to get my JPanel (JFrame?) to resize itself to fit randomly drawn shapes. I have a shape superclass and right now I'm working with my line subclass. Everything is working fine except I can't figure out how to make the shapes fit the size of the JPanel. Should …

Member Avatar for comSysStudent
0
7K
Member Avatar for sirlink99

I am trying to make a screen recorder, but I am having trouble converting the images I capture to a video. I have done some research, but JMF doesn't seem to work for me(maybe because I am running 64 bit), and I have not been able to find anything else. …

0
51
Member Avatar for Raj1987

hi I develop MDI App in which we want to child frame to child frame and parent to child frame communication. If any one knew it plz help me.

Member Avatar for Robart Gilbert
0
78
Member Avatar for matthew.m

it involves using a static array to build and hold the coefficients values and evaluate and analyze them as well as to export the results to an external file such as a text file here is what i have so far any help would be appreciated. [CODE] import java.util.*; import …

Member Avatar for NormR1
0
566
Member Avatar for drogba123

Hi guys, i wonder why i get this error could not find or load abc. Basically i am using command prompt to run the java file. The command is like this: java -cp weka.jar abc then i have that error show above.

Member Avatar for NormR1
0
176
Member Avatar for spixy

Waaah, i got a project, but I can't get it write, i'm not bad at programming but,it's just happen my professor is really busy. teaching is just his part-time job. I can remember we stop the discussion somewhere introducing objects.. but haven't really discussed about things lets go back to …

Member Avatar for spixy
0
4K
Member Avatar for picogenkaku

Good day everyone, I have a question. I am constructing a timer in Java console, wherein this timer should be located in one corner (such as upper right). I can only make it count up on its own place. My question is how can I place the code on the …

Member Avatar for stultuske
0
138
Member Avatar for Thermalnuke

Hey guys I got a problem, my program is suppose to take 10 numbers or grade scores and output the max, min and avg. score. My program writes out the max and the avg, although the avg dosent come out correctly because i am not getting a min for a …

Member Avatar for Thermalnuke
0
138
Member Avatar for sirlink99

I have devised a quick little program that captures the screen and puts it in a vector, but my problem is that when I go to save it gives me this error [code] - create processor for the image datasource ... Setting the track format to: JPEG - create DataSink …

0
52
Member Avatar for mags11

I am trying to figure out this one out. The directions: Write a class named car in the following fields: [LIST=1] [*]yearModel - The yearModel field is an int that holds the car's yea model. [*]make - The make field references a String object that holds the make of the …

Member Avatar for stultuske
0
12K
Member Avatar for MrHardRock

Hey guys, I have the assignment of writing the Towers of Hanoi program then testing it. I already got help measuring the time of the program, but that is not what my professor wanted he wanted to count the iterations. I can't get it down, my program will run but …

Member Avatar for MrHardRock
0
2K
Member Avatar for summey

Below i have my Main class and a MortgageCalculation class I am trying to modify my app to do the following: "Modify the mortgage program to display 3 mortgage loans: 7 year at 4.35%, 15 year at 4.5 %, and 30 year at 4.75%. Use an array for the different …

Member Avatar for NormR1
0
212
Member Avatar for Majestics

I am using jasper report (ireport for designing). I want help regarding to set [B]relative path[/B] of the [B]images and jar[/B] files for report... As the jasper report pick up the [B]absolute path[/B] so it create problem when the drive is changed or even pc is changed... Kindly please help …

0
81
Member Avatar for getack

Hello All! I am making a simple four-in-a-row style game where 2 players can play against eachother. This is part of an AI course I'm taking where we should demonstrate the machine (the AI) playing against the player. The game part of the game and the gui are completely separated. …

Member Avatar for rfq
0
3K
Member Avatar for riahc3

Hello I feel stupid for actually asking this but how do I ping a IP address in Java? I have this code [code] try { // Google.com if (InetAddress.getByAddress("173.194.35.133".getBytes()).isReachable(1000)==true) { //Boolean variable named network network=true; //Ping works } else { network=false; //Ping doesnt work } } catch (UnknownHostException e3) { …

Member Avatar for riahc3
0
977
Member Avatar for shubham123

**hi ... i am new in java swing. i am using netbeans. i've two frame named jFrame1 & jFrame2. jFrame2 contains a jTable. jFrame1 contains a jTextField & a jButton. while user input a value in jTextField and press JButton, jFrame2 will appear and output (from mySQL database) will be …

Member Avatar for mKorbel
0
139
Member Avatar for noobies

Hye all, I had a difficulty in codes a ball collision in java. Is there anyone could help me to code it. Here the requirement: 1) There will be two balls in the same size. 2) They move randomly at constant speed until they meet each other. 3) Once collided, …

Member Avatar for NormR1
0
192

The End.