Git Product home page Git Product logo

Comments (11)

Sadasak avatar Sadasak commented on July 17, 2024 1

@MTraveller , @bummoblizard

The key is to make sure that you are inside the directory at the terminal

For example, if the main class you are trying to run by the run button is in documents/project1/package1/ the terminal should look like this

package1 $ 

And if you are in documents/ it won't work

documents $ 

.

from codeapp.

bummoblizard avatar bummoblizard commented on July 17, 2024

Thanks for reminding me. I will fix this as soon as possible.

from codeapp.

bummoblizard avatar bummoblizard commented on July 17, 2024

This will be fixed in 1.7.2, which is expected to release in a couple days.

from codeapp.

MTraveller avatar MTraveller commented on July 17, 2024

Thanks looking forward.

from codeapp.

bummoblizard avatar bummoblizard commented on July 17, 2024

@MTraveller @kvARCalsovonal07 @Sadasak The fix (1.7.2) is now available on the App Store. It should work right away without needing to use the command in the terminal.

from codeapp.

MTraveller avatar MTraveller commented on July 17, 2024

@MTraveller @kvARCalsovonal07 @Sadasak The fix (1.7.2) is now available on the App Store. It should work right away without needing to use the command in the terminal.

Alright, did some testing and it works but not as expected.

If I press the play button in top right corner with the:

-test
--Main.java
--Test.java

it wont work as is. But if I compile first with javac and then run with java test.Main, it works, being inside the package in terminal.

The other method that seems to work as well is importing the Test.java class, as:

import test.Test;

Works with the top right play button.

Another thing I noticed, the && does not work when entered manually into the terminal.

from codeapp.

MTraveller avatar MTraveller commented on July 17, 2024

@MTraveller , @bummoblizard

The key is to make sure that you are inside the directory at the terminal

For example, if the main class you are trying to run by the run button is in documents/project1/package1/ the terminal should look like this

package1 $ 

And if you are in documents/ it won't work

documents $ 

.

True for import test.Test;

But not for package test;

I'll get a class error both with the button and running java test.Main or java Main.

Also for package test; being in parent folder of test works and not inside test.

If you are able to provide a sample would be great.

I have:

-javaplayground
--textbox
---Main.java
// Main.
package textbox;

public class Main {
public static void main(String[] args) {
TextBox textBox1 = new TextBox();
textBox1.setText("Box 1");

    System.out.println(textBox1.text);
}

}

---TextBox.java
// TextBox.

package textbox;

public class TextBox {
public String text = "";

public void setText(String text) {
  this.text = text;
}

public void clear() {
  text = "";
}

}

In terminal I am in javaplayground $ java textbox.Main which works otherwise nothing works, just errors.

from codeapp.

Sadasak avatar Sadasak commented on July 17, 2024

@MTraveller

I think you have to be at textBox $
Try that if it doesn't work then screenshot the errors

from codeapp.

MTraveller avatar MTraveller commented on July 17, 2024

Play button inside textbox:

IMG_0157

java textbox.Main in parent folder:

IMG_0158

from codeapp.

Sadasak avatar Sadasak commented on July 17, 2024

@MTraveller
I really don't know what's going wrong

It's running good with me

from codeapp.

MTraveller avatar MTraveller commented on July 17, 2024

Found the issue. package textbox; is doing the mess up.

from codeapp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.