Java.lang.class is a runtime representation of classes and interfaces.
Questions tagged [java.lang.class]
97 questions
0
votes
1 answer
how to solve "Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $ "
I'm facing problem when I run the app on my mobile and when I run the error with stack trace or with debug option there is no error so I don't know what to do
Here's the error message
Error:Execution failed for task
…

user9042952
- 19
- 2
0
votes
1 answer
How to cast a (java.lang.Class) Class to a Class obtained with reflection
I'm trying to build a module for managing my database's catalogues like: country, enterprises, users etc. The user is supposed to select the catalog from a combobox and the system is supposed to display a table with the principal columns (not null…

Liz Castillo
- 59
- 1
- 9
0
votes
1 answer
Ojdbc7.jar is in CLASSPATH, but java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
I've seen a lot of similarly questions here, but I can't find my case.
I wrote a demo program to check JDBC. Here is the beginning of it:
import java.sql.*;
import oracle.jdbc.*;
import oracle.jdbc.OracleConnection;
import java.io.*;
class…

Vikora
- 174
- 1
- 6
- 19
0
votes
2 answers
Java Error based around java.lang.NumberFormatException concerning some sort of "infinite" value
I am working on a program which evaluates a given string as a mathematical function at a given x value. I am currently experiencing an error listed as such:
Exception in thread "main" java.lang.NumberFormatException: For input string:…

2rtmar
- 123
- 1
- 1
- 6
0
votes
1 answer
I'm facing difficulty at setAdapter in Android Studio
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Spinner;
import android.widget.ArrayAdapter;
import android.app.Activity;
import java.lang.String;
public class MainActivity extends AppCompatActivity…
0
votes
0 answers
How to solve Exception in thread "main" java.lang.NoClassDefFoundError?
folder
|-com
|- horstmann
|- corejava
|- Employee.java
|- Employee.class
|- PackageTest
|- PackageTest.java
|- PackageTest.class
There is my program's structure. Two files, one small class(Employee) and PackageTest…

jakubby
- 21
- 4
0
votes
1 answer
Unable to find CsvReader no matter what I try
So I am trying to make the following code work "https://github.com/jintrone/TEVA", only problem is that I am a Java newbie. At first I got compilation error "it.uniroma1.dis.wsngroup.gexf4j.core does not exist" which I solved by downloading and…

SrSbSd
- 219
- 2
- 4
- 11
0
votes
1 answer
Get PID of java.lang.Process created in java
I need to get the PID of java.lang.Process to kill it after sometime. how to achieve this in JAVA.
{
Process p = Runtime.getRuntime().exec("cmd /c start D:\\SBTool\\Test.bat");
}
I want to get the PID of process p. please help

user1058913
- 321
- 1
- 4
- 20
0
votes
1 answer
Trying to build a calculator in java but I keep getting the .class error
I just started a java class that my summer program was offering and we were tasked with creating a simple calculator. I have all the different cases created and all the variables accounted for but for some reason I keep getting a .class error and I…
0
votes
6 answers
java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.EditText
I'm getting the following Error:
java.lang.ClassCastException: android.widget.TextView cannot be cast
to android.widget.EditText at
com.example.bmicalculator.MainActivity.initializeApp(MainActivity.java.32)
Main Activity:
public class…

jane
- 21
- 1
- 1
0
votes
4 answers
Java: "exception in thread main java.lang.nullpointerexception"
I am getting an the java.lang.nullpointerexception error in my code. Though I am not sure why it is not correct. I should be a quick fix, but I can't seem to figure it out. It seems that the array in line 45 is giving me the error. Any help would be…

danp32003
- 3
- 3
0
votes
2 answers
java.lang.ClassCastException: Help me find whats wrong please
OK HERE IS XML CODE https://i.stack.imgur.com/b8Ue5.png
Sigh I have been trying to fix this for over an hour i have no idea whats going on.. I get the error on the last row of code: ph0ne= (EditText) findViewById(R.id.testphone);
public class…

jojo
- 27
- 6
0
votes
2 answers
what is the difference between the java.lang.Math class and the java.Math class
I am trying to figure out which 'Library' the BigDecimal Class resides in. When I read the referencing information it says this:
java.lang.Object
java.lang.Number
java.math.BigDecimal
which I don't totally understand. I am…

RoryG
- 1,113
- 1
- 10
- 20
0
votes
1 answer
java.lang.NullPointerException on session class
I am creating a session.class for my session management for a login class, but my logcat showing error java.lang.NullPointerException and the apps can't run on emulator, please help
Here's my session.java:
public class Session {
private…

user3488298
- 3
- 3
0
votes
4 answers
NumberFormatException when parsing String to Float value
System.out.println("Enter a number: ");
String in1 = input.nextLine();
Integer input1 = Integer.valueOf(in1);
Float input2 = Float.parseFloat(in1);
Double input3 = Double.valueOf(in1).doubleValue();
System.out.println();
System.out.println("Enter…
user3094226