#How can I execute a project with few a .java files?

18 messages · Page 1 of 1 (latest)

willow goblet
#

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

sinful perchBOT
#

This post has been reserved for your question.

Hey @willow goblet! Please use /close or the Close Post button 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.

unkempt pasture
#

in your folder finalProject run
javac *.java
then depending in which file your main method is located run
java FILENAME (without any extension)

willow goblet
# unkempt pasture in your folder `finalProject` run `javac *.java` then depending in which file yo...

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

unkempt pasture
#

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.

willow goblet
willow goblet
unkempt pasture
#

but didn't you setup your project with netbeans ?

willow goblet
#

nope but i tried

#

when i try to open a project

#

like i keep pressing the open project but it doesn't do anything

unkempt pasture
#

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.