Questions tagged [java]

Java (not to be confused with JavaScript) is a general-purpose object-oriented programming language designed to be used in conjunction with the Java Virtual Machine (JVM). "Java platform" is the name for a computing system that has installed tools for developing and running Java programs. Use this tag for questions referring to Java programming language or Java platform tools.

Java is a high-level, platform-independent, object-oriented (OOP) programming language and run-time environment.

The Java language derives much of its syntax from C and C++, but its object model is simpler than that of C++ and it has fewer low-level facilities. Java applications are typically compiled to bytecode (called class files) that can be executed by a JVM (Java Virtual Machine), independent of computer architecture. The JVM often further compiles code to native machine code to optimize performance.

The JVM manages memory with the help of a garbage collector in order to handle object removal from memory when not used any more. Java supports features such as reflection and interfacing with C and C++ via JNI.

Java is designed to have as few implementation dependencies as possible, intended to allow application developers to "write once, run anywhere" (WORA): code that executes on one platform does not need to be recompiled to run on another machine. Java was originally developed by [James Gosling] at Sun Microsystems (which merged with Oracle Corporation on April 20, 2009) and was released in 1995 as a core component of Sun Microsystems' Java platform.

The [Java platform] is the name given by Sun (now Oracle) to computing systems that have installed tools for developing and running Java programs. The platform features a wide variety of tools that can help developers work efficiently with the Java programming language.

The platform consists of two essential software packages:

  • the Java Runtime Environment (JRE), which is needed to run Java applications and applets; and,
  • the Java Development Kit (JDK), which is needed to develop Java applications and applets. The JDK comes with a JRE.

In this section, we will explore in further detail what these two software components of the Java platform do.

40 questions
3
votes
2 answers

Problem sending colors from an audio visualizer to Arduino

Sorry in advance for the length of my question; I want to provide proper context. I wrote an audio visualization program in Java that (in addition to making "pretty pictures" based off of the amplitudes of different frequencies being sent from the…
2
votes
2 answers

Linux can not open arduino IDE - java.lang.NullPointerException

I use arch linux. I installed arduino ide with pacman. When I try to run it, loading window will show for few socends and than program crashes. There are logs: john@arch-thinkpad ~ [1]> arduino Picked up JAVA_TOOL_OPTIONS: Set log4j store directory…
Jan Černý
  • 249
  • 2
  • 10
2
votes
2 answers

Sending data from Arduino to laptop via bluetooth using java

I intend to establish communication between my laptop and Arduino via Bluetooth. I'm using BlueCove Java API. I'm unable to understand how to send data to Arduino using this. There are no clear examples available on the internet regarding how to…
Clement
  • 41
  • 1
  • 5
2
votes
0 answers

I can't receive data from Arduino through Bluetooth

I am developing an app that controls an Arduino robot. For that I need to communicate through Bluetooth. That means sending and receiving data. Why receiving? Because I also have sensors on the robot. I am already able to successfully connect with…
2
votes
0 answers

Connection between Matlab and Arduino

I'm trying to connect Maltab and Arduino by this code: arduino=serial('COM7','BaudRate',9600); fopen(arduino); But I get this message: Open failed: Port: COM7 is not available. No ports are available. Use INSTRFIND to determine if other…
2
votes
0 answers

Flexiforce to Uno to Keyboard. Working but not as inteded

I have a Flexiforce 25 pound pressure sensors connected to my Arduino Uno which connects to my laptop. My requirement is to be able to play video games using taps on pressure sensors. I am successfully sending signals to my Laptop and I am using…
thanmai
  • 121
  • 1
1
vote
0 answers

Arduino IDE Java error

I'm running IDE version 1.8.16 under Windows 10. Frequently I get the error message. The situation is solved only when exiting the IDE. Afterwards the compilation may be finished with or without sketch errors. Is there anything to do? Exception in…
1
vote
3 answers

Can I pass data from an Arduino Nano to a Websocket Server via USB?

I have an Arduino Nano, and a local Java WebSocket server (ws://localhost:8888) run by a .jar file on my computer. I'm wondering if it's possible to send data (text, numbers etc.) from the Arduino Nano to the WebSocket server via USB cable (USB-A to…
kevinlinxc
  • 119
  • 3
1
vote
1 answer

cant read json data esp 32 “parseObject() failed”

hello I am just trying to make Youtube Subscribe Counter with led matrix 32*8 and esp 32 and I had this problem when I trying to get subscribers to count so what is the problem and how I can fix it? ` ``` //######################## YouTube…
1
vote
0 answers

Java Errors thrown by Ardunio IDE when attempting to open serial monitor

I am only getting this error on one of my Windows 10 PC's. On another windows 10 PC and Mac, the board (Mega 2560) is working fine. Any hellp or advice on this would be appreciated. THE PROBLEM After uploading the sketch and then attempting to…
Mike M0ITI
  • 26
  • 1
1
vote
0 answers

Arduino IDE on eOS? Java?

Tried to install Arduino IDE on Juno, install script gave warnings about icons not being installed on desktop (which is fine since no desktop folder for eOS) but then when try to launch the IDE icon from Applications it doesn't go. I'm guessing it's…
iGuest
  • 11
  • 1
1
vote
1 answer

Integrating Java program with arduino mega is it possible?

I have just written a java algorithm to get a chess move when a chess move is inputted in SAN notation the algorithm used : Monte Carlo. Is it possible to integrate this program with an Arduino mega and How? My mega will be getting inputs from a…
Roshan
  • 211
  • 1
  • 10
1
vote
2 answers

Arduino IDE not compile .S program to board

After answering my previous question correctly I'm getting all sorts of errors when trying to compile the following program: I'm completely new to both assembly and the arduino IDE so I apologise in advance for any basic errors. sketch.ino: #include…
1
vote
0 answers

Problem with receiving data from Arduino via HC05 sent by Java

I want to both send some sensor data via Bluetooth (HC05) and Arduino to Java and I also want to send some command data via the same Bluetooth and serial port to Arduino. I've managed to do the first part (arduino to java) successfully with this…
1
vote
2 answers

How to send multiple data from PC to arduino

I have a project in arduino that i interface with java. The arduino is connected to the computer via usb cable , I use the serial communication. I have two variables: //Code in arduino int ADelay = 1000; int BDelay = 1000; I want to change the…
kaisar Great
  • 111
  • 1
  • 5
  • 11
1
2 3