I'm quite new to java and I have tried so many different ways of getting a project running that has a few .java files with it.
I have tried netbeans and also just running javac inside the directory, but can't just get it to work, could anyone please help me out?
Thank you
#How can I execute a project with few a .java files?
18 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @willow goblet! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
in your folder finalProject run
javac *.java
then depending in which file your main method is located run
java FILENAME (without any extension)
it should work however I get errors of chromedriver even though in the code it gets the chromedriver path from lib
chromeUser.java:5: error: package org.openqa.selenium does not exist
import org.openqa.selenium.WebDriver;
^
chromeUser.java:6: error: package org.openqa.selenium.chrome does not exist
import org.openqa.selenium.chrome.ChromeDriver;
^
chromeUser.java:7: error: package org.openqa.selenium.chrome does not exist
import org.openqa.selenium.chrome.ChromeOptions;```
this is the project im trying to run
i also have the newest chromedriver installed
so no clue on that
In that case you'll have to include the library manually
javac -cp library.jar *.java
but you should be able to build and package as a jar in netbeans.
i'll try this, i got only experience with python so java has kinda different rules here
for some reason i cannot open the folder with netbeans
but didn't you setup your project with netbeans ?
nope but i tried
when i try to open a project
like i keep pressing the open project but it doesn't do anything
yeah that's probably because there is no configuration file for the project, just the source files. You should be possible to clone the project straight from github using netbeans, though I can't tell you how.